Details
-
Bug
-
Status: Patch Available
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
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.
if ((matcher.group(1).equals("hive.server2.thrift.http.port")) && !(connParams.getPort() > 0)) { connParams.setPort(Integer.parseInt(matcher.group(2))); }
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.