HBase
  1. HBase
  2. HBASE-5953

Expose the current state of the balancerSwitch

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 0.95.2
    • Fix Version/s: 0.95.0
    • Component/s: master
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      The balancerSwitch as in both 0.90 and 0.92.1 is implemented in such a way that it is impossible to retrieve its value without changing it:

      /**
      Turn the load balancer on or off.
      @param b If true, enable balancer. If false, disable balancer.
      @return Previous balancer value
      */
      public boolean balanceSwitch(final boolean b);

      It would be nice to have a way to just get the current state.

      1. HBASE-5953-v2.patch
        11 kB
        Gregory Chanan
      2. HBASE-5953.patch
        11 kB
        Gregory Chanan
      3. 5953-v2.patch
        11 kB
        Ted Yu

        Activity

        Hide
        stack added a comment -

        Agreed. Its state should be out in zk anyways rather than an in-memory master state.

        Show
        stack added a comment - Agreed. Its state should be out in zk anyways rather than an in-memory master state.
        Hide
        David S. Wang added a comment -

        Assigning to Greg at his request. Removing 0.92 and 0.94 from fixVersions at least until we have a compatibility story for ClusterStatus (see HBASE-6009 for details).

        Show
        David S. Wang added a comment - Assigning to Greg at his request. Removing 0.92 and 0.94 from fixVersions at least until we have a compatibility story for ClusterStatus (see HBASE-6009 for details).
        Hide
        Gregory Chanan added a comment -

        Added isBalancerOn to ClusterStatus, so you can get it from getClusterStatus. I figure we can move it to zk later if we want.

        Show
        Gregory Chanan added a comment - Attached HBASE-5953 .patch * Added isBalancerOn to ClusterStatus, so you can get it from getClusterStatus. I figure we can move it to zk later if we want.
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12532602/HBASE-5953.patch
        against trunk revision .

        +1 @author. The patch does not contain any @author tags.

        -1 tests included. The patch doesn't appear to include any new or modified tests.
        Please justify why no new tests are needed for this patch.
        Also please list what manual steps were performed to verify this patch.

        +1 hadoop2.0. The patch compiles against the hadoop 2.0 profile.

        +1 javadoc. The javadoc tool did not generate any warning messages.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        -1 findbugs. The patch appears to introduce 9 new Findbugs (version 1.3.9) warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        -1 core tests. The patch failed these unit tests:
        org.apache.hadoop.hbase.coprocessor.TestClassLoading

        Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/2193//testReport/
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/2193//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-common.html
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/2193//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-server.html
        Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/2193//console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12532602/HBASE-5953.patch against trunk revision . +1 @author. The patch does not contain any @author tags. -1 tests included. The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. +1 hadoop2.0. The patch compiles against the hadoop 2.0 profile. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. -1 findbugs. The patch appears to introduce 9 new Findbugs (version 1.3.9) warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. -1 core tests. The patch failed these unit tests: org.apache.hadoop.hbase.coprocessor.TestClassLoading Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/2193//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/2193//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-common.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/2193//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-server.html Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/2193//console This message is automatically generated.
        Hide
        Ted Yu added a comment -

        lgtm.
        Minor nit:

        +      this.getCoprocessors(),this.balanceSwitch);
        

        Insert space after comma - will be done at integration time.

        Show
        Ted Yu added a comment - lgtm. Minor nit: + this .getCoprocessors(), this .balanceSwitch); Insert space after comma - will be done at integration time.
        Hide
        Anoop Sam John added a comment -
        +  private boolean isBalancerOn;
        ...
        +  public boolean getIsBalancerOn() {
        +    return isBalancerOn;
        +  }
        

        Can we name the variable as balancerOn and method name as isBalancerOn()

        I have seen in some other JIRA that Stack was mentioning abt we maintain the convention of is... () for the getters of boolean variables.

        Show
        Anoop Sam John added a comment - + private boolean isBalancerOn; ... + public boolean getIsBalancerOn() { + return isBalancerOn; + } Can we name the variable as balancerOn and method name as isBalancerOn() I have seen in some other JIRA that Stack was mentioning abt we maintain the convention of is... () for the getters of boolean variables.
        Hide
        Gregory Chanan added a comment -

        Sounds fine to me, Anoop.

        Do we have a link (a JIRA is fine) where we discuss conventions like this?

        Show
        Gregory Chanan added a comment - Sounds fine to me, Anoop. Do we have a link (a JIRA is fine) where we discuss conventions like this?
        Show
        Anoop Sam John added a comment - I was mentioning about below comment which I noticed some time back https://issues.apache.org/jira/browse/HBASE-6114?focusedCommentId=13285076&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13285076
        Hide
        Gregory Chanan added a comment -

        Incorporate Anoop's suggestion.

        Show
        Gregory Chanan added a comment - Attached HBASE-5953 -v2.patch * Incorporate Anoop's suggestion.
        Hide
        Ted Yu added a comment -

        Patch v2 with formatting.

        Will integrate after test suite completes.

        Show
        Ted Yu added a comment - Patch v2 with formatting. Will integrate after test suite completes.
        Hide
        Ted Yu added a comment -

        No issue turned up from test suite run.

        Integrated to trunk.

        Thanks for the patch Gregory.

        Thanks for the review Anoop.

        Show
        Ted Yu added a comment - No issue turned up from test suite run. Integrated to trunk. Thanks for the patch Gregory. Thanks for the review Anoop.
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12532936/5953-v2.patch
        against trunk revision .

        +1 @author. The patch does not contain any @author tags.

        -1 tests included. The patch doesn't appear to include any new or modified tests.
        Please justify why no new tests are needed for this patch.
        Also please list what manual steps were performed to verify this patch.

        -1 patch. The patch command could not apply the patch.

        Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/2212//console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12532936/5953-v2.patch against trunk revision . +1 @author. The patch does not contain any @author tags. -1 tests included. The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. -1 patch. The patch command could not apply the patch. Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/2212//console This message is automatically generated.
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12532934/HBASE-5953-v2.patch
        against trunk revision .

        +1 @author. The patch does not contain any @author tags.

        -1 tests included. The patch doesn't appear to include any new or modified tests.
        Please justify why no new tests are needed for this patch.
        Also please list what manual steps were performed to verify this patch.

        +1 hadoop2.0. The patch compiles against the hadoop 2.0 profile.

        +1 javadoc. The javadoc tool did not generate any warning messages.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        -1 findbugs. The patch appears to introduce 11 new Findbugs (version 1.3.9) warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        -1 core tests. The patch failed these unit tests:
        org.apache.hadoop.hbase.security.access.TestAccessController

        Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/2211//testReport/
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/2211//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-common.html
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/2211//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-server.html
        Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/2211//console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12532934/HBASE-5953-v2.patch against trunk revision . +1 @author. The patch does not contain any @author tags. -1 tests included. The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. +1 hadoop2.0. The patch compiles against the hadoop 2.0 profile. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. -1 findbugs. The patch appears to introduce 11 new Findbugs (version 1.3.9) warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. -1 core tests. The patch failed these unit tests: org.apache.hadoop.hbase.security.access.TestAccessController Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/2211//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/2211//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-common.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/2211//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-server.html Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/2211//console This message is automatically generated.
        Hide
        Hudson added a comment -

        Integrated in HBase-TRUNK #3055 (See https://builds.apache.org/job/HBase-TRUNK/3055/)
        HBASE-5953 Expose the current state of the balancerSwitch (Gregory Chanan) (Revision 1352696)

        Result = FAILURE
        tedyu :
        Files :

        • /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/ClusterStatus.java
        • /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
        • /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/protobuf/generated/ClusterStatusProtos.java
        • /hbase/trunk/hbase-server/src/main/protobuf/ClusterStatus.proto
        Show
        Hudson added a comment - Integrated in HBase-TRUNK #3055 (See https://builds.apache.org/job/HBase-TRUNK/3055/ ) HBASE-5953 Expose the current state of the balancerSwitch (Gregory Chanan) (Revision 1352696) Result = FAILURE tedyu : Files : /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/ClusterStatus.java /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/protobuf/generated/ClusterStatusProtos.java /hbase/trunk/hbase-server/src/main/protobuf/ClusterStatus.proto
        Hide
        Hudson added a comment -

        Integrated in HBase-TRUNK-on-Hadoop-2.0.0 #63 (See https://builds.apache.org/job/HBase-TRUNK-on-Hadoop-2.0.0/63/)
        HBASE-5953 Expose the current state of the balancerSwitch (Gregory Chanan) (Revision 1352696)

        Result = FAILURE
        tedyu :
        Files :

        • /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/ClusterStatus.java
        • /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
        • /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/protobuf/generated/ClusterStatusProtos.java
        • /hbase/trunk/hbase-server/src/main/protobuf/ClusterStatus.proto
        Show
        Hudson added a comment - Integrated in HBase-TRUNK-on-Hadoop-2.0.0 #63 (See https://builds.apache.org/job/HBase-TRUNK-on-Hadoop-2.0.0/63/ ) HBASE-5953 Expose the current state of the balancerSwitch (Gregory Chanan) (Revision 1352696) Result = FAILURE tedyu : Files : /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/ClusterStatus.java /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/protobuf/generated/ClusterStatusProtos.java /hbase/trunk/hbase-server/src/main/protobuf/ClusterStatus.proto
        Hide
        Gregory Chanan added a comment -

        okay to close this?

        Show
        Gregory Chanan added a comment - okay to close this?
        Hide
        stack added a comment -

        Marking closed.

        Show
        stack added a comment - Marking closed.

          People

          • Assignee:
            Gregory Chanan
            Reporter:
            David S. Wang
          • Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development