You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by nk...@apache.org on 2013/09/20 15:02:54 UTC
svn commit: r1524985 - in /hbase/trunk: hbase-hadoop2-compat/pom.xml
hbase-server/pom.xml
hbase-server/src/test/java/org/apache/hadoop/hbase/PerformanceEvaluation.java
Author: nkeywal
Date: Fri Sep 20 13:02:54 2013
New Revision: 1524985
URL: http://svn.apache.org/r1524985
Log:
HBASE-9558 PerformanceEvaluation is in hbase-server, and creates a dependency to MiniDFSCluster
Modified:
hbase/trunk/hbase-hadoop2-compat/pom.xml
hbase/trunk/hbase-server/pom.xml
hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/PerformanceEvaluation.java
Modified: hbase/trunk/hbase-hadoop2-compat/pom.xml
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-hadoop2-compat/pom.xml?rev=1524985&r1=1524984&r2=1524985&view=diff
==============================================================================
--- hbase/trunk/hbase-hadoop2-compat/pom.xml (original)
+++ hbase/trunk/hbase-hadoop2-compat/pom.xml Fri Sep 20 13:02:54 2013
@@ -157,13 +157,6 @@ limitations under the License.
<groupId>com.yammer.metrics</groupId>
<artifactId>metrics-core</artifactId>
</dependency>
- <!-- This was marked as test dep in earlier pom, but was scoped compile. Where
- do we actually need it? -->
- <dependency>
- <groupId>org.apache.hadoop</groupId>
- <artifactId>hadoop-minicluster</artifactId>
- <version>${hadoop-two.version}</version>
- </dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
Modified: hbase/trunk/hbase-server/pom.xml
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/pom.xml?rev=1524985&r1=1524984&r2=1524985&view=diff
==============================================================================
--- hbase/trunk/hbase-server/pom.xml (original)
+++ hbase/trunk/hbase-server/pom.xml Fri Sep 20 13:02:54 2013
@@ -348,10 +348,6 @@
<artifactId>high-scale-lib</artifactId>
</dependency>
<dependency>
- <groupId>commons-codec</groupId>
- <artifactId>commons-codec</artifactId>
- </dependency>
- <dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</dependency>
@@ -424,10 +420,6 @@
<artifactId>jackson-jaxrs</artifactId>
</dependency>
<dependency>
- <groupId>org.codehaus.jackson</groupId>
- <artifactId>jackson-xc</artifactId>
- </dependency>
- <dependency>
<groupId>tomcat</groupId>
<artifactId>jasper-compiler</artifactId>
</dependency>
@@ -466,11 +458,6 @@
</dependency>
<!-- Test Dependencies -->
<dependency>
- <groupId>org.codehaus.jettison</groupId>
- <artifactId>jettison</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
<groupId>org.cloudera.htrace</groupId>
<artifactId>htrace-core</artifactId>
</dependency>
@@ -627,16 +614,8 @@
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
- <artifactId>hadoop-client</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-annotations</artifactId>
</dependency>
- <dependency>
- <groupId>org.apache.hadoop</groupId>
- <artifactId>hadoop-minicluster</artifactId>
- </dependency>
</dependencies>
<build>
<plugins>
Modified: hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/PerformanceEvaluation.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/PerformanceEvaluation.java?rev=1524985&r1=1524984&r2=1524985&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/PerformanceEvaluation.java (original)
+++ hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/PerformanceEvaluation.java Fri Sep 20 13:02:54 2013
@@ -46,7 +46,6 @@ import org.apache.hadoop.hbase.client.Ge
import org.apache.hadoop.hbase.client.HBaseAdmin;
import org.apache.hadoop.hbase.client.HConnection;
import org.apache.hadoop.hbase.client.HConnectionManager;
-import org.apache.hadoop.hbase.client.HTable;
import org.apache.hadoop.hbase.client.HTableInterface;
import org.apache.hadoop.hbase.client.Put;
import org.apache.hadoop.hbase.client.Result;
@@ -63,12 +62,9 @@ import org.apache.hadoop.hbase.mapreduce
import org.apache.hadoop.hbase.io.compress.Compression;
import org.apache.hadoop.hbase.io.encoding.DataBlockEncoding;
import org.apache.hadoop.hbase.util.Bytes;
-import org.apache.hadoop.hbase.util.FSUtils;
import org.apache.hadoop.hbase.util.Hash;
import org.apache.hadoop.hbase.util.MurmurHash;
import org.apache.hadoop.hbase.util.Pair;
-import org.apache.hadoop.hbase.zookeeper.MiniZooKeeperCluster;
-import org.apache.hadoop.hdfs.MiniDFSCluster;
import org.apache.hadoop.conf.Configured;
import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.NullWritable;
@@ -122,7 +118,6 @@ public class PerformanceEvaluation exten
protected Map<String, CmdDescriptor> commands = new TreeMap<String, CmdDescriptor>();
- private boolean miniCluster = false;
private boolean nomapred = false;
private int rowPrefixLength = DEFAULT_ROW_PREFIX_LENGTH;
private int N = 1;
@@ -1246,43 +1241,14 @@ public class PerformanceEvaluation exten
}
private void runTest(final Class<? extends Test> cmd) throws IOException,
- InterruptedException, ClassNotFoundException {
- MiniHBaseCluster hbaseMiniCluster = null;
- MiniDFSCluster dfsCluster = null;
- MiniZooKeeperCluster zooKeeperCluster = null;
- Configuration conf = getConf();
- if (this.miniCluster) {
- dfsCluster = new MiniDFSCluster(conf, 2, true, (String[])null);
- zooKeeperCluster = new MiniZooKeeperCluster(conf);
- int zooKeeperPort = zooKeeperCluster.startup(new File(System.getProperty("java.io.tmpdir")));
-
- // mangle the conf so that the fs parameter points to the minidfs we
- // just started up
- FileSystem fs = dfsCluster.getFileSystem();
- FSUtils.setFsDefault(conf, new Path(fs.getUri()));
- conf.set(HConstants.ZOOKEEPER_CLIENT_PORT, Integer.toString(zooKeeperPort));
- Path parentdir = fs.getHomeDirectory();
- FSUtils.setRootDir(conf, parentdir);
- fs.mkdirs(parentdir);
- FSUtils.setVersion(fs, parentdir);
- hbaseMiniCluster = new MiniHBaseCluster(conf, N);
- }
-
- try {
- if (N == 1) {
- // If there is only one client and one HRegionServer, we assume nothing
- // has been set up at all.
- runNIsOne(cmd);
- } else {
- // Else, run
- runNIsMoreThanOne(cmd);
- }
- } finally {
- if(this.miniCluster) {
- if (hbaseMiniCluster != null) hbaseMiniCluster.shutdown();
- if (zooKeeperCluster != null) zooKeeperCluster.shutdown();
- HBaseTestCase.shutdownDfs(dfsCluster);
- }
+ InterruptedException, ClassNotFoundException {
+ if (N == 1) {
+ // If there is only one client and one HRegionServer, we assume nothing
+ // has been set up at all.
+ runNIsOne(cmd);
+ } else {
+ // Else, run
+ runNIsMoreThanOne(cmd);
}
}
@@ -1295,11 +1261,10 @@ public class PerformanceEvaluation exten
System.err.println(message);
}
System.err.println("Usage: java " + this.getClass().getName() + " \\");
- System.err.println(" [--miniCluster] [--nomapred] [--rows=ROWS] [--table=NAME] \\");
+ System.err.println(" [--nomapred] [--rows=ROWS] [--table=NAME] \\");
System.err.println(" [--compress=TYPE] [--blockEncoding=TYPE] [-D<property=value>]* <command> <nclients>");
System.err.println();
System.err.println("Options:");
- System.err.println(" miniCluster Run the test on an HBaseMiniCluster");
System.err.println(" nomapred Run multiple clients using threads " +
"(rather than use mapreduce)");
System.err.println(" rows Rows each client runs. Default: One million");
@@ -1362,12 +1327,6 @@ public class PerformanceEvaluation exten
break;
}
- final String miniClusterArgKey = "--miniCluster";
- if (cmd.startsWith(miniClusterArgKey)) {
- this.miniCluster = true;
- continue;
- }
-
final String nmr = "--nomapred";
if (cmd.startsWith(nmr)) {
this.nomapred = true;