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 2013/01/13 20:22:12 UTC

svn commit: r1432711 - /hbase/branches/0.89-fb/bin/manage_dfs_quorum_reads.rb

Author: liyin
Date: Sun Jan 13 19:22:12 2013
New Revision: 1432711

URL: http://svn.apache.org/viewvc?rev=1432711&view=rev
Log:
[89-fb] [HBASE-7509] Fix the commit: correct version of manage_dfs_quorum_reads

Author: aaiyer

Summary:
Looks like I accidentally checked in the wrong version of
this file in  https://phabricator.fb.com/D635914

Fixing the commit

Test Plan:
Run the file on a RS on TSH025. make sure that the
number of threads is changed

Reviewers: liyintang

Reviewed By: liyintang

CC: hbase-eng@

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

Blame Revision: svn+ssh://tubbs/svnhive/hadoop/branches/titan@32029 e7acf4d4-3532-417f-9e73-7a9ae25a1f51

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

Modified: hbase/branches/0.89-fb/bin/manage_dfs_quorum_reads.rb
URL: http://svn.apache.org/viewvc/hbase/branches/0.89-fb/bin/manage_dfs_quorum_reads.rb?rev=1432711&r1=1432710&r2=1432711&view=diff
==============================================================================
--- hbase/branches/0.89-fb/bin/manage_dfs_quorum_reads.rb (original)
+++ hbase/branches/0.89-fb/bin/manage_dfs_quorum_reads.rb Sun Jan 13 19:22:12 2013
@@ -40,7 +40,7 @@ NAME = "manage_dfs_quorum_reads"
 
 # Print usage for this script
 def usage
-  puts 'Usage: %s.rb' % NAME '<setNumThreads | setTimeout>    <value>'
+  puts 'Usage: %s.rb <setNumThreads | setTimeout>    <value>' % NAME
   exit!
 end
 
@@ -50,10 +50,10 @@ if ARGV.size != 2
 end
 
 command = ARGV[0]
-value = ARGV[1]
 if command != 'setNumThreads' && command != 'setTimeout'
   usage
 end
+value = ARGV[1]
 
 # Get configuration to use.
 c = HBaseConfiguration.create()
@@ -83,8 +83,8 @@ else
 
   servers.each do |server|
     if server.getServerAddress().getHostname() == InetAddress.getLocalHost().getHostName()
-    address = server.getServerAddress()
-    break
+      address = server.getServerAddress()
+      break
     end
   end
 end
@@ -95,8 +95,7 @@ if address == nil
 end
 
 if command == 'setNumThreads'
-  admin.setNumHDFSQuorumReadThreads(value)
+  admin.setNumHDFSQuorumReadThreads(address, value.to_i)
 else
-  admin.setHDFSQuorumReadTimeoutMillis(value)
+  admin.setHDFSQuorumReadTimeoutMillis(address, value.to_i)
 end
-