accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhava...@apache.org
Subject [07/10] git commit: ACCUMULO-2042 Merge branch '1.4.5-SNAPSHOT' into 1.5.1-SNAPSHOT
Date Tue, 07 Jan 2014 14:23:06 GMT
ACCUMULO-2042 Merge branch '1.4.5-SNAPSHOT' into 1.5.1-SNAPSHOT

Conflicts:
	test/src/main/java/org/apache/accumulo/test/scalability/Run.java


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/833ac353
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/833ac353
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/833ac353

Branch: refs/heads/master
Commit: 833ac35339e91893063aba0f5cde8ff4886b2337
Parents: 21b1b11 a3d77e4
Author: Bill Havanki <bhavanki@cloudera.com>
Authored: Tue Jan 7 09:19:04 2014 -0500
Committer: Bill Havanki <bhavanki@cloudera.com>
Committed: Tue Jan 7 09:19:04 2014 -0500

----------------------------------------------------------------------
 .../apache/accumulo/test/scalability/Run.java   |  2 +-
 test/system/scalability/README                  | 35 ++++++++++++++------
 test/system/scalability/run.py                  |  2 ++
 3 files changed, 28 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/833ac353/test/src/main/java/org/apache/accumulo/test/scalability/Run.java
----------------------------------------------------------------------
diff --cc test/src/main/java/org/apache/accumulo/test/scalability/Run.java
index 6622d7c,0000000..0c598c0
mode 100644,000000..100644
--- a/test/src/main/java/org/apache/accumulo/test/scalability/Run.java
+++ b/test/src/main/java/org/apache/accumulo/test/scalability/Run.java
@@@ -1,88 -1,0 +1,88 @@@
 +/*
 + * Licensed to the Apache Software Foundation (ASF) under one or more
 + * contributor license agreements.  See the NOTICE file distributed with
 + * this work for additional information regarding copyright ownership.
 + * The ASF licenses this file to You under the Apache License, Version 2.0
 + * (the "License"); you may not use this file except in compliance with
 + * the License.  You may obtain a copy of the License at
 + *
 + *     http://www.apache.org/licenses/LICENSE-2.0
 + *
 + * Unless required by applicable law or agreed to in writing, software
 + * distributed under the License is distributed on an "AS IS" BASIS,
 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 + * See the License for the specific language governing permissions and
 + * limitations under the License.
 + */
 +package org.apache.accumulo.test.scalability;
 +
 +import java.io.FileInputStream;
 +import java.util.Properties;
 +import java.net.InetAddress;
 +
 +import org.apache.accumulo.core.cli.Help;
 +import org.apache.accumulo.core.util.CachedConfiguration;
 +import org.apache.accumulo.test.scalability.ScaleTest;
 +import org.apache.hadoop.conf.Configuration;
 +import org.apache.hadoop.fs.FileSystem;
 +import org.apache.hadoop.fs.Path;
 +
 +import com.beust.jcommander.Parameter;
 +
 +public class Run {
 +  
 +  static class Opts extends Help {
 +    @Parameter(names="--testId", required=true)
 +    String testId;
 +    @Parameter(names="--action", required=true, description="one of 'setup', 'teardown'
or 'client'")
 +    String action;
 +    @Parameter(names="--count", description="number of tablet servers", required=true)
 +    int numTabletServers; 
 +  }
 +  
 +  public static void main(String[] args) throws Exception {
 +    
 +    final String sitePath = "/tmp/scale-site.conf";
 +    final String testPath = "/tmp/scale-test.conf";
 +    Opts opts = new Opts();
 +    opts.parseArgs(Run.class.getName(), args);
 +    
 +    Configuration conf = CachedConfiguration.getInstance();
 +    FileSystem fs;
 +    fs = FileSystem.get(conf);
 +    
 +    fs.copyToLocalFile(new Path("/accumulo-scale/conf/site.conf"), new Path(sitePath));
 +    fs.copyToLocalFile(new Path(String.format("/accumulo-scale/conf/%s.conf", opts.testId)),
new Path(testPath));
 +    
 +    // load configuration file properties
 +    Properties scaleProps = new Properties();
 +    Properties testProps = new Properties();
 +    try {
 +      FileInputStream fis = new FileInputStream(sitePath);
 +      scaleProps.load(fis);
 +      fis.close();
 +      fis = new FileInputStream(testPath);
 +      testProps.load(fis);
 +    } catch (Exception e) {
 +      System.out.println("Problem loading config file");
 +      e.printStackTrace();
 +    }
 +    
-     ScaleTest test = (ScaleTest) Class.forName(String.format("accumulo.test.scalability.%s",
opts.testId)).newInstance();
++    ScaleTest test = (ScaleTest) Class.forName(String.format("org.apache.accumulo.test.scalability.%s",
opts.testId)).newInstance();
 +    
 +    test.init(scaleProps, testProps, opts.numTabletServers);
 +    
 +    if (opts.action.equalsIgnoreCase("setup")) {
 +      test.setup();
 +    } else if (opts.action.equalsIgnoreCase("client")) {
 +      InetAddress addr = InetAddress.getLocalHost();
 +      String host = addr.getHostName();
 +      fs.createNewFile(new Path("/accumulo-scale/clients/" + host));
 +      test.client();
 +      fs.copyFromLocalFile(new Path("/tmp/scale.out"), new Path("/accumulo-scale/results/"
+ host));
 +    } else if (opts.action.equalsIgnoreCase("teardown")) {
 +      test.teardown();
 +    }
 +  }
 +  
 +}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/833ac353/test/system/scalability/README
----------------------------------------------------------------------
diff --cc test/system/scalability/README
index f678061,cd7440c..2e4514d
--- a/test/system/scalability/README
+++ b/test/system/scalability/README
@@@ -8,16 -21,18 +21,18 @@@ data
  
      cp conf/Ingest.conf.example conf/Ingest.conf
  
- 4. Each test has a unique ID which correlates with its test code in:
+     Each test has a unique ID (e.g., "Ingest") which correlates with its test
+     code in:
  
 -    org.apache.accumulo.server.test.scalability.tests.<ID>
 +    org.apache.accumulo.test.scalability.tests.<ID>
  
-     This ID correlates with a the following config file:
+     This ID correlates with a config file:
  
-     ./conf/<ID>.conf
+     conf/<ID>.conf
  
- 5. To run the test, just specifying its ID to the run.py script
+ To run the test, specify its ID to the run.py script.
  
-     export ACCUMULO_HOME=/opt/accumulo; nohup ./run.py Ingest > test1.log 2>&1
&
+     nohup ./run.py Ingest > test1.log 2>&1 &
  
- 5. A directory will be create where logs and results are placed
+ A timestamped directory will be created, and results are placed in it as each
+ test completes.

http://git-wip-us.apache.org/repos/asf/accumulo/blob/833ac353/test/system/scalability/run.py
----------------------------------------------------------------------


Mime
View raw message