• 首页
  • 栏目
  • ERP
  • Hive Aapche 设置为事务表(ACID)This command is not allowed on an ACID table

Hive Aapche 设置为事务表(ACID)This command is not allowed on an ACID table

  • 2021-10-30
  • Admin

Apache Hive中默认的创建的表为非事务表,如果需要将表设置为事务表需要修改以下参数:

  1. <property>
  2.     <name>hive.support.concurrencyname>
  3.     <value>truevalue>
  4. property>
  5.  
  6. <property>
  7.     <name>hive.txn.managername>
  8.     <value>org.apache.hadoop.hive.ql.lockmgr.DbTxnManagervalue>
  9. property>
  10. <property>
  11.     <name>hive.compactor.initiator.onname>
  12.     <value>truevalue>
  13. property>
  14. <property>
  15.     <name>hive.compactor.worker.threadsname>
  16.     <value>1value>
  17. property>
  18. <property>
  19.     <name>hive.create.as.insert.onlyname>
  20.     <value>truevalue>
  21. property>
  22. <property>
  23. <name>hive.optimize.acid.meta.columnsname>
  24. <value>truevalue>
  25. property>

当表为事务表时,如果使用非事务的参数去执行SQL,会报如下错误:

Error: Error while compiling statement: FAILED: SemanticException [Error 10265]: This command is not allowed on an ACID table test_acid with a non-ACID transaction manager. Failed command: create table test_acid

原文:https://blog.csdn.net/qq_35260875/article/details/121047287

联系站长

QQ:769220720