You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by li...@apache.org on 2014/04/02 22:49:06 UTC

svn commit: r1584161 - /hbase/branches/0.89-fb/bin/reload_rs_config.rb

Author: liyin
Date: Wed Apr  2 20:49:06 2014
New Revision: 1584161

URL: http://svn.apache.org/r1584161
Log:
[HBASE-10747] Fix the Online Config reload script to work with Swift

Author: gauravm

Summary: Adela discovered that the Online Config reloading script was broken. I traced the problem to the script using the Hadoop RPC port, which is turned off by default.

Test Plan: Tested locally.

Reviewers: adela, rshroff, manukranthk, liyintang, aaiyer

Reviewed By: manukranthk

CC: hbase-eng@, andrewcox, arice

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

Task ID: 3921723

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=1584161&r1=1584160&r2=1584161&view=diff
==============================================================================
--- hbase/branches/0.89-fb/bin/reload_rs_config.rb (original)
+++ hbase/branches/0.89-fb/bin/reload_rs_config.rb Wed Apr  2 20:49:06 2014
@@ -73,7 +73,13 @@ LOG = LogFactory.getLog(NAME)
 # get the admin interface
 admin = HBaseAdmin.new(c)
 
-port = c.getInt("hbase.regionserver.port", 0)
+if c.getBoolean(HConstants::REGIONSERVER_USE_THRIFT, HConstants::DEFAULT_REGIONSERVER_USE_THRIFT)
+  puts "Swift server seems to be enabled. Trying to connect on the thrift port."
+  port = c.getInt(HConstants::REGIONSERVER_SWIFT_PORT, HConstants::DEFAULT_REGIONSERVER_SWIFT_PORT)
+else
+  puts "Swift server seems to be disabled. Trying to connect on the Hadoop RPC port."
+  port = c.getInt(HConstants::REGIONSERVER_PORT, HConstants::DEFAULT_REGIONSERVER_PORT)
+end
 
 if reloadAll
   # get the cluster servers