Skip to content

Commit

Permalink
[AMORO-2862] fix bug: A null pointer error occurs when using S3 as St…
Browse files Browse the repository at this point in the history
…orage 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 <zhaoshuaihua@kingsoft.com>
Co-authored-by: ZhouJinsong <zhoujinsong0505@163.com>
Co-authored-by: baiyangtx <xiangnebula@163.com>
  • Loading branch information
4 people authored May 30, 2024
1 parent de0e6ff commit ad46f97
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
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;

Expand Down Expand Up @@ -123,7 +124,7 @@ public TerminalSession create(TableMetaStore metaStore, Configurations configura
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());
}
Expand Down

0 comments on commit ad46f97

Please sign in to comment.