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

HCatalog e2e test Pig_HBase_1 and Pig_HBase_2 are failing with ClassCastException

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.12.0
    • Fix Version/s: 0.13.0
    • Component/s: HCatalog
    • Labels:
      None

      Description

      HCatalog e2e test Pig_HBase_1 tries to read data from a table it created using the org.apache.hcatalog.hbase.HBaseHCatStorageHandler using the hcat loader org.apache.hive.hcatalog.pig.HCatLoader(). Following is the pig script.

      a = load 'pig_hbase_1' using org.apache.hive.hcatalog.pig.HCatLoader(); store a into '/user/hcat/out/root-1380933875-pig.conf/Pig_HBase_1_0_benchmark.out';
      

      Following error is thrown in the log:

      org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobCreationException: ERROR 2017: Internal error creating job configuration.
              at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler.getJob(JobControlCompiler.java:850)
              at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler.compile(JobControlCompiler.java:296)
              at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher.launchPig(MapReduceLauncher.java:190)
              at org.apache.pig.PigServer.launchPlan(PigServer.java:1322)
              at org.apache.pig.PigServer.executeCompiledLogicalPlan(PigServer.java:1307)
              at org.apache.pig.PigServer.execute(PigServer.java:1297)
              at org.apache.pig.PigServer.executeBatch(PigServer.java:375)
              at org.apache.pig.PigServer.executeBatch(PigServer.java:353)
              at org.apache.pig.tools.grunt.GruntParser.executeBatch(GruntParser.java:140)
              at org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:202)
              at org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:173)
              at org.apache.pig.tools.grunt.Grunt.exec(Grunt.java:84)
              at org.apache.pig.Main.run(Main.java:607)
              at org.apache.pig.Main.main(Main.java:156)
              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:212)
      Caused by: java.io.IOException: java.lang.ClassCastException: org.apache.hive.hcatalog.mapreduce.InputJobInfo cannot be cast to org.apache.hcatalog.mapreduce.InputJobInfo
              at org.apache.hive.hcatalog.mapreduce.HCatInputFormat.setInput(HCatInputFormat.java:87)
              at org.apache.hive.hcatalog.mapreduce.HCatInputFormat.setInput(HCatInputFormat.java:63)
              at org.apache.hive.hcatalog.pig.HCatLoader.setLocation(HCatLoader.java:119)
              at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler.getJob(JobControlCompiler.java:475)
              ... 18 more
      Caused by: java.lang.ClassCastException: org.apache.hive.hcatalog.mapreduce.InputJobInfo cannot be cast to org.apache.hcatalog.mapreduce.InputJobInfo
              at org.apache.hcatalog.hbase.HBaseHCatStorageHandler.configureInputJobProperties(HBaseHCatStorageHandler.java:106)
              at org.apache.hive.hcatalog.common.HCatUtil.getInputJobProperties(HCatUtil.java:466)
              at org.apache.hive.hcatalog.mapreduce.InitializeInput.extractPartInfo(InitializeInput.java:161)
              at org.apache.hive.hcatalog.mapreduce.InitializeInput.getInputJobInfo(InitializeInput.java:137)
              at org.apache.hive.hcatalog.mapreduce.InitializeInput.setInput(InitializeInput.java:86)
              at org.apache.hive.hcatalog.mapreduce.HCatInputFormat.setInput(HCatInputFormat.java:85)
              ... 21 more
      

      The pig script should instead be using the org.apache.hcatalog.pig.HCatLoader() instead.

        Attachments

        1. HIVE-5452.patch
          3 kB
          Deepesh Khandelwal

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: