hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From unmesha sreeveni <unmeshab...@gmail.com>
Subject Re: UPDATE in Hive -0.14.0
Date Mon, 24 Nov 2014 09:39:54 GMT
Created a Table in Hive

create external table HiveTest (EmployeeID Int,FirstName String,Designation
String,Salary Int,Department String) row format delimited fields terminated
by "," location '/user/aibladmin/Hive';

And set all the properties 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

The when I tried
hive>
    >
    > UPDATE HiveTest SET salary = 50000 WHERE employeeid = 19;
FAILED: SemanticException [Error 10297]: Attempt to do update or delete on
table default.HiveTest that does not use an AcidOutputFormat or is not
bucketed

 Is it beacause of hive.enforce.bucketing – true set in hive-site.xml
Is bucketing like partition?





On Mon, Nov 24, 2014 at 2:55 PM, Mahesh Kumar <sankarmahesh37@gmail.com>
wrote:

> Hi unmesha sreevani,
>
>                     *Create metastore in mysql and create the tables as
> per the below link.*
> https://github.com/apache/hive/blob/trunk/metastore/scripts/upCreate
> metastore in mysql and create the tables as per the below
> link.grade/mysql/hive-schema-0.14.0.mysql.sql
> <https://github.com/apache/hive/blob/trunk/metastore/scripts/upgrade/mysql/hive-schema-0.14.0.mysql.sql>
> .
>
> *And add these properties in hive-site.xml.*
>
> <property>
>  <name>hive.support.concurrency</name>
>  <value>true</value>
> </property>
>
> <property>
>  <name>hive.enforce.bucketing</name>
>  <value>true</value>
> </property>
>
> <property>
>  <name>hive.exec.dynamic.partition.mode</name>
>  <value>nonstrict</value>
> </property>
>
> <property>
>  <name>hive.txn.manager</name>
>  <value>org.apache.hadoop.hive.ql.lockmgr.DbTxnManager</value>
> </property>
>
> <property>
>  <name>hive.compactor.initiator.on</name>
>  <value>true</value>
> </property>
>
> <property>
>  <name>hive.compactor.worker.threads</name>
>  <value>1</value>
> </property>
>
> *Make sure your table creation supports ACID ouput format.Create like
> following*.
>
> create table test(id int, name varchar(128)) clustered by (id) into 2
> buckets stored as orc TBLPROPERTIES ('transactional'='true')
>
>
> Regards,
>
> Mahesh.S
>
>


-- 
*Thanks & Regards *


*Unmesha Sreeveni U.B*
*Hadoop, Bigdata Developer*
*Centre for Cyber Security | Amrita Vishwa Vidyapeetham*
http://www.unmeshasreeveni.blogspot.in/

Mime
View raw message