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/28 18:37:53 UTC

[hive] branch master updated: HIVE-22614: Replace Base64 in hive-jdbc 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 1b79044  HIVE-22614: Replace Base64 in hive-jdbc Package (David Mollitor, reviewed by Ashutosh Chauhan)
1b79044 is described below

commit 1b7904485a898601801e8f371b9bf76c143d3a82
Author: David Mollitor <dm...@apache.org>
AuthorDate: Sat Dec 28 13:37:14 2019 -0500

    HIVE-22614: Replace Base64 in hive-jdbc Package (David Mollitor, reviewed by Ashutosh Chauhan)
---
 jdbc/src/java/org/apache/hive/jdbc/HiveStatement.java | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/jdbc/src/java/org/apache/hive/jdbc/HiveStatement.java b/jdbc/src/java/org/apache/hive/jdbc/HiveStatement.java
index 0d0e744..c6ac793 100644
--- a/jdbc/src/java/org/apache/hive/jdbc/HiveStatement.java
+++ b/jdbc/src/java/org/apache/hive/jdbc/HiveStatement.java
@@ -18,7 +18,6 @@
 
 package org.apache.hive.jdbc;
 
-import org.apache.commons.codec.binary.Base64;
 import org.apache.commons.lang.StringUtils;
 import org.apache.hadoop.hive.common.classification.InterfaceAudience.LimitedPrivate;
 import org.apache.hive.jdbc.logs.InPlaceUpdateStream;
@@ -50,6 +49,7 @@ import java.sql.SQLFeatureNotSupportedException;
 import java.sql.SQLTimeoutException;
 import java.sql.SQLWarning;
 import java.util.ArrayList;
+import java.util.Base64;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -992,9 +992,7 @@ public class HiveStatement implements java.sql.Statement {
     if (stmtHandle != null) {
       // Set on the server side.
       // @see org.apache.hive.service.cli.operation.SQLOperation#prepare
-      String guid64 =
-          Base64.encodeBase64URLSafeString(stmtHandle.getOperationId().getGuid()).trim();
-      return guid64;
+      return Base64.getUrlEncoder().encodeToString(stmtHandle.getOperationId().getGuid()).trim();
     }
     return null;
   }