[KYUUBI #6346] Change Kyuubi JDBC Driver default port and make it effective

# 🔍 Description
## Issue References 🔗

This pull request fixes #6346

## Describe Your Solution 🔧

Change Kyuubi JDBC Driver default port and make it effective.

## Types of changes 🔖

- [X] Bugfix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)

## Test Plan 🧪

#### Behavior Without This Pull Request ⚰️

#### Behavior With This Pull Request 🎉

#### Related Unit Tests

---

# Checklist 📝

- [X] This patch was not authored or co-authored using [Generative Tooling](https://www.apache.org/legal/generative-tooling.html)

**Be nice. Be informative.**

Closes #6347 from wForget/KYUUBI-6346.

Closes #6346

0a3085205 [wforget] [KYUUBI #6346] Change Kyuubi JDBC Driver default port and make it effective

Authored-by: wforget <643348094@qq.com>
Signed-off-by: wforget <643348094@qq.com>
This commit is contained in:
wforget 2024-05-08 10:27:54 +08:00
parent 9075fbb623
commit 4f76373b7f

View File

@ -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 class Utils {
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();