Error while compiling statement: FAILED: SemanticException [Error 10294]:
Attempt to do update or delete using
transaction manager that does not support these operations.
解决方法一:
创建hive表是添加:
'transactional'='true'
例如:创建hive表指向hbase
CREATE EXTERNAL TABLE hbase_data (
key string,
value map<string, string>
)
STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
WITH SERDEPROPERTIES (
'hbase.columns.mapping'=':key,cf:')
TBLPROPERTIES (
'transactional'='true',
'hbase.table.name'='hbase_data')
解决方法二:
修改hive-site.xml
hive.support.concurrency = true
hive.enforce.bucketing = true
hive.exec.dynamic.partition.mode = nonstrict
hive.txn.manager = org.apache.hadoop.hive.ql.lockmgr.DbTxnManager
hive.compactor.initiator.on = true
hive.compactor.worker.threads = 1
本人见解:如有不对,可留言评价:
注:使用hive创建hbase外表后,无法删除hbase中数据,只能进行查询
只能通过再创建hive表,将habse数据导入hive,才能通过hive删除数据,
删除的只是hive数据,但是不能直接删除hbase中数据。
版权声明:本文为m0_43393325原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。