Attempt to do update or delete using transaction manager that does not support these operations

Vivek Harry picture Vivek Harry · Dec 10, 2015 · Viewed 35.5k times · Source

While trying to update a data in Hive table in Cloudera Quickstart VM, I'm getting this error.

Error while compiling statement: FAILED: SemanticException [Error 10294]: Attempt to do update or delete using transaction manager that does not support these operations.

I added some changes in hive-site.xml file and also restarted the hive and cloudera.These are changes which I made in 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

Answer

dumitru picture dumitru · Feb 2, 2016

I've tried with the configuration you provided in a hortonworks sandbox and I was able to do ACID operations on a table and I suppose it works also in Cloudera environment. Although there a some things to mention:

  • make sure hive has the properties you gave it (you can verify them in Hive CLI using SET command)
  • table that you work with must be bucketed, declared as ORC format and has in it's table properties 'transactional'='true' (hive support ACID operations only for ORC format and transactional tables). An example of a proper table is like this:

    hive>create table testTableNew(id int ,name string ) clustered by (id) into 2 buckets stored as orc TBLPROPERTIES('transactional'='true');

You can follow this example.