Reply
Contributor
Posts: 41
Registered: ‎07-26-2016

Update and Delete are not working in Hive ?

[ Edited ]

Hi all,

 

I am not able to delete or update in hive table .

 


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

 

insert into table testTableNew values('101','syri');

 

select * from testtablenew;

 

1102syam
2101syri
3101syri

 

 

delete from testTableNew where id = '101';

 

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

update testTableNew
set name = praveen
where id = 101;

 

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

 

I have added few properties in hive-site.xml also :


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
2


hive.in.test
true

 

After restart the Hive service also same error i am facing.

Quick Start VM  - 5.8 and Hive version - 1.1.0.

Please guide me to sort this issue.

 

Thanks,

Syam.

 

 

Posts: 365
Topics: 11
Kudos: 57
Solutions: 30
Registered: ‎09-02-2016

Re: Update and Delete are not working in Hive ?

@syamsri

 

  1. Go to Yarn -> Configuration -> search for "yarn.nodemanager.resource.memory-mb". If it is 1 GB by default, increase it to 2 GB
  2. Save it and restart YARN
  3. (Sometime, may need to restart HUE as well, need to chk)

try again now

Contributor
Posts: 41
Registered: ‎07-26-2016

Re: Update and Delete are not working in Hive ?

Thanks for the reply Saranvisa,

 

I already increased this configuration for some other reason,

But no work of update and delete operations.

 

Thanks,

Syam.

Posts: 365
Topics: 11
Kudos: 57
Solutions: 30
Registered: ‎09-02-2016

Re: Update and Delete are not working in Hive ?

@syamsri

 

how much you have increased? so i think in your case it is not sufficient, you have to increase more and try your update & delete operations

Contributor
Posts: 41
Registered: ‎07-26-2016

Re: Update and Delete are not working in Hive ?

2017-07-25_0926.png

Explorer
Posts: 32
Registered: ‎01-08-2017

Re: Update and Delete are not working in Hive ?

[ Edited ]

Can you try uninstalling hive and re-install it again and then try the same command.

Contributor
Posts: 41
Registered: ‎07-26-2016

Re: Update and Delete are not working in Hive ?

Hi Ujjwal,

 

Thanks for the reply.

This is quickstart Vm machine 5.8.

Uninstalling is not the solution i think.

 

Thanks,

Syam

Champion
Posts: 545
Registered: ‎05-16-2016

Re: Update and Delete are not working in Hive ?

[ Edited ]

@syamsri 

Ok Could you please let ,me know the file format that you are using for Hive ( testTableNew ) ,

 Hive supports Delete Update only on ORC format starting from 0.14 . 

 

Try creating a table with ORC format , if you want more flexibility then try Apache KUDU but it has it owns merits and demerits . Hope this helps . 

 

 

CREATE TABLE Sample (
  id                int,
  name              string
)
CLUSTERED BY (id) INTO 2 BUCKETS STORED AS ORC
TBLPROPERTIES ("transactional"="true",
  "compactor.mapreduce.map.memory.mb"="2048",    
  "compactorthreshold.hive.compactor.delta.num.threshold"="4",  
  "compactorthreshold.hive.compactor.delta.pct.threshold"="0.5"
);
Contributor
Posts: 41
Registered: ‎07-26-2016

Re: Update and Delete are not working in Hive ?

Thanks for the reply.

 

I created the ORC format table only.

You can see the details in first post.

 

Apache Kudu is like hive ?

 

Thanks,

Syam.

Highlighted
Posts: 365
Topics: 11
Kudos: 57
Solutions: 30
Registered: ‎09-02-2016

Re: Update and Delete are not working in Hive ?

@syamsri

 

Apache Kudu is not like hive. It is like HDFS. The difference is HDFS stores data in row wise where as Kudo stores in column wise

Announcements