You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by ns...@apache.org on 2011/10/11 04:09:54 UTC
svn commit: r1181456 -
/hbase/branches/0.89/src/test/java/org/apache/hadoop/hbase/loadtest/LoadTester.java
Author: nspiegelberg
Date: Tue Oct 11 02:09:54 2011
New Revision: 1181456
URL: http://svn.apache.org/viewvc?rev=1181456&view=rev
Log:
increase RPC timeout used by bin/hbase verify
Summary:
bin/hbase verify is used by ops to check cluster sanity.
We need to increase RPC timeout for admin operations (like create, disable,
drop table) operations used in bin/hbase verify.
Test Plan:
Ran on localhost. Will try on my test cluster as well.
DiffCamp Revision: 188916
Reviewed By: aaiyer
Reviewers: aaiyer, nspiegelberg, kranganathan, aravind
CC: aaiyer
Revert Plan:
OK
Modified:
hbase/branches/0.89/src/test/java/org/apache/hadoop/hbase/loadtest/LoadTester.java
Modified: hbase/branches/0.89/src/test/java/org/apache/hadoop/hbase/loadtest/LoadTester.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.89/src/test/java/org/apache/hadoop/hbase/loadtest/LoadTester.java?rev=1181456&r1=1181455&r2=1181456&view=diff
==============================================================================
--- hbase/branches/0.89/src/test/java/org/apache/hadoop/hbase/loadtest/LoadTester.java (original)
+++ hbase/branches/0.89/src/test/java/org/apache/hadoop/hbase/loadtest/LoadTester.java Tue Oct 11 02:09:54 2011
@@ -51,6 +51,10 @@ public class LoadTester {
// global HBase configuration for the JVM - referenced by all classes.
private Configuration config;
+
+ // for admin operations use a config with higher timeouts
+ private Configuration adminConfig;
+
// startup options
public static Options options = new Options();
@@ -69,6 +73,12 @@ public class LoadTester {
this.inputFilename = inputFilename;
}
this.config = HBaseUtils.getHBaseConfFromZkNode(zkNodeName);
+
+ // for admin operations create a similar config, except
+ // set the RPC timeout much higher (5 mins).
+ this.adminConfig = HBaseUtils.getHBaseConfFromZkNode(zkNodeName);
+ this.adminConfig.setInt("hbase.rpc.timeout", 5 * 60 * 1000);
+
LOG.info("Adding hbase.zookeeper.quorum = "
+ config.get("hbase.zookeeper.quorum"));
if (tableNameString == null) {
@@ -202,7 +212,7 @@ public class LoadTester {
LOG.info(dashedLine);
LOG.info("Creating table if not exists................................");
}
- return HBaseUtils.createTableIfNotExists(config, tableName,
+ return HBaseUtils.createTableIfNotExists(adminConfig, tableName,
familyProperties, regionsPerServer);
}
@@ -211,7 +221,7 @@ public class LoadTester {
LOG.info(dashedLine);
LOG.info("Deleting table if it exists......");
}
- return HBaseUtils.deleteTable(config, tableName);
+ return HBaseUtils.deleteTable(adminConfig, tableName);
}
public void startAction(MultiThreadedAction action, String actionType,