[
https://issues.apache.org/jira/browse/HIVE-23581?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
shinsunwoo updated HIVE-23581:
------------------------------
Attachment: HIVE-23581.01.patch
> On service discovery mode, the initial port of hiveserver2 to which zookeeper
> is applied is not changed.
> --------------------------------------------------------------------------------------------------------
>
> Key: HIVE-23581
> URL: https://issues.apache.org/jira/browse/HIVE-23581
> Project: Hive
> Issue Type: Bug
> Components: JDBC
> Affects Versions: All Versions
> Reporter: shinsunwoo
> Priority: Major
> Attachments: HIVE-23581.01.patch
>
>
> When accessing hiveserver2 with
> `hive.server2.support.dynamic.service.discovery` and`
> hive.server2.limit.connections.per.user` applied through the hive jdbc
> driver, The jdbc driver is a method of randomly obtaining domain information
> (host, port) information of hivesever2 registered in the zookeeper.
> However, if the hiveserver2 obtained from the zookeeper first fails to
> connect due to the setting value of
> `hive.server2.limit.connections.per.user`, the port will not be initialized
> due to the following code logic.
>
> *
> https://github.com/apache/hive/blob/8443e50fdfa284531300f3ab283a7e4959dba623/jdbc/src/java/org/apache/hive/jdbc/ZooKeeperHiveClientHelper.java#L320
>
> {code:java}
> if ((matcher.group(1).equals("hive.server2.thrift.http.port"))
> && !(connParams.getPort() > 0)) {
> connParams.setPort(Integer.parseInt(matcher.group(2)));
> }
> {code}
>
> Therefore, if the port of the next accessible hiveserver2 is not the first
> port, a problem occurs.
> So I modified the port number to be initialized to "-1" whenever the update
> function (updateConnParamsFromZooKeeper) is executed.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)