hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lefty Leverenz <leftylever...@gmail.com>
Subject Re: UPDATE in Hive -0.14.0
Date Mon, 01 Dec 2014 01:35:08 GMT
Here are some helpful wikidocs:

   - Hive Transactions
   <https://cwiki.apache.org/confluence/display/Hive/Hive+Transactions>
      - Limitations
      <https://cwiki.apache.org/confluence/display/Hive/Hive+Transactions#HiveTransactions-Limitations>
(file
      format must be ORC, tables must be bucketed)
      - Configuration
      <https://cwiki.apache.org/confluence/display/Hive/Hive+Transactions#HiveTransactions-Configuration>
      - Table Properties
      <https://cwiki.apache.org/confluence/display/Hive/Hive+Transactions#HiveTransactions-TableProperties>
      - Bucketed Tables
   <https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL+BucketedTables>
   - ORC Files
   <https://cwiki.apache.org/confluence/display/Hive/LanguageManual+ORC>


-- Lefty

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

> hi unmesha sreeveni,
>
>                   As i told earlier create the table with ACID ouput
> format support.
>
>
>
> On Mon, Nov 24, 2014 at 3:09 PM, unmesha sreeveni <unmeshabiju@gmail.com>
> wrote:
>
>> 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