<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: ​HBase row key cannot be NULL error in Hive-Hbase copy tables in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HBase-row-key-cannot-be-NULL-error-in-Hive-Hbase-copy-tables/m-p/163536#M29367</link>
    <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/418/ashu.html" nodeid="418"&gt;@ashu&lt;/A&gt; Thanks. Resolved it.&lt;/P&gt;</description>
    <pubDate>Tue, 24 May 2016 03:44:54 GMT</pubDate>
    <dc:creator>dattatri_chandr</dc:creator>
    <dc:date>2016-05-24T03:44:54Z</dc:date>
    <item>
      <title>​HBase row key cannot be NULL error in Hive-Hbase copy tables</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HBase-row-key-cannot-be-NULL-error-in-Hive-Hbase-copy-tables/m-p/163534#M29365</link>
      <description>&lt;P&gt;Trying to copy a column data from one Hive-Hbase table to the second Hive-Hbase table. &lt;/P&gt;&lt;P&gt;Getting the &lt;STRONG&gt;&lt;/STRONG&gt;&lt;STRONG&gt;HBase row key cannot
be NULL&lt;/STRONG&gt; error even though there is rowkey.&lt;/P&gt;&lt;P&gt;Way to reproduce this is : &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;HBase DDL:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;CREATE TABLE 'TRIAL_SRC',{NAME =&amp;gt; 'd'}&lt;/P&gt;&lt;P&gt;CREATE TABLE 'TRIAL_DEST',{NAME =&amp;gt; 'd'}&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Hive DDL:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Table 1 (Hive over Hbase):&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;create external table if not exists DCHANDRA.TRIAL_SRC (&lt;/P&gt;&lt;P&gt;key string&lt;/P&gt;&lt;P&gt;, pat_id string&lt;/P&gt;&lt;P&gt;) STORED BY
'org.apache.hadoop.hive.hbase.HBaseStorageHandler' WITH SERDEPROPERTIES 
('hbase.columns.mapping' = ':key,&lt;/P&gt;&lt;P&gt;d:ref_val&lt;/P&gt;&lt;P&gt;') tblproperties ('hbase.table.name' ='TRIAL_SRC');&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Table 2 (Hive over Hbase):&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;create external table if not exists DCHANDRA.TRIAL_DEST (&lt;/P&gt;&lt;P&gt;key string&lt;/P&gt;&lt;P&gt;, pat_id string&lt;/P&gt;&lt;P&gt;) STORED BY
'org.apache.hadoop.hive.hbase.HBaseStorageHandler' WITH SERDEPROPERTIES 
('hbase.columns.mapping' = ':key,&lt;/P&gt;&lt;P&gt;d:ref_val&lt;/P&gt;&lt;P&gt;') tblproperties ('hbase.table.name' ='TRIAL_DEST');&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;DML for Table1:&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;insert into DCHANDRA.TRIAL_SRC (key,pat_id) values (1,101);&lt;/P&gt;&lt;P&gt;insert into DCHANDRA.TRIAL_SRC (key,pat_id) values (2,102);&lt;/P&gt;&lt;P&gt;insert into DCHANDRA.TRIAL_SRC (key,pat_id) values (3,103);&lt;/P&gt;&lt;P&gt;insert into DCHANDRA.TRIAL_SRC (key,pat_id) values (4,104);&lt;/P&gt;&lt;P&gt;insert into DCHANDRA.TRIAL_SRC (key,pat_id) values (5,105);&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;DML for Table2:&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;insert into DCHANDRA.TRIAL_DEST (key,pat_id) values (1,10);&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Upsert into Table2(TRIAL_DEST) from Table1(TRIAL_SRC) :&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;insert into dchandra.trial_dest(pat_id) select
src.pat_id from dchandra.trial_src src join dchandra.trial_dest dest on
src.key=dest.key;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Getting the error&lt;/P&gt;&lt;P&gt;Status: Failed&lt;/P&gt;&lt;P&gt;Vertex failed, vertexName=Map 1,
vertexId=vertex_1463698008506_2409_9_01, diagnostics=[Task failed,
taskId=task_1463698008506_2409_9_01_000000, diagnostics=[TaskAttempt 0 failed,
info=[Error: Failure while running task:java.lang.RuntimeException:
java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException:
Hive Runtime Error while processing row
{"key":"1","pat_id":"101"}&lt;/P&gt;&lt;P&gt;  at
org.apache.hadoop.hive.ql.exec.tez.TezProcessor.initializeAndRunProcessor(TezProcessor.java:171)&lt;/P&gt;&lt;P&gt;  at
org.apache.hadoop.hive.ql.exec.tez.TezProcessor.run(TezProcessor.java:137)&lt;/P&gt;&lt;P&gt;  at org.apache.tez.runtime.LogicalIOProcessorRuntimeTask.run(LogicalIOProcessorRuntimeTask.java:344)&lt;/P&gt;&lt;P&gt;  at
org.apache.tez.runtime.task.TezTaskRunner$TaskRunnerCallable$1.run(TezTaskRunner.java:179)&lt;/P&gt;&lt;P&gt;  at
org.apache.tez.runtime.task.TezTaskRunner$TaskRunnerCallable$1.run(TezTaskRunner.java:171)&lt;/P&gt;&lt;P&gt;   at
java.security.AccessController.doPrivileged(Native Method)&lt;/P&gt;&lt;P&gt;  at
javax.security.auth.Subject.doAs(Subject.java:415)&lt;/P&gt;&lt;P&gt;  at
org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1657)&lt;/P&gt;&lt;P&gt;  at
org.apache.tez.runtime.task.TezTaskRunner$TaskRunnerCallable.callInternal(TezTaskRunner.java:171)&lt;/P&gt;&lt;P&gt;  at
org.apache.tez.runtime.task.TezTaskRunner$TaskRunnerCallable.callInternal(TezTaskRunner.java:167)&lt;/P&gt;&lt;P&gt;  at org.apache.tez.common.CallableWithNdc.call(CallableWithNdc.java:36)&lt;/P&gt;&lt;P&gt;  at
java.util.concurrent.FutureTask.run(FutureTask.java:262)&lt;/P&gt;&lt;P&gt;  at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)&lt;/P&gt;&lt;P&gt;  at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)&lt;/P&gt;&lt;P&gt;  at
java.lang.Thread.run(Thread.java:745)&lt;/P&gt;&lt;P&gt;Caused by: java.lang.RuntimeException:
org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while
processing row
{"key":"1","pat_id":"101"}&lt;/P&gt;&lt;P&gt;at
org.apache.hadoop.hive.ql.exec.tez.MapRecordSource.processRow(MapRecordSource.java:91)&lt;/P&gt;&lt;P&gt;  at
org.apache.hadoop.hive.ql.exec.tez.MapRecordSource.pushRecord(MapRecordSource.java:68)&lt;/P&gt;&lt;P&gt;  at
org.apache.hadoop.hive.ql.exec.tez.MapRecordProcessor.run(MapRecordProcessor.java:310)&lt;/P&gt;&lt;P&gt;  at
org.apache.hadoop.hive.ql.exec.tez.TezProcessor.initializeAndRunProcessor(TezProcessor.java:148)&lt;/P&gt;&lt;P&gt;  ... 14 more&lt;/P&gt;&lt;P&gt;Caused by: org.apache.hadoop.hive.ql.metadata.HiveException:
Hive Runtime Error while processing row
{"key":"1","pat_id":"101"}&lt;/P&gt;&lt;P&gt;  at
org.apache.hadoop.hive.ql.exec.MapOperator.process(MapOperator.java:545)&lt;/P&gt;&lt;P&gt;  at
org.apache.hadoop.hive.ql.exec.tez.MapRecordSource.processRow(MapRecordSource.java:83)&lt;/P&gt;&lt;P&gt;  ... 17 more&lt;/P&gt;&lt;P&gt;Caused by: org.apache.hadoop.hive.ql.metadata.HiveException:
Unexpected exception: org.apache.hadoop.hive.serde2.SerDeException:
java.io.IOException: HBase row key cannot be NULL&lt;/P&gt;&lt;P&gt;  at
org.apache.hadoop.hive.ql.exec.MapJoinOperator.process(MapJoinOperator.java:426)&lt;/P&gt;&lt;P&gt;-Datta&lt;/P&gt;</description>
      <pubDate>Tue, 24 May 2016 03:25:45 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HBase-row-key-cannot-be-NULL-error-in-Hive-Hbase-copy-tables/m-p/163534#M29365</guid>
      <dc:creator>dattatri_chandr</dc:creator>
      <dc:date>2016-05-24T03:25:45Z</dc:date>
    </item>
    <item>
      <title>Re: ​HBase row key cannot be NULL error in Hive-Hbase copy tables</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HBase-row-key-cannot-be-NULL-error-in-Hive-Hbase-copy-tables/m-p/163535#M29366</link>
      <description>&lt;P&gt;Your insert statement did not contain the key. Should be:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;insert into dchandra.trial_dest(key, pat_id) select src.key, src.pat_id from dchandra.trial_src src join dchandra.trial_dest dest on src.key=dest.key;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;,&lt;P&gt;When you ran:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;insert into dchandra.trial_dest(pat_id) select src.pat_id from dchandra.trial_src src join dchandra.trial_dest dest on src.key=dest.key;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;You did not include the key in your insert statement. Should it be:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;insert into dchandra.trial_dest(key, pat_id) &lt;/EM&gt;&lt;/STRONG&gt;&lt;STRONG&gt;&lt;EM&gt;select src.key, src.pat_id from dchandra.trial_src src join dchandra.trial_dest dest on src.key=dest.key;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 24 May 2016 03:38:51 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HBase-row-key-cannot-be-NULL-error-in-Hive-Hbase-copy-tables/m-p/163535#M29366</guid>
      <dc:creator>ashu1</dc:creator>
      <dc:date>2016-05-24T03:38:51Z</dc:date>
    </item>
    <item>
      <title>Re: ​HBase row key cannot be NULL error in Hive-Hbase copy tables</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HBase-row-key-cannot-be-NULL-error-in-Hive-Hbase-copy-tables/m-p/163536#M29367</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/418/ashu.html" nodeid="418"&gt;@ashu&lt;/A&gt; Thanks. Resolved it.&lt;/P&gt;</description>
      <pubDate>Tue, 24 May 2016 03:44:54 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HBase-row-key-cannot-be-NULL-error-in-Hive-Hbase-copy-tables/m-p/163536#M29367</guid>
      <dc:creator>dattatri_chandr</dc:creator>
      <dc:date>2016-05-24T03:44:54Z</dc:date>
    </item>
  </channel>
</rss>

