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

    https://github.com/apache/drill/pull/921#discussion_r148676672
  
    --- Diff: 
exec/java-exec/src/main/java/org/apache/drill/exec/coord/zk/ZKClusterCoordinator.java
 ---
    @@ -200,11 +206,47 @@ public void unregister(RegistrationHandle handle) {
         }
       }
     
    +  /**
    +   * Update drillbit endpoint state. Drillbit advertises its
    +   * state in Zookeeper when a shutdown request of drillbit is
    +   * triggered. State information is used during planning and
    +   * initial client connection phases.
    +   */
    +  public RegistrationHandle update(RegistrationHandle handle, State state) 
{
    +    ZKRegistrationHandle h = (ZKRegistrationHandle) handle;
    +      try {
    +        endpoint = h.endpoint.toBuilder().setState(state).build();
    +        ServiceInstance<DrillbitEndpoint> serviceInstance = 
ServiceInstance.<DrillbitEndpoint>builder().name(serviceName).id(h.id).payload(endpoint).build();
    --- End diff --
    
    suggestion: wrap this long line since you have already wrapped the other 
lines and comments


---

Reply via email to