You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by dm...@apache.org on 2019/12/29 02:27:54 UTC

[hive] branch master updated: HIVE-22614: Replace Base64 in hive-hbase-handler Package (David Mollitor, reviewed by Ashutosh Chauhan)

This is an automated email from the ASF dual-hosted git repository.

dmollitor pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hive.git


The following commit(s) were added to refs/heads/master by this push:
     new 46d2f2a  HIVE-22614: Replace Base64 in hive-hbase-handler Package (David Mollitor, reviewed by Ashutosh Chauhan)
46d2f2a is described below

commit 46d2f2a8a0a9e0102153d51e49ca52770e07b04b
Author: David Mollitor <dm...@apache.org>
AuthorDate: Sat Dec 28 21:25:07 2019 -0500

    HIVE-22614: Replace Base64 in hive-hbase-handler Package (David Mollitor, reviewed by Ashutosh Chauhan)
---
 .../apache/hadoop/hive/hbase/HiveHBaseTableSnapshotInputFormat.java   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hbase-handler/src/java/org/apache/hadoop/hive/hbase/HiveHBaseTableSnapshotInputFormat.java b/hbase-handler/src/java/org/apache/hadoop/hive/hbase/HiveHBaseTableSnapshotInputFormat.java
index 77dff5c..cd0a990 100644
--- a/hbase-handler/src/java/org/apache/hadoop/hive/hbase/HiveHBaseTableSnapshotInputFormat.java
+++ b/hbase-handler/src/java/org/apache/hadoop/hive/hbase/HiveHBaseTableSnapshotInputFormat.java
@@ -18,7 +18,6 @@
 
 package org.apache.hadoop.hive.hbase;
 
-import org.apache.commons.codec.binary.Base64;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.hbase.client.Result;
 import org.apache.hadoop.hbase.client.Scan;
@@ -36,6 +35,7 @@ import org.apache.hadoop.mapred.RecordReader;
 import org.apache.hadoop.mapred.Reporter;
 
 import java.io.IOException;
+import java.util.Base64;
 import java.util.List;
 
 public class HiveHBaseTableSnapshotInputFormat
@@ -54,7 +54,7 @@ public class HiveHBaseTableSnapshotInputFormat
   // 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.encodeBase64String(proto.toByteArray());
+    return Base64.getEncoder().encodeToString(proto.toByteArray());
   }
 
   @Override