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

Use HBase's TableMapReduceUtil.convertScanToString() API instead of using the method implementation.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • HBase Handler
    • None

    Description

      Use HBase's TableMapReduceUtil.convertScanToString() API instead of using the method implementation.

      https://github.com/apache/hive/blob/master/hbase-handler/src/java/org/apache/hadoop/hive/hbase/HiveHBaseTableSnapshotInputFormat.java#L49-L55

      // TODO: Once HBASE-11163 is completed, use that API, or switch to
        // using mapreduce version of the APIs. rather than mapred
        // Copied from HBase's TableMapreduceUtil since it is not public API
        static String convertScanToString(Scan scan) throws IOException {
          ClientProtos.Scan proto = ProtobufUtil.toScan(scan);
          return Base64.getEncoder().encodeToString(proto.toByteArray());
        }

      Currently org.apache.hadoop.hive.hbase.HiveHBaseTableSnapshotInputFormat has 

      convertScanToString() API, the implementation was copied from HBase code at that time because the API was not public. Now its public so we can directly use the API from HBase to avoid issues/changes like https://issues.apache.org/jira/browse/HIVE-22613.

      Attachments

        Activity

          People

            Dayakar Dayakar M
            Dayakar Dayakar M
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: