mbautin has commented on the revision "[jira]
HBASE-4908 HBase cluster test tool (port from 0.89-fb)".
Thanks for reviews, Nicolas and Stack! See responses below. A new version of the code will follow. Still have to re-run the unit tests (I've been having some trouble with those recently – http://pastebin.com/1G1ZcPeV) and sanity-check the command-line load tester. On a side note, here are some stats from my recent load test run on a 5-node cluster:
11/12/06 18:30:25 INFO util.MultiThreadedAction: [W:21] Keys=17180542, cols=819.4m, time=27:49:20 Overall: [keys/s= 171, latency=116 ms] Current: [keys/s=219, latency=90 ms], insertedUpTo=17180495, insertedQSize=26
11/12/06 18:30:25 INFO util.MultiThreadedAction: [R:10] Keys=250690067, cols=11.8g, time=27:49:20 Overall: [keys/s= 2502, latency=3 ms] Current: [keys/s=261, latency=38 ms], verified=250690067
(The number of writer's threads is reported as 21 because there is an "inserted keys tracker" thread that keeps track of the most recent contiguous key written by all writers.)
src/test/java/org/apache/hadoop/hbase/util/IntegrationTestTool.java:129 Changed this to 80. There is no standard way to get terminal width in Java. http://stackoverflow.com/questions/1286461/can-i-find-the-console-width-with-java
src/test/java/org/apache/hadoop/hbase/util/LoadTest.java:40 This is the command-line part of LoadTest, so it should not run as part of the test suite. The same multithreaded writer/verifier code is reused in a couple of "large" unit tests, namely TestMiniClusterLoad
I added a line about the differences between this load tester and PerformanceEvaluation.
Renamed this to LoadTestTool.
src/test/java/org/apache/hadoop/hbase/util/LoadTest.java:318 We first wait for all writers to finish and then wait for all readers to finish, so we should exit when all of those threads stop.
src/test/java/org/apache/hadoop/hbase/util/RestartMetaTest.java:37 Yes, this can be converted to an IntegrationTest. I think making this a unit test was proposed in the past but the controversy was that it spawns a bunch of child processes and extra care should be taken to shut down all of them. We can leave this as a command-line tool for now and convert to a unit test when it is more stable.
src/main/java/org/apache/hadoop/hbase/util/Bytes.java:1658-1680 Removed these methods and reused the existing RegionSetting.HexStringSplit class.
src/main/java/org/apache/hadoop/hbase/EmptyWatcher.java:28 I moved this to from the test jar to the main jar because of the waitForBaseZNode method that I added to ZKUtil. We need this kind of watcher for quick ZK checks when we don't want to use a callback. Passing a null instead of a watcher does not work.
src/main/java/org/apache/hadoop/hbase/mapreduce/HFileOutputFormat.java:176 Not sure what changes you are talking about. I made a few conf options that I needed to use constants in HConstants.
src/main/java/org/apache/hadoop/hbase/util/Keying.java:41-43 Removed this.
src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java:1820-1821 Done. Thanks!
src/test/java/org/apache/hadoop/hbase/util/IntegrationTestTool.java:39 Renamed this to AbstractHBaseTool and moved to the main jar, since this is general-purpose command line processing functionality. This also avoids the confusion with the IntegrationTest notation (thanks for the link!) I think we will be creating a lot of integration tests very soon.