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

When querying HBase table, task fails with exception: java.lang.IllegalAccessError: com/google/protobuf/HBaseZeroCopyByteString

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Later
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Spark
    • Labels:
      None
    • Environment:

      Spark-1.0.0, HBase-0.98.2

      Description

      When I run select count( * ) on an HBase table, spark task fails with:

      java.lang.IllegalAccessError: com/google/protobuf/HBaseZeroCopyByteString
      at org.apache.hadoop.hbase.protobuf.RequestConverter.buildRegionSpecifier(RequestConverter.java:910)
      at org.apache.hadoop.hbase.protobuf.RequestConverter.buildGetRowOrBeforeRequest(RequestConverter.java:131)
      at org.apache.hadoop.hbase.protobuf.ProtobufUtil.getRowOrBefore(ProtobufUtil.java:1403)
      at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegionInMeta(HConnectionManager.java:1181)
      at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegion(HConnectionManager.java:1059)
      at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegion(HConnectionManager.java:1016)
      at org.apache.hadoop.hbase.client.HTable.finishSetup(HTable.java:326)
      at org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:192)
      at org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:165)
      at org.apache.hadoop.hive.hbase.HiveHBaseTableInputFormat.getRecordReader(HiveHBaseTableInputFormat.java:93)
      at org.apache.hadoop.hive.ql.io.HiveInputFormat.getRecordReader(HiveInputFormat.java:241)
      at org.apache.spark.rdd.HadoopRDD$$anon$1.<init>(HadoopRDD.scala:193)
      at org.apache.spark.rdd.HadoopRDD.compute(HadoopRDD.scala:184)
      at org.apache.spark.rdd.HadoopRDD.compute(HadoopRDD.scala:93)
      at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:262)
      at org.apache.spark.rdd.RDD.iterator(RDD.scala:229)
      at org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:35)
      at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:262)
      at org.apache.spark.rdd.RDD.iterator(RDD.scala:229)
      at org.apache.spark.scheduler.ShuffleMapTask.runTask(ShuffleMapTask.scala:158)
      at org.apache.spark.scheduler.ShuffleMapTask.runTask(ShuffleMapTask.scala:99)
      at org.apache.spark.scheduler.Task.run(Task.scala:51)

      NO PRECOMMIT TESTS. This is for spark branch only.

        Issue Links

          Activity

          Hide
          jxiang Jimmy Xiang added a comment -

          I see. Thanks for bringing up this issue. There is not much we can do in Hive side as I know for now. Thanks.

          Show
          jxiang Jimmy Xiang added a comment - I see. Thanks for bringing up this issue. There is not much we can do in Hive side as I know for now. Thanks.
          Hide
          lirui Rui Li added a comment -

          Jimmy Xiang - thanks for the update!
          I know there's workarounds to this issue. The JIRA here is mainly to make sure if there's anything else we should do. If you think we're good with the workarounds, please feel free to resolve this issue

          Show
          lirui Rui Li added a comment - Jimmy Xiang - thanks for the update! I know there's workarounds to this issue. The JIRA here is mainly to make sure if there's anything else we should do. If you think we're good with the workarounds, please feel free to resolve this issue
          Hide
          jxiang Jimmy Xiang added a comment -

          Rui Li, does this help? This should be a generic problem that applies to other branches too.

          Show
          jxiang Jimmy Xiang added a comment - Rui Li , does this help? This should be a generic problem that applies to other branches too.
          Hide
          jxiang Jimmy Xiang added a comment -

          This relates to HBASE-10304. It's decided that we just document the work-arounds in HBase, instead of any code change.

          This is the list of suggested work-arounds:

          $ HADOOP_CLASSPATH=/path/to/hbase-protocol.jar:/etc/hbase/conf hadoop jar MyApp-job.jar ...
          $ HADOOP_CLASSPATH=$(hbase mapredcp):/etc/hbase/conf hadoop jar MyApp-job.jar ...
          $ HADOOP_CLASSPATH=$(hbase classpath) hadoop jar MyApp-job.jar ...
          $ HADOOP_CLASSPATH=$(hbase mapredcp):/etc/hbase/conf hadoop jar MyApp.jar MyJobMainClass -libjars $(hbase mapredcp | tr ':' ',') ...
          

          Basically, the idea is to make sure hbase-protocol.jar is in the hadoop classpath.

          Show
          jxiang Jimmy Xiang added a comment - This relates to HBASE-10304 . It's decided that we just document the work-arounds in HBase, instead of any code change. This is the list of suggested work-arounds: $ HADOOP_CLASSPATH=/path/to/hbase-protocol.jar:/etc/hbase/conf hadoop jar MyApp-job.jar ... $ HADOOP_CLASSPATH=$(hbase mapredcp):/etc/hbase/conf hadoop jar MyApp-job.jar ... $ HADOOP_CLASSPATH=$(hbase classpath) hadoop jar MyApp-job.jar ... $ HADOOP_CLASSPATH=$(hbase mapredcp):/etc/hbase/conf hadoop jar MyApp.jar MyJobMainClass -libjars $(hbase mapredcp | tr ':' ',') ... Basically, the idea is to make sure hbase-protocol.jar is in the hadoop classpath.
          Hide
          xuefuz Xuefu Zhang added a comment -

          Assign to Jimmy as he has the expertise on HBase.

          Show
          xuefuz Xuefu Zhang added a comment - Assign to Jimmy as he has the expertise on HBase.
          Hide
          lirui Rui Li added a comment -

          The workaround mentioned in HBASE-10877 can solve the problem.
          Not sure if there's anything to be done on Hive or Spark side.

          Show
          lirui Rui Li added a comment - The workaround mentioned in HBASE-10877 can solve the problem. Not sure if there's anything to be done on Hive or Spark side.

            People

            • Assignee:
              jxiang Jimmy Xiang
              Reporter:
              lirui Rui Li
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development