Please check into your conf folder of hive.
If you are working on cloudera vm(v-4), below things you have to add in 
hive-site.xml.

<name>hive.aux.jars.path</name>
<value>path/to/hive-hbase-handler-0.9.0-cdh4.jar,path/to/hive/lib/hbase-0.92.jar,payh/to/hive/lib/zookeeper-VERSION.jar</value>

Regards
Ashok S.
________________________________________
From: Ejaz Rasool [rasool_e...@hotmail.com]
Sent: Monday, September 17, 2012 3:43 AM
To: user@hive.apache.org
Cc: Ashok Kumar Samal (WT01 - CITI); Azaz Rasool (WT01 - Banking & Financial 
Services)
Subject: Error in inserting data into HBase table from Hive

Hi,

I am getting error while inserting data into HBase table from Hive (see Step#5 
below)...any help is much appreciated.

I am following the HBase-Hive integration article : 
https://cwiki.apache.org/Hive/hbaseintegration.html

Step#1

hive> CREATE TABLE tblHbase(key int, a int, b int,c bigint)
STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,f:a,f:b,f:c")
TBLPROPERTIES("hbase.table.name"="tblHbase");



Step#2

hbase(main):001:0> describe "tblHbase"
DESCRIPTION                                        ENABLED
 {NAME => 'tblHbase', FAMILIES => [{NAME => 'f', B true
 LOOMFILTER => 'NONE', REPLICATION_SCOPE => '0', V
 ERSIONS => '3', COMPRESSION => 'NONE', MIN_VERSIO
 NS => '0', TTL => '2147483647', BLOCKSIZE => '655
 36', IN_MEMORY => 'false', BLOCKCACHE => 'true'}]
 }



Step#3

hive> describe tblhive;


OK id int a int b int c bigint

Step#4

hive> select * from tblhive;


OK 1 101 102 103 2 201 202 203

Step#5 -- Error in inserting data into HBase table from Hive

hive> insert overwrite table tblHbase select id,a,b,c from tblhive;

Total MapReduce jobs = 1 Launching Job 1 out of 1 Number of reduce tasks is set 
to 0
since there's no reduce operator Starting Job = job_1347311485447_0005,
Tracking URL = <url_deleted> Kill Command = /usr/lib/hadoop/bin/hadoop job  
-Dmapred.job.tracker=0.0.0.0:8021
-kill job_1347311485447_0005 Hadoop job information for Stage-0:
number of mappers: 1;
number of reducers: 0
2012-09-10 18:19:35,844 Stage-0 map = 0%,  reduce = 0% Ended Job = 
job_1347311485447_0005 with errors Error during job, obtaining debugging 
information...
Examining task ID: task_1347311485447_0005_m_000000 (and more) from job 
job_1347311485447_0005

Task with the most failures(4):
----- Task ID:   task_1347311485447_0005_m_000000

URL:   
http://x.x.x.x:50030/taskdetails.jsp?jobid=job_1347311485447_0005&tipid=task_1347311485447_0005_m_000000
-----

**FAILED: Execution Error, return code 2 from 
org.apache.hadoop.hive.ql.exec.MapRedTask**
MapReduce Jobs Launched:  Job 0: Map: 1   HDFS Read: 0 HDFS Write: 0
FAIL Total MapReduce CPU Time Spent: 0 msec



Please do not print this email unless it is absolutely necessary.

The information contained in this electronic message and any attachments to 
this message are intended for the exclusive use of the addressee(s) and may 
contain proprietary, confidential or privileged information. If you are not the 
intended recipient, you should not disseminate, distribute or copy this e-mail. 
Please notify the sender immediately and destroy all copies of this message and 
any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient should 
check this email and any attachments for the presence of viruses. The company 
accepts no liability for any damage caused by any virus transmitted by this 
email.

www.wipro.com

Reply via email to