[
https://issues.apache.org/jira/browse/HIVE-26330?focusedWorklogId=784553&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-784553
]
ASF GitHub Bot logged work on HIVE-26330:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 24/Jun/22 11:15
Start Date: 24/Jun/22 11:15
Worklog Time Spent: 10m
Work Description: pvary commented on PR #3371:
URL: https://github.com/apache/hive/pull/3371#issuecomment-1165472084
> we use: `!connect
jdbc:hive2://host1:2181,host2:2181,host3:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2;`
>
> then we may get: `0: jdbc:hive2://host1:2181>`
I think it is generated by this code in `BeeLine.java`:
```
static String getPromptForBeeline(String url) {
if (url == null || url.length() == 0) {
url = "beeline";
}
if (url.indexOf(";") > -1) {
url = url.substring(0, url.indexOf(";"));
}
if (url.indexOf("?") > -1) {
url = url.substring(0, url.indexOf("?"));
}
if (url.length() > 45) {
url = url.substring(0, 45);
}
return url;
}
```
So I guess that your URL is 45 char long 😄
Issue Time Tracking
-------------------
Worklog Id: (was: 784553)
Time Spent: 1h 10m (was: 1h)
> Beeline client cannot get correct connection url in hive connection using
> zookeeper
> -----------------------------------------------------------------------------------
>
> Key: HIVE-26330
> URL: https://issues.apache.org/jira/browse/HIVE-26330
> Project: Hive
> Issue Type: Bug
> Components: Beeline
> Reporter: Finch X
> Priority: Critical
> Labels: pull-request-available
> Attachments: image-2022-06-15-14-12-48-739.png
>
> Time Spent: 1h 10m
> Remaining Estimate: 0h
>
> Like the following picture:
> !image-2022-06-15-14-12-48-739.png!
> my connection string:
> !connect
> jdbc:hive2://ip1:port,ip2:port,ip3:port/default;principal=xxx;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2
> Â
--
This message was sent by Atlassian Jira
(v8.20.7#820007)