hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From li...@apache.org
Subject svn commit: r1530747 - /hbase/branches/0.89-fb/bin/reload_rs_config.rb
Date Wed, 09 Oct 2013 18:18:21 GMT
Author: liyin
Date: Wed Oct  9 18:18:21 2013
New Revision: 1530747

URL: http://svn.apache.org/r1530747
Log:
[master] Allow the configuration reload script to make a single host reload config

Author: gauravm

Summary:
As a part of my testing the online configuration change, I found that the command line options
for the script which makes the
region servers reload their configuration, were not implemented as intended. Made the necessary
fixes.

Now we can either make all the region servers reload their configurations, or just a specific
one.

Test Plan: Tested locally, will test on TITANSHADOW025 (Altair)

Reviewers: rshroff, adela, manukranthk, aaiyer

Reviewed By: manukranthk

CC: hbase-eng@

Differential Revision: https://phabricator.fb.com/D1001815

Task ID: 2842041

Modified:
    hbase/branches/0.89-fb/bin/reload_rs_config.rb

Modified: hbase/branches/0.89-fb/bin/reload_rs_config.rb
URL: http://svn.apache.org/viewvc/hbase/branches/0.89-fb/bin/reload_rs_config.rb?rev=1530747&r1=1530746&r2=1530747&view=diff
==============================================================================
--- hbase/branches/0.89-fb/bin/reload_rs_config.rb (original)
+++ hbase/branches/0.89-fb/bin/reload_rs_config.rb Wed Oct  9 18:18:21 2013
@@ -40,20 +40,21 @@ import java.net.InetAddress
 NAME = "reload_rs_config"
 
 def usage
-  puts 'Usage %s.rb [reloadAll]' % NAME
-  puts 'Use reloadAll to make all the Region Servers reload their configurations'
+  puts 'Usage: %s.rb [reloadAll | hostname]' % NAME
+  puts 'Use reloadAll to make all the Region Servers reload their configurations, or,'
+  puts 'Use a specific hostname to make a specific region server reload its configuration'
   exit!
 end
 
 reloadAll = false
 
-if ARGV.size > 1
+if ARGV.size != 1
   usage
-elsif ARGV.size == 1
+else
   if ARGV[0] == 'reloadAll'
     reloadAll = true
   else
-    usage
+    hostname = ARGV[0]
   end
 end
 
@@ -72,7 +73,6 @@ LOG = LogFactory.getLog(NAME)
 # get the admin interface
 admin = HBaseAdmin.new(c)
 
-hostname = InetAddress.getLocalHost().getHostName()
 port = c.getInt("hbase.regionserver.port", 0)
 
 if reloadAll
@@ -106,6 +106,7 @@ else
     exit
   end
 
+  puts "Updating the configuration at host " + address.getHostname()
   admin.updateConfiguration(address)
 end
 



Mime
View raw message