You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@amoro.apache.org by ba...@apache.org on 2024/05/30 02:39:57 UTC

(amoro) branch master updated: [AMORO-2862] fix bug: A null pointer error occurs when using S3 as Storage when using the kyuubi terminal. (#2863)

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

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


The following commit(s) were added to refs/heads/master by this push:
     new ad46f97ca [AMORO-2862] fix bug: A null pointer error occurs when using S3 as Storage when using the kyuubi terminal. (#2863)
ad46f97ca is described below

commit ad46f97ca51e47407f43a99829efe058a7aa3a18
Author: berylzsh <50...@users.noreply.github.com>
AuthorDate: Thu May 30 10:39:53 2024 +0800

    [AMORO-2862] fix bug: A null pointer error occurs when using S3 as Storage when using the kyuubi terminal. (#2863)
    
    * [AMORO-2862] Fix bug #2862 A null pointer error occurs when using S3 as Storage when using the kyuubi terminal.
    
    * [AMORO-2862] Fix bug #2862 A null pointer error occurs when using S3 as Storage when using the kyuubi terminal.
    
    * [AMORO-2862] Fix bug #2862 A null pointer error occurs when using S3 as Storage when using the kyuubi terminal.
    
    * [AMORO-2862] Fix bug #2862 A null pointer error occurs when using S3 as Storage when using the kyuubi terminal.
    
    * [AMORO-2862] Fix bug #2862 A null pointer error occurs when using S3 as Storage when using the kyuubi terminal.
    
    * [AMORO-2862] Fix bug #2862 A null pointer error occurs when using S3 as Storage when using the kyuubi terminal.
    
    ---------
    
    Co-authored-by: zhaoshuaihua <zh...@kingsoft.com>
    Co-authored-by: ZhouJinsong <zh...@163.com>
    Co-authored-by: baiyangtx <xi...@163.com>
---
 .../amoro/server/terminal/kyuubi/KyuubiTerminalSessionFactory.java     | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/amoro-ams/amoro-ams-server/src/main/java/org/apache/amoro/server/terminal/kyuubi/KyuubiTerminalSessionFactory.java b/amoro-ams/amoro-ams-server/src/main/java/org/apache/amoro/server/terminal/kyuubi/KyuubiTerminalSessionFactory.java
index 727299f09..3469cb665 100644
--- a/amoro-ams/amoro-ams-server/src/main/java/org/apache/amoro/server/terminal/kyuubi/KyuubiTerminalSessionFactory.java
+++ b/amoro-ams/amoro-ams-server/src/main/java/org/apache/amoro/server/terminal/kyuubi/KyuubiTerminalSessionFactory.java
@@ -37,6 +37,7 @@ import java.sql.Connection;
 import java.sql.SQLException;
 import java.util.List;
 import java.util.Map;
+import java.util.Objects;
 import java.util.Properties;
 import java.util.stream.Collectors;
 
@@ -123,7 +124,7 @@ public class KyuubiTerminalSessionFactory implements TerminalSessionFactory {
     sessionConf.put("jdbc.url", kyuubiJdbcUrl);
     Properties properties = new Properties();
 
-    if (!metaStore.isKerberosAuthMethod()) {
+    if (!metaStore.isKerberosAuthMethod() && Objects.nonNull(metaStore.getHadoopUsername())) {
       properties.put(JdbcConnectionParams.AUTH_USER, metaStore.getHadoopUsername());
       sessionConf.put(JdbcConnectionParams.AUTH_USER, metaStore.getHadoopUsername());
     }