Details

    • Type: Sub-task Sub-task
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.99.0
    • Component/s: scripts
    • Labels:
      None
    • Hadoop Flags:
      Reviewed
    • Release Note:
      Hide
      Adds a ruby script to manage nodes in draining mode.
      Usage: ./hbase org.jruby.Main draining_servers.rb [options] add|remove|list <hostname>|<host:port>|<servername> ...
      Add remove or list servers in draining mode. Can accept either hostname to drain all region serversin that host, a host:port pair or a host,port,startCode triplet. More than one server can be given separated by space
      Show
      Adds a ruby script to manage nodes in draining mode. Usage: ./hbase org.jruby.Main draining_servers.rb [options] add|remove|list <hostname>|<host:port>|<servername> ... Add remove or list servers in draining mode. Can accept either hostname to drain all region serversin that host, a host:port pair or a host,port,startCode triplet. More than one server can be given separated by space

      Description

      As per parent issue, our support for graceful stop and node decommissioning can be improved a lot. However, until we fix it for good, we can add a draining_node script to manage the nodes in draining mode in zk.

        Activity

        Hide
        Enis Soztutar added a comment -

        Closing this issue after 0.99.0 release.

        Show
        Enis Soztutar added a comment - Closing this issue after 0.99.0 release.
        Hide
        Hudson added a comment -

        FAILURE: Integrated in HBase-TRUNK-on-Hadoop-1.1 #115 (See https://builds.apache.org/job/HBase-TRUNK-on-Hadoop-1.1/115/)
        HBASE-10688 Add a draining_node script to manage nodes in draining mode (enis: rev 1576856)

        • /hbase/trunk/bin/draining_servers.rb
        Show
        Hudson added a comment - FAILURE: Integrated in HBase-TRUNK-on-Hadoop-1.1 #115 (See https://builds.apache.org/job/HBase-TRUNK-on-Hadoop-1.1/115/ ) HBASE-10688 Add a draining_node script to manage nodes in draining mode (enis: rev 1576856) /hbase/trunk/bin/draining_servers.rb
        Hide
        Hudson added a comment -

        SUCCESS: Integrated in HBase-TRUNK #5003 (See https://builds.apache.org/job/HBase-TRUNK/5003/)
        HBASE-10688 Add a draining_node script to manage nodes in draining mode (enis: rev 1576856)

        • /hbase/trunk/bin/draining_servers.rb
        Show
        Hudson added a comment - SUCCESS: Integrated in HBase-TRUNK #5003 (See https://builds.apache.org/job/HBase-TRUNK/5003/ ) HBASE-10688 Add a draining_node script to manage nodes in draining mode (enis: rev 1576856) /hbase/trunk/bin/draining_servers.rb
        Hide
        Enis Soztutar added a comment -

        Committed this. Thanks Lars for review!

        Show
        Enis Soztutar added a comment - Committed this. Thanks Lars for review!
        Hide
        Lars Hofhansl added a comment -

        Fair enough. +1

        Show
        Lars Hofhansl added a comment - Fair enough. +1
        Hide
        Enis Soztutar added a comment -

        Thanks Lars for looking.

        Since the purpose of this is to set/remove znodes it might be better to fail with an exception if that fails rather then failing silently.

        We are using ZkUtil.createAndFailSilent() and deleteAndfailSilent() because it might happen that the node got added or removed by someone else. They will only swallow node exists / node does not exists exceptions, not generic zookeeper exceptions.

        Show
        Enis Soztutar added a comment - Thanks Lars for looking. Since the purpose of this is to set/remove znodes it might be better to fail with an exception if that fails rather then failing silently. We are using ZkUtil.createAndFailSilent() and deleteAndfailSilent() because it might happen that the node got added or removed by someone else. They will only swallow node exists / node does not exists exceptions, not generic zookeeper exceptions.
        Hide
        Lars Hofhansl added a comment -

        Looks good.
        Since the purpose of this is to set/remove znodes it might be better to fail with an exception if that fails rather then failing silently.

        Show
        Lars Hofhansl added a comment - Looks good. Since the purpose of this is to set/remove znodes it might be better to fail with an exception if that fails rather then failing silently.
        Hide
        Enis Soztutar added a comment -

        Any reviews?

        Show
        Enis Soztutar added a comment - Any reviews?
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12632965/0001-HBASE-10688-v1.patch
        against trunk revision .
        ATTACHMENT ID: 12632965

        +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 hadoop1.0. The patch compiles against the hadoop 1.0 profile.

        +1 hadoop1.1. The patch compiles against the hadoop 1.1 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 does not introduce any new Findbugs (version 1.3.9) warnings.

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

        -1 lineLengths. The patch introduces the following lines longer than 100:
        + opts.banner = "Usage: ./hbase org.jruby.Main #

        {NAME}

        .rb [options] add|remove|list <hostname>|<host:port>|<servername> ..."
        + opts.separator 'Add remove or list servers in draining mode. Can accept either hostname to drain all region servers' +
        + 'in that host, a host:port pair or a host,port,startCode triplet. More than one server can be given separated by space'

        +1 site. The mvn site goal succeeds with this patch.

        +1 core tests. The patch passed unit tests in .

        Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/8906//testReport/
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/8906//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-protocol.html
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/8906//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-thrift.html
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/8906//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-client.html
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/8906//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop2-compat.html
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/8906//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-examples.html
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/8906//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-prefix-tree.html
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/8906//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-common.html
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/8906//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-server.html
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/8906//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop-compat.html
        Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/8906//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/12632965/0001-HBASE-10688-v1.patch against trunk revision . ATTACHMENT ID: 12632965 +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 hadoop1.0 . The patch compiles against the hadoop 1.0 profile. +1 hadoop1.1 . The patch compiles against the hadoop 1.1 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 does not introduce any new Findbugs (version 1.3.9) warnings. +1 release audit . The applied patch does not increase the total number of release audit warnings. -1 lineLengths . The patch introduces the following lines longer than 100: + opts.banner = "Usage: ./hbase org.jruby.Main # {NAME} .rb [options] add|remove|list <hostname>|<host:port>|<servername> ..." + opts.separator 'Add remove or list servers in draining mode. Can accept either hostname to drain all region servers' + + 'in that host, a host:port pair or a host,port,startCode triplet. More than one server can be given separated by space' +1 site . The mvn site goal succeeds with this patch. +1 core tests . The patch passed unit tests in . Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/8906//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/8906//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-protocol.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/8906//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-thrift.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/8906//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-client.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/8906//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop2-compat.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/8906//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-examples.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/8906//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-prefix-tree.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/8906//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-common.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/8906//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-server.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/8906//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop-compat.html Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/8906//console This message is automatically generated.
        Hide
        Enis Soztutar added a comment -

        Attaching a patch for a ruby script for managing draining_nodes in zk:

        Usage: ./hbase org.jruby.Main draining_servers.rb [options] add|remove|list <hostname>|<host:port>|<servername> ...
        Add remove or list servers in draining mode. Can accept either hostname to drain all region serversin that host, a host:port pair or a host,port,startCode triplet. More than one server can be given separated by space
            -h, --help                       Display usage information
            -d, --debug                      Display extra debug logging
        

        I have tested this with:

        bin/hbase org.jruby.Main bin/draining_servers.rb add  localhost,60010,23223 10.11.2.75,49740
        bin/hbase org.jruby.Main bin/draining_servers.rb list 
        localhost,60010,23223
        10.11.2.75,49740,1391051351778
        bin/hbase org.jruby.Main bin/draining_servers.rb remove 10.11.2.75,49740
         bin/hbase org.jruby.Main bin/draining_servers.rb list 
        localhost,60010,23223
        
        Show
        Enis Soztutar added a comment - Attaching a patch for a ruby script for managing draining_nodes in zk: Usage: ./hbase org.jruby.Main draining_servers.rb [options] add|remove|list <hostname>|<host:port>|<servername> ... Add remove or list servers in draining mode. Can accept either hostname to drain all region serversin that host, a host:port pair or a host,port,startCode triplet. More than one server can be given separated by space -h, --help Display usage information -d, --debug Display extra debug logging I have tested this with: bin/hbase org.jruby.Main bin/draining_servers.rb add localhost,60010,23223 10.11.2.75,49740 bin/hbase org.jruby.Main bin/draining_servers.rb list localhost,60010,23223 10.11.2.75,49740,1391051351778 bin/hbase org.jruby.Main bin/draining_servers.rb remove 10.11.2.75,49740 bin/hbase org.jruby.Main bin/draining_servers.rb list localhost,60010,23223

          People

          • Assignee:
            Enis Soztutar
            Reporter:
            Enis Soztutar
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development