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 <[email protected]>
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 <[email protected]>
    Co-authored-by: ZhouJinsong <[email protected]>
    Co-authored-by: baiyangtx <[email protected]>
---
 .../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());
     }

Reply via email to