Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-5680

Hive writes to HBase table throws NullPointerException

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 0.12.0
    • Fix Version/s: 0.13.0
    • Component/s: HBase Handler
    • Labels:
    • Environment:

      Hadoop 1.0.4, HBase 0.94.6.1, Hive 0.12.0

    • Tags:
      hbase-handler

      Description

      When I create hive external table for hbase, and insert data into it under hive shell environment. It can run successfully. but after I quit it and reconnect with bin/hive command, the insert operation throws NullPointerException.

      [hadoop@dn01 hive]$ bin/hive
      hive> CREATE EXTERNAL TABLE `test`(`key` string, `uid` int) STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler' WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,d:uid#b")TBLPROPERTIES("hbase.table.name" = "test");
      ......
      hive> insert into table test select key, uid from reg;
      ......successfully
      hive> quit;
      [hadoop@dn01 hive]$ bin/hive
      hive> insert into table test select key, uid from reg;
      Total MapReduce jobs = 1
      Launching Job 1 out of 1
      Number of reduce tasks is set to 0 since there's no reduce operator
      java.lang.NullPointerException
      at java.util.Hashtable.put(Hashtable.java:394)
      at java.util.Properties.setProperty(Properties.java:143)
      at org.apache.hadoop.conf.Configuration.set(Configuration.java:438)
      at org.apache.hadoop.hive.ql.exec.Utilities.copyTableJobPropertiesToConf(Utilities.java:1840)
      at org.apache.hadoop.hive.ql.exec.FileSinkOperator.checkOutputSpecs(FileSinkOperator.java:947)
      at org.apache.hadoop.hive.ql.io.HiveOutputFormatImpl.checkOutputSpecs(HiveOutputFormatImpl.java:67)
      at org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:889)
      at org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:850)
      at java.security.AccessController.doPrivileged(Native Method)
      at javax.security.auth.Subject.doAs(Subject.java:396)
      at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1121)
      at org.apache.hadoop.mapred.JobClient.submitJobInternal(JobClient.java:850)
      at org.apache.hadoop.mapred.JobClient.submitJob(JobClient.java:824)
      at org.apache.hadoop.hive.ql.exec.mr.ExecDriver.execute(ExecDriver.java:425)
      at org.apache.hadoop.hive.ql.exec.mr.MapRedTask.execute(MapRedTask.java:144)
      at org.apache.hadoop.hive.ql.exec.Task.executeTask(Task.java:151)
      at org.apache.hadoop.hive.ql.exec.TaskRunner.runSequential(TaskRunner.java:65)
      at org.apache.hadoop.hive.ql.Driver.launchTask(Driver.java:1414)
      at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:1192)
      at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1020)
      at org.apache.hadoop.hive.ql.Driver.run(Driver.java:888)
      at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:259)
      at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:216)
      at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:413)
      at org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:781)
      at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:675)
      at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:614)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
      Job Submission failed with exception 'java.lang.NullPointerException(null)'
      FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                swarnim Swarnim Kulkarni
                Reporter:
                JackZheng ZhuangjieZheng
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: