[ 
https://issues.apache.org/jira/browse/HIVE-26330?focusedWorklogId=784568&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-784568
 ]

ASF GitHub Bot logged work on HIVE-26330:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 24/Jun/22 11:44
            Start Date: 24/Jun/22 11:44
    Worklog Time Spent: 10m 
      Work Description: AdobeStu commented on PR #3371:
URL: https://github.com/apache/hive/pull/3371#issuecomment-1165493477

   > > 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 😄
   
   If we changed 45 to ... like 450, the substring can only show zhe zookeeper 
connection url we input like host1:2181,host2:2181,host3:2181. We still can't 
get server host. For example hiveserver2host:10000




Issue Time Tracking
-------------------

    Worklog Id:     (was: 784568)
    Time Spent: 1h 20m  (was: 1h 10m)

> 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 20m
>  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)

Reply via email to