HBase
  1. HBase
  2. HBASE-3576

MasterAddressTracker is registered to ZooKeeperWatcher twice

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Client
    • Labels:
      None

      Description

      At setupZooKeeperTrackers() in HConnectionManager.java, MasterAddressTracker is registered twice to ZooKeeperWatcher.

      This causes the events are passed twice to the tracker, although this causes no actual problems.

      1. HBASE3576-1.txt
        0.7 kB
        Kazuki Ohta

        Activity

        Hide
        Kazuki Ohta added a comment -

        removed unnecessary registerListener() call.

        Show
        Kazuki Ohta added a comment - removed unnecessary registerListener() call.
        Hide
        stack added a comment -

        I committed this change. Thanks for reporting the issue Kazuki:

        Index: src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java
        ===================================================================
        --- src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java        (revision 1074909)
        +++ src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java        (working copy)
        @@ -300,7 +300,6 @@
               // initialize zookeeper and master address manager
               this.zooKeeper = getZooKeeperWatcher();
               masterAddressTracker = new MasterAddressTracker(this.zooKeeper, this);
        -      zooKeeper.registerListener(masterAddressTracker);
               masterAddressTracker.start();
         
               this.rootRegionTracker = new RootRegionTracker(this.zooKeeper, this);
        
        Show
        stack added a comment - I committed this change. Thanks for reporting the issue Kazuki: Index: src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java =================================================================== --- src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java (revision 1074909) +++ src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java (working copy) @@ -300,7 +300,6 @@ // initialize zookeeper and master address manager this .zooKeeper = getZooKeeperWatcher(); masterAddressTracker = new MasterAddressTracker( this .zooKeeper, this ); - zooKeeper.registerListener(masterAddressTracker); masterAddressTracker.start(); this .rootRegionTracker = new RootRegionTracker( this .zooKeeper, this );
        Hide
        stack added a comment -

        Thanks for the patch Kazuki. Committed branch and trunk.

        Show
        stack added a comment - Thanks for the patch Kazuki. Committed branch and trunk.
        Hide
        Hudson added a comment -

        Integrated in HBase-TRUNK #1755 (See https://hudson.apache.org/hudson/job/HBase-TRUNK/1755/)
        HBASE-3576 MasterAddressTracker is registered to ZooKeeperWatcher twice

        Show
        Hudson added a comment - Integrated in HBase-TRUNK #1755 (See https://hudson.apache.org/hudson/job/HBase-TRUNK/1755/ ) HBASE-3576 MasterAddressTracker is registered to ZooKeeperWatcher twice

          People

          • Assignee:
            Kazuki Ohta
            Reporter:
            Kazuki Ohta
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development