diff --git a/kyuubi-common/src/main/scala/org/apache/kyuubi/service/authentication/HadoopThriftAuthBridgeServer.scala b/kyuubi-common/src/main/scala/org/apache/kyuubi/service/authentication/HadoopThriftAuthBridgeServer.scala index 845767c88..565ef0a84 100644 --- a/kyuubi-common/src/main/scala/org/apache/kyuubi/service/authentication/HadoopThriftAuthBridgeServer.scala +++ b/kyuubi-common/src/main/scala/org/apache/kyuubi/service/authentication/HadoopThriftAuthBridgeServer.scala @@ -196,7 +196,7 @@ object HadoopThriftAuthBridgeServer { def getPasswd(identifier: KyuubiDelegationTokenIdentifier): Array[Char] = { val passwd = secretMgr.retrievePassword(identifier) - Base64.getMimeEncoder.encodeToString(passwd).toCharArray + Base64.getEncoder.encodeToString(passwd).toCharArray } override def handle(callbacks: Array[Callback]): Unit = { diff --git a/kyuubi-common/src/main/scala/org/apache/kyuubi/util/KyuubiHadoopUtils.scala b/kyuubi-common/src/main/scala/org/apache/kyuubi/util/KyuubiHadoopUtils.scala index ad083f173..a3047d0f4 100644 --- a/kyuubi-common/src/main/scala/org/apache/kyuubi/util/KyuubiHadoopUtils.scala +++ b/kyuubi-common/src/main/scala/org/apache/kyuubi/util/KyuubiHadoopUtils.scala @@ -60,11 +60,11 @@ object KyuubiHadoopUtils extends Logging { val byteStream = new ByteArrayOutputStream creds.writeTokenStorageToStream(new DataOutputStream(byteStream)) - Base64.getMimeEncoder.encodeToString(byteStream.toByteArray) + Base64.getEncoder.encodeToString(byteStream.toByteArray) } def decodeCredentials(newValue: String): Credentials = { - val decoded = Base64.getMimeDecoder.decode(newValue) + val decoded = Base64.getDecoder.decode(newValue) val byteStream = new ByteArrayInputStream(decoded) val creds = new Credentials() diff --git a/kyuubi-common/src/test/scala/org/apache/kyuubi/operation/TClientTestUtils.scala b/kyuubi-common/src/test/scala/org/apache/kyuubi/operation/TClientTestUtils.scala index 7d2d69464..e5822277e 100644 --- a/kyuubi-common/src/test/scala/org/apache/kyuubi/operation/TClientTestUtils.scala +++ b/kyuubi-common/src/test/scala/org/apache/kyuubi/operation/TClientTestUtils.scala @@ -127,8 +127,8 @@ object TClientTestUtils extends Logging { val launchOpHandleOpt = if (guid != null && secret != null) { val launchHandleId = new THandleIdentifier( - ByteBuffer.wrap(Base64.getMimeDecoder.decode(guid)), - ByteBuffer.wrap(Base64.getMimeDecoder.decode(secret))) + ByteBuffer.wrap(Base64.getDecoder.decode(guid)), + ByteBuffer.wrap(Base64.getDecoder.decode(secret))) Some(new TOperationHandle(launchHandleId, TOperationType.UNKNOWN, false)) } else None diff --git a/kyuubi-hive-jdbc/src/main/java/org/apache/kyuubi/jdbc/hive/KyuubiConnection.java b/kyuubi-hive-jdbc/src/main/java/org/apache/kyuubi/jdbc/hive/KyuubiConnection.java index 87872581c..8b6c8f50d 100644 --- a/kyuubi-hive-jdbc/src/main/java/org/apache/kyuubi/jdbc/hive/KyuubiConnection.java +++ b/kyuubi-hive-jdbc/src/main/java/org/apache/kyuubi/jdbc/hive/KyuubiConnection.java @@ -797,8 +797,8 @@ public class KyuubiConnection implements SQLConnection, KyuubiLoggable { if (launchEngineOpHandleGuid != null && launchEngineOpHandleSecret != null) { try { - byte[] guidBytes = Base64.getMimeDecoder().decode(launchEngineOpHandleGuid); - byte[] secretBytes = Base64.getMimeDecoder().decode(launchEngineOpHandleSecret); + byte[] guidBytes = Base64.getDecoder().decode(launchEngineOpHandleGuid); + byte[] secretBytes = Base64.getDecoder().decode(launchEngineOpHandleSecret); THandleIdentifier handleIdentifier = new THandleIdentifier(ByteBuffer.wrap(guidBytes), ByteBuffer.wrap(secretBytes)); launchEngineOpHandle = diff --git a/kyuubi-server/src/main/scala/org/apache/kyuubi/server/KyuubiTBinaryFrontendService.scala b/kyuubi-server/src/main/scala/org/apache/kyuubi/server/KyuubiTBinaryFrontendService.scala index f95ea5947..278aa67fe 100644 --- a/kyuubi-server/src/main/scala/org/apache/kyuubi/server/KyuubiTBinaryFrontendService.scala +++ b/kyuubi-server/src/main/scala/org/apache/kyuubi/server/KyuubiTBinaryFrontendService.scala @@ -90,10 +90,10 @@ final class KyuubiTBinaryFrontendService( val opHandleIdentifier = Handle.toTHandleIdentifier(launchEngineOp.getHandle.identifier) respConfiguration.put( KYUUBI_SESSION_ENGINE_LAUNCH_HANDLE_GUID, - Base64.getMimeEncoder.encodeToString(opHandleIdentifier.getGuid)) + Base64.getEncoder.encodeToString(opHandleIdentifier.getGuid)) respConfiguration.put( KYUUBI_SESSION_ENGINE_LAUNCH_HANDLE_SECRET, - Base64.getMimeEncoder.encodeToString(opHandleIdentifier.getSecret)) + Base64.getEncoder.encodeToString(opHandleIdentifier.getSecret)) respConfiguration.put(KYUUBI_SESSION_ENGINE_LAUNCH_SUPPORT_RESULT, true.toString)