You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kyuubi.apache.org by ch...@apache.org on 2023/05/17 11:17:07 UTC

[kyuubi-shaded] branch master updated: [KYUUBI-SHADED #5] Surgical for ZOOKEEPER-3779 to allow ZK 3.4 client work on JDK 17

This is an automated email from the ASF dual-hosted git repository.

chengpan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kyuubi-shaded.git


The following commit(s) were added to refs/heads/master by this push:
     new 0607b16  [KYUUBI-SHADED #5] Surgical for ZOOKEEPER-3779 to allow ZK 3.4 client work on JDK 17
0607b16 is described below

commit 0607b16a3c482e9dfc890db3516af3ad3b7af877
Author: Cheng Pan <ch...@apache.org>
AuthorDate: Wed May 17 19:16:58 2023 +0800

    [KYUUBI-SHADED #5] Surgical for ZOOKEEPER-3779 to allow ZK 3.4 client work on JDK 17
    
    ### _Why are the changes needed?_
    
    https://issues.apache.org/jira/browse/ZOOKEEPER-3779
    
    ### _How was this patch tested?_
    - [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible
    
    - [ ] Add screenshots for manual tests if appropriate
    
    - [ ] [Run test](https://kyuubi.readthedocs.io/en/master/develop_tools/testing.html#running-tests) locally before make a pull request
    
    Closes #5 from pan3793/ZOOKEEPER-3779.
    
    e1b178c [Cheng Pan] Surgical for ZOOKEEPER-3779 to allow ZK 3.4 client work on JDK 17
    
    Authored-by: Cheng Pan <ch...@apache.org>
    Signed-off-by: Cheng Pan <ch...@apache.org>
---
 .../src/main/java/org/apache/zookeeper/client/StaticHostProvider.java  | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/kyuubi-shaded-zookeeper-parent/kyuubi-shaded-zookeeper-34/src/main/java/org/apache/zookeeper/client/StaticHostProvider.java b/kyuubi-shaded-zookeeper-parent/kyuubi-shaded-zookeeper-34/src/main/java/org/apache/zookeeper/client/StaticHostProvider.java
index 8a24783..2d41d1b 100644
--- a/kyuubi-shaded-zookeeper-parent/kyuubi-shaded-zookeeper-34/src/main/java/org/apache/zookeeper/client/StaticHostProvider.java
+++ b/kyuubi-shaded-zookeeper-parent/kyuubi-shaded-zookeeper-34/src/main/java/org/apache/zookeeper/client/StaticHostProvider.java
@@ -150,7 +150,7 @@ public final class StaticHostProvider implements HostProvider {
 
     InetSocketAddress curAddr = serverAddresses.get(currentIndex);
     try {
-      String curHostString = getHostString(curAddr);
+      String curHostString = curAddr.getHostString();
       List<InetAddress> resolvedAddresses =
           new ArrayList<InetAddress>(Arrays.asList(this.resolver.getAllByName(curHostString)));
       if (resolvedAddresses.isEmpty()) {
@@ -159,6 +159,7 @@ public final class StaticHostProvider implements HostProvider {
       Collections.shuffle(resolvedAddresses);
       return new InetSocketAddress(resolvedAddresses.get(0), curAddr.getPort());
     } catch (UnknownHostException e) {
+      LOG.error("Unable to resolve address: {}", curAddr, e);
       return curAddr;
     }
   }