Github user sohami commented on a diff in the pull request:

    https://github.com/apache/drill/pull/648#discussion_r89928539
  
    --- Diff: 
exec/java-exec/src/main/java/org/apache/drill/exec/client/DrillClient.java ---
    @@ -245,14 +327,15 @@ public synchronized void connect(String connect, 
Properties props) throws RpcExc
               throw new RpcException("Failure setting up ZK for client.", e);
             }
           }
    -
    -      final ArrayList<DrillbitEndpoint> endpoints = new 
ArrayList<>(clusterCoordinator.getAvailableEndpoints());
    -      checkState(!endpoints.isEmpty(), "No DrillbitEndpoint can be found");
    -      // shuffle the collection then get the first endpoint
    -      Collections.shuffle(endpoints);
    -      endpoint = endpoints.iterator().next();
    +      endpoints.addAll(clusterCoordinator.getAvailableEndpoints());
    +      // Make sure we have at least one endpoint in the list
    +      checkState(!endpoints.isEmpty(), "No active Drillbit endpoint found 
from zookeeper");
    --- End diff --
    
    "checkState" is only called when drillbit information is populated using 
ZooKeeper. For connection string case we are throwing 
InvalidConnectionInfoException. Changed the string to "ZooKeeper"


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to