在这里插入图片描述

 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中数据。
Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐