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

hcat.py script does not correctly load the hbase storage handler jars

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.13.0
    • 0.14.0
    • HCatalog
    • None

    Description

      Currently queries using the HBaseHCatStorageHandler when run using hcat.py fail. Example query

      create table pig_hbase_1(key string, age string, gpa string)
      STORED BY 'org.apache.hcatalog.hbase.HBaseHCatStorageHandler'
      TBLPROPERTIES ('hbase.columns.mapping'=':key,info:age,info:gpa');
      

      Following error is seen in the hcat logs:

      2014-03-18 08:25:49,437 ERROR ql.Driver (SessionState.java:printError(541)) - FAILED: SemanticException java.io.IOException: Error in loading storage handler.org.apache.hcatalog.hbase.HBaseHCatStorageHandler
      org.apache.hadoop.hive.ql.parse.SemanticException: java.io.IOException: Error in loading storage handler.org.apache.hcatalog.hbase.HBaseHCatStorageHandler
      	at org.apache.hive.hcatalog.cli.SemanticAnalysis.CreateTableHook.postAnalyze(CreateTableHook.java:208)
      	at org.apache.hive.hcatalog.cli.SemanticAnalysis.HCatSemanticAnalyzer.postAnalyze(HCatSemanticAnalyzer.java:242)
      	at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:402)
      	at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:295)
      	at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:949)
      	at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:997)
      	at org.apache.hadoop.hive.ql.Driver.run(Driver.java:885)
      	at org.apache.hadoop.hive.ql.Driver.run(Driver.java:875)
      	at org.apache.hive.hcatalog.cli.HCatDriver.run(HCatDriver.java:43)
      	at org.apache.hive.hcatalog.cli.HCatCli.processCmd(HCatCli.java:259)
      	at org.apache.hive.hcatalog.cli.HCatCli.processLine(HCatCli.java:213)
      	at org.apache.hive.hcatalog.cli.HCatCli.main(HCatCli.java:172)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      	at java.lang.reflect.Method.invoke(Unknown Source)
      	at org.apache.hadoop.util.RunJar.main(RunJar.java:212)
      Caused by: java.io.IOException: Error in loading storage handler.org.apache.hcatalog.hbase.HBaseHCatStorageHandler
      	at org.apache.hive.hcatalog.common.HCatUtil.getStorageHandler(HCatUtil.java:432)
      	at org.apache.hive.hcatalog.cli.SemanticAnalysis.CreateTableHook.postAnalyze(CreateTableHook.java:199)
      	... 16 more
      Caused by: java.lang.ClassNotFoundException: org.apache.hcatalog.hbase.HBaseHCatStorageHandler
      	at java.net.URLClassLoader$1.run(Unknown Source)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at java.net.URLClassLoader.findClass(Unknown Source)
      	at java.lang.ClassLoader.loadClass(Unknown Source)
      	at java.lang.ClassLoader.loadClass(Unknown Source)
      	at java.lang.Class.forName0(Native Method)
      	at java.lang.Class.forName(Unknown Source)
      	at org.apache.hive.hcatalog.common.HCatUtil.getStorageHandler(HCatUtil.java:426)
      	... 17 more
      

      The problem is that the hbaseStorageJar is incorrect with the merging of hcat into hive. Also as per HIVE-6695 we should add the HBASE_LIB in the classpath.

      Attachments

        1. HIVE-6698.patch
          1 kB
          Deepesh Khandelwal

        Activity

          People

            deepesh Deepesh Khandelwal
            deepesh Deepesh Khandelwal
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: