From 0a3085205bbf3b34386c9ba5a39ce81703e1e2e4 Mon Sep 17 00:00:00 2001 From: wforget <643348094@qq.com> Date: Mon, 29 Apr 2024 13:48:47 +0800 Subject: [PATCH] [KYUUBI #6346] Change Kyuubi JDBC Driver default port and make it effective --- .../src/main/java/org/apache/kyuubi/jdbc/hive/Utils.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kyuubi-hive-jdbc/src/main/java/org/apache/kyuubi/jdbc/hive/Utils.java b/kyuubi-hive-jdbc/src/main/java/org/apache/kyuubi/jdbc/hive/Utils.java index 881a9602755..b9f256f69bf 100644 --- a/kyuubi-hive-jdbc/src/main/java/org/apache/kyuubi/jdbc/hive/Utils.java +++ b/kyuubi-hive-jdbc/src/main/java/org/apache/kyuubi/jdbc/hive/Utils.java @@ -42,7 +42,7 @@ public class Utils { Arrays.asList("jdbc:hive2://", "jdbc:kyuubi://"); /** If host is provided, without a port. */ - static final String DEFAULT_PORT = "10000"; + static final String DEFAULT_PORT = "10009"; // To parse the intermediate URI as a Java URI, we'll give a dummy authority(dummyhost:00000). // Later, we'll substitute the dummy authority for a resolved authority. static final String dummyAuthorityString = "dummyhost:00000"; @@ -381,8 +381,8 @@ public static JdbcConnectionParams extractURLComponents(String uri, Properties i if (port <= 0) { port = Integer.parseInt(Utils.DEFAULT_PORT); } - connParams.setHost(jdbcBaseURI.getHost()); - connParams.setPort(jdbcBaseURI.getPort()); + connParams.setHost(host); + connParams.setPort(port); } // We check for invalid host, port while configuring connParams with configureConnParams() authorityStr = connParams.getHost() + ":" + connParams.getPort();