Dayakar M created HIVE-27750:
--------------------------------

             Summary: Use HBase's TableMapReduceUtil.convertScanToString() API 
instead of using the method implementation.
                 Key: HIVE-27750
                 URL: https://issues.apache.org/jira/browse/HIVE-27750
             Project: Hive
          Issue Type: Improvement
          Components: HBase Handler
            Reporter: Dayakar M
            Assignee: Dayakar M


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]
{noformat}
// 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());
  }{noformat}
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/chnages like 
https://issues.apache.org/jira/browse/HIVE-22613.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to