HBase
  1. HBase
  2. HBASE-6283

[region_mover.rb] Add option to exclude list of hosts on unload instead of just assuming the source node.

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.94.1, 0.95.0
    • Component/s: None
    • Labels:
    • Hadoop Flags:
      Reviewed

      Description

      Currently, the region_mover.rb script excludes a single host, the host offloading data, as a region move target. This essentially limits the number of machines that can be shutdown at a time to one. For larger clusters, it is manageable to have several nodes down at a time and desirable to get this process done more quickly.

      The proposed patch adds an exclude file option, that allows multiple hosts to be excluded as targets.

      1. hbase-6283.patch
        2 kB
        Jonathan Hsieh
      2. hbase-6283-v2.patch
        2 kB
        Jonathan Hsieh

        Issue Links

          Activity

          Hide
          Jonathan Hsieh added a comment -

          Patch for trunk. Was originally developed and tested against 0.90 (should apply to all active branches).

          Manually tested by having TestLoadAndVerify running and executing region_mover.rb unloads while running.

          Show
          Jonathan Hsieh added a comment - Patch for trunk. Was originally developed and tested against 0.90 (should apply to all active branches). Manually tested by having TestLoadAndVerify running and executing region_mover.rb unloads while running.
          Hide
          Gregory Chanan added a comment -

          Looks good to me, but I am not a ruby expert .

          Show
          Gregory Chanan added a comment - Looks good to me, but I am not a ruby expert .
          Hide
          stack added a comment -

          This should IOError or whatever the ruby equiv of FNFE is:

          +  if ! File.exist?(filename)  
          +      return java.util.ArrayList.new()
          ..
          

          ... rather than just return empty array?

          Else looks good to me.

          Does this change relate to Aravind's work? See down in his blog where he says:

          "The region_mover.rb script is an extension of the standard region_mover.rb that ships with stock HBase. I hacked it a little to add slow balancing support and automatic region balancing while unloading regions from a server. This version is also aware of draining servers and avoids them during region assignment and balancing. Again, look for the older commit if you want to use this with 0.90.x HBase releases. The latest version is for the 0.92 release."

          http://inchoate-clatter.blogspot.com.es/2012/03/hbase-ops-automation.html

          Show
          stack added a comment - This should IOError or whatever the ruby equiv of FNFE is: + if ! File.exist?(filename) + return java.util.ArrayList. new () .. ... rather than just return empty array? Else looks good to me. Does this change relate to Aravind's work? See down in his blog where he says: "The region_mover.rb script is an extension of the standard region_mover.rb that ships with stock HBase. I hacked it a little to add slow balancing support and automatic region balancing while unloading regions from a server. This version is also aware of draining servers and avoids them during region assignment and balancing. Again, look for the older commit if you want to use this with 0.90.x HBase releases. The latest version is for the 0.92 release." http://inchoate-clatter.blogspot.com.es/2012/03/hbase-ops-automation.html
          Hide
          Jonathan Hsieh added a comment -

          @Stack I'll look into making it throw an exn or at least print a nice warning message.

          Thanks for the pointer to Aravind's work – this is the first I've seen the blog. Have we encouraged Aravind to contribute his work?

          Show
          Jonathan Hsieh added a comment - @Stack I'll look into making it throw an exn or at least print a nice warning message. Thanks for the pointer to Aravind's work – this is the first I've seen the blog. Have we encouraged Aravind to contribute his work?
          Hide
          stack added a comment -

          Thanks for the pointer to Aravind's work – this is the first I've seen the blog. Have we encouraged Aravind to contribute his work?

          He has contrib'd the non-SU stuff: i.e. the bit where can register in zk what regionservers are being rolled.

          Show
          stack added a comment - Thanks for the pointer to Aravind's work – this is the first I've seen the blog. Have we encouraged Aravind to contribute his work? He has contrib'd the non-SU stuff: i.e. the bit where can register in zk what regionservers are being rolled.
          Hide
          Jonathan Hsieh added a comment -

          He has contrib'd the non-SU stuff: i.e. the bit where can register in zk what regionservers are being rolled.

          I diffed his region_mover.rb script from trunk's and they are still some significant differences between the two related to the zk bits in the ruby script side. In my case, I'm trying to help a customer in a particular situation who is still on 0.90 (didn't get included as part of HBASE-4298) so the draining zk bit isn't going to be helpful.

          For this patch, I think I'll tweak to address you comments, commit to trunk (should I do the other versions too?), and then we should encourage aravind to contribute/port the jruby bits as well.

          Sound good?

          Show
          Jonathan Hsieh added a comment - He has contrib'd the non-SU stuff: i.e. the bit where can register in zk what regionservers are being rolled. I diffed his region_mover.rb script from trunk's and they are still some significant differences between the two related to the zk bits in the ruby script side. In my case, I'm trying to help a customer in a particular situation who is still on 0.90 (didn't get included as part of HBASE-4298 ) so the draining zk bit isn't going to be helpful. For this patch, I think I'll tweak to address you comments, commit to trunk (should I do the other versions too?), and then we should encourage aravind to contribute/port the jruby bits as well. Sound good?
          Hide
          stack added a comment -

          Other versions, yes.

          Aravind doesn't work on this stuff any more. If you open new issue, one of the two of us can take in the diff. Good on you J.

          Show
          stack added a comment - Other versions, yes. Aravind doesn't work on this stuff any more. If you open new issue, one of the two of us can take in the diff. Good on you J.
          Hide
          Jonathan Hsieh added a comment -

          This it the version I applied to 0.90/0.92/0.94/trunk. Thanks for the review stack.

          Show
          Jonathan Hsieh added a comment - This it the version I applied to 0.90/0.92/0.94/trunk. Thanks for the review stack.
          Hide
          Jonathan Hsieh added a comment -

          Created HBASE-6344 with the follow up work.

          Show
          Jonathan Hsieh added a comment - Created HBASE-6344 with the follow up work.
          Hide
          Hudson added a comment -

          Integrated in HBase-0.92 #469 (See https://builds.apache.org/job/HBase-0.92/469/)
          HBASE-6283 [region_mover.rb] Add option to exclude list of hosts on unload instead of just assuming the source node (Revision 1358450)

          Result = FAILURE
          jmhsieh :
          Files :

          • /hbase/branches/0.92/CHANGES.txt
          • /hbase/branches/0.92/bin/region_mover.rb
          Show
          Hudson added a comment - Integrated in HBase-0.92 #469 (See https://builds.apache.org/job/HBase-0.92/469/ ) HBASE-6283 [region_mover.rb] Add option to exclude list of hosts on unload instead of just assuming the source node (Revision 1358450) Result = FAILURE jmhsieh : Files : /hbase/branches/0.92/CHANGES.txt /hbase/branches/0.92/bin/region_mover.rb
          Hide
          Hudson added a comment -

          Integrated in HBase-0.94-security #39 (See https://builds.apache.org/job/HBase-0.94-security/39/)
          HBASE-6283 [region_mover.rb] Add option to exclude list of hosts on unload instead of just assuming the source node (Revision 1358449)

          Result = SUCCESS
          jmhsieh :
          Files :

          • /hbase/branches/0.94/bin/region_mover.rb
          Show
          Hudson added a comment - Integrated in HBase-0.94-security #39 (See https://builds.apache.org/job/HBase-0.94-security/39/ ) HBASE-6283 [region_mover.rb] Add option to exclude list of hosts on unload instead of just assuming the source node (Revision 1358449) Result = SUCCESS jmhsieh : Files : /hbase/branches/0.94/bin/region_mover.rb
          Hide
          Hudson added a comment -

          Integrated in HBase-0.94-security-on-Hadoop-23 #6 (See https://builds.apache.org/job/HBase-0.94-security-on-Hadoop-23/6/)
          HBASE-6283 [region_mover.rb] Add option to exclude list of hosts on unload instead of just assuming the source node (Revision 1358449)

          Result = FAILURE
          jmhsieh :
          Files :

          • /hbase/branches/0.94/bin/region_mover.rb
          Show
          Hudson added a comment - Integrated in HBase-0.94-security-on-Hadoop-23 #6 (See https://builds.apache.org/job/HBase-0.94-security-on-Hadoop-23/6/ ) HBASE-6283 [region_mover.rb] Add option to exclude list of hosts on unload instead of just assuming the source node (Revision 1358449) Result = FAILURE jmhsieh : Files : /hbase/branches/0.94/bin/region_mover.rb

            People

            • Assignee:
              Jonathan Hsieh
              Reporter:
              Jonathan Hsieh
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development