Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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
like image 778
Vivek Harry Avatar asked Dec 10 '15 09:12

Vivek Harry


People also ask

Is it possible to delete and Update in Hive table?

Earlier, there was no operation supported for the deletion and updatE of a particular record in Hive. But since updating of Hive 0.14, these operations are possible to make changes in a Hive table.

How to Update the Hive table data?

You use the UPDATE statement to modify data already stored in an Apache Hive table. You construct an UPDATE statement using the following syntax: UPDATE tablename SET column = value [, column = value ...]


1 Answers

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.

like image 158
dumitru Avatar answered Sep 21 '22 15:09

dumitru