drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DRILL-4560) ZKClusterCoordinator does not call DrillbitStatusListener.drillbitRegistered for new bits
Date Thu, 20 Oct 2016 21:35:58 GMT

    [ https://issues.apache.org/jira/browse/DRILL-4560?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15593089#comment-15593089
] 

ASF GitHub Bot commented on DRILL-4560:
---------------------------------------

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

    https://github.com/apache/drill/pull/626#discussion_r84379314
  
    --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/coord/zk/ZKClusterCoordinator.java
---
    @@ -231,31 +235,42 @@ public DrillbitEndpoint apply(ServiceInstance<DrillbitEndpoint>
input) {
           Set<DrillbitEndpoint> unregisteredBits = new HashSet<>(endpoints);
           unregisteredBits.removeAll(newDrillbitSet);
     
    +      // Set of newly live bits : new set of active bits - original bits.
    +      Set<DrillbitEndpoint> registeredBits = new HashSet<>(newDrillbitSet);
    +      registeredBits.removeAll(endpoints);
    +
           endpoints = newDrillbitSet;
     
           if (logger.isDebugEnabled()) {
             StringBuilder builder = new StringBuilder();
             builder.append("Active drillbit set changed.  Now includes ");
             builder.append(newDrillbitSet.size());
    -        builder.append(" total bits.  New active drillbits: \n");
    -        for (DrillbitEndpoint bit: newDrillbitSet) {
    -          builder.append('\t');
    -          builder.append(bit.getAddress());
    -          builder.append(':');
    -          builder.append(bit.getUserPort());
    -          builder.append(':');
    -          builder.append(bit.getControlPort());
    -          builder.append(':');
    -          builder.append(bit.getDataPort());
    -          builder.append('\n');
    +        builder.append(" total bits.");
    +        if (!newDrillbitSet.isEmpty()) {
    +          builder.append(" New active drillbits: \n");
    +          for (DrillbitEndpoint bit: newDrillbitSet) {
    +            builder.append('\t');
    +            builder.append(bit.getAddress());
    +            builder.append(':');
    +            builder.append(bit.getUserPort());
    +            builder.append(':');
    +            builder.append(bit.getControlPort());
    +            builder.append(':');
    +            builder.append(bit.getDataPort());
    +            builder.append('\n');
    +          }
    +          logger.debug(builder.toString());
             }
    -        logger.debug(builder.toString());
           }
     
    -      // Notify the drillbit listener for newly unregistered bits. For now, we only care
when drillbits are down / unregistered.
    -      if (! (unregisteredBits.isEmpty()) ) {
    +      // Notify the drillbit listener for newly unregistered bits.
    +      if (!(unregisteredBits.isEmpty())) {
    --- End diff --
    
    Remove extra set of parens (here and below).


> ZKClusterCoordinator does not call DrillbitStatusListener.drillbitRegistered for new
bits
> -----------------------------------------------------------------------------------------
>
>                 Key: DRILL-4560
>                 URL: https://issues.apache.org/jira/browse/DRILL-4560
>             Project: Apache Drill
>          Issue Type: Sub-task
>          Components:  Server
>    Affects Versions: 1.6.0
>            Reporter: Paul Rogers
>            Assignee: Sorabh Hamirwasia
>            Priority: Minor
>             Fix For: 1.9.0
>
>
> ZKClusterCoordinator notifies listeners of type DrillbitStatusListener when drillbits
disappear from ZooKeeper. The YARN Application Master (AM) also needs to know when bits register
themselves with ZK. So, ZKClusterCoordinator should change to detect new Drill-bits, then
call DrillbitStatusListener.drillbitRegistered with the new Drill-bits.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message