accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1424615 - in /accumulo/trunk/test/system/bench: README lib/IngestBenchmark.py lib/RowHashBenchmark.py lib/path.py run.py
Date Thu, 20 Dec 2012 18:09:25 GMT
Author: ecn
Date: Thu Dec 20 18:09:25 2012
New Revision: 1424615

URL: http://svn.apache.org/viewvc?rev=1424615&view=rev
Log:
ACCUMULO-897 get the benchmarks to run again

Modified:
    accumulo/trunk/test/system/bench/README
    accumulo/trunk/test/system/bench/lib/IngestBenchmark.py
    accumulo/trunk/test/system/bench/lib/RowHashBenchmark.py
    accumulo/trunk/test/system/bench/lib/path.py
    accumulo/trunk/test/system/bench/run.py

Modified: accumulo/trunk/test/system/bench/README
URL: http://svn.apache.org/viewvc/accumulo/trunk/test/system/bench/README?rev=1424615&r1=1424614&r2=1424615&view=diff
==============================================================================
--- accumulo/trunk/test/system/bench/README (original)
+++ accumulo/trunk/test/system/bench/README Thu Dec 20 18:09:25 2012
@@ -38,5 +38,6 @@ The 4th Benchmark is Terasort.  Run the 
 
 4. Misc
 
-These benchmarks create tables in accumulo named 'test_ingest' and 'CloudIngestTest'.  These
tables are *NOT* deleted
-at the end of the benchmarks.
+These benchmarks create tables in accumulo named 'test_ingest' and 'CloudIngestTest'.  These
tables are deleted
+at the end of the benchmarks. The benchmarks will also alter user auths while it runs. It
is recommended that
+a benchmark user is created.

Modified: accumulo/trunk/test/system/bench/lib/IngestBenchmark.py
URL: http://svn.apache.org/viewvc/accumulo/trunk/test/system/bench/lib/IngestBenchmark.py?rev=1424615&r1=1424614&r2=1424615&view=diff
==============================================================================
--- accumulo/trunk/test/system/bench/lib/IngestBenchmark.py (original)
+++ accumulo/trunk/test/system/bench/lib/IngestBenchmark.py Thu Dec 20 18:09:25 2012
@@ -57,15 +57,15 @@ class IngestBenchmark(Benchmark):
     def runTest(self):
         commands = {}
         for i, s in enumerate(slaveNames()):
-            commands[s] = '%s %s -username %s -password %s -size %d -random %d %d %d %d'
% (
+            commands[s] = '%s %s -u %s -p %s --size %d --random %d --rows %d --start %d --cols
%d' % (
                 accumulo('bin', 'accumulo'),
                 'org.apache.accumulo.server.test.TestIngest',
-                '-u', self.username, '-p', self.password,
-                '--size', self.size(),
-                '--random', self.random(),
-                '--rows', self.count(),
-                '--start', i*self.count(),
-                '--cols', 1)
+                self.username, self.password,
+                self.size(),
+                self.random(),
+                self.count(),
+                i*self.count(),
+                1)
         results = runEach(commands)
         codes = {}
         for slave, (code, out, err) in results.items():

Modified: accumulo/trunk/test/system/bench/lib/RowHashBenchmark.py
URL: http://svn.apache.org/viewvc/accumulo/trunk/test/system/bench/lib/RowHashBenchmark.py?rev=1424615&r1=1424614&r2=1424615&view=diff
==============================================================================
--- accumulo/trunk/test/system/bench/lib/RowHashBenchmark.py (original)
+++ accumulo/trunk/test/system/bench/lib/RowHashBenchmark.py Thu Dec 20 18:09:25 2012
@@ -42,8 +42,6 @@ class RowHashBenchmark(Benchmark):
     output_table = 'RowHashTestOutput'
 
     def setUp(self): 
-        #if (not os.getenv("HADOOP_CLASSPATH")):
-        #    os.putenv("HADOOP_CLASSPATH", self.getjars(":"))
         dir = os.path.dirname(os.path.realpath(__file__))
         file = os.path.join( dir, 'splits' )  
         code, out, err = cloudshell.run(self.username, self.password, 'table %s\n' % self.input_table)

@@ -63,12 +61,12 @@ class RowHashBenchmark(Benchmark):
                                     '-xk', self.keysizemax(),
                                     '-nv', self.minvaluesize(),
                                     '-xv', self.maxvaluesize(),
-                                    '-t', self.input_table, 
+                                    '--table', self.input_table, 
                                     '-i', self.getInstance(),
                                     '-z', self.getZookeepers(),
                                     '-u', self.getUsername(),
                                     '-p', self.getPassword(),
-                                    --splits', self.maxmaps)
+                                    '--splits', self.maxmaps)
         handle = runner.start(command, stdin=subprocess.PIPE)
         log.debug("Running: %r", command)
         out, err = handle.communicate("")  
@@ -81,6 +79,13 @@ class RowHashBenchmark(Benchmark):
         self.assertEqual(code, 0, 'Could not delete %s, %s' % (self.output_table, out))
         Benchmark.tearDown(self)
 
+    def tearDown(self):
+        code, out, err = cloudshell.run(self.username, self.password, "deletetable %s\n"
% self.input_table)
+        self.assertEqual(code, 0, 'Could not delete %s, %s' % (self.input_table, out))
+        code, out, err = cloudshell.run(self.username, self.password, "deletetable %s\n"
% self.output_table)
+        self.assertEqual(code, 0, 'Could not delete %s, %s' % (self.output_table, out))
+        Benchmark.tearDown(self)
+
     def keysizemin(self):
         return self.keymin
 

Modified: accumulo/trunk/test/system/bench/lib/path.py
URL: http://svn.apache.org/viewvc/accumulo/trunk/test/system/bench/lib/path.py?rev=1424615&r1=1424614&r2=1424615&view=diff
==============================================================================
--- accumulo/trunk/test/system/bench/lib/path.py (original)
+++ accumulo/trunk/test/system/bench/lib/path.py Thu Dec 20 18:09:25 2012
@@ -17,9 +17,7 @@
 import os
 
 HERE = os.path.dirname(__file__)
-ACCUMULO_HOME = os.path.normpath(
-    os.path.join(HERE, *(os.pardir,)*4)
-    )
+ACCUMULO_HOME = os.getenv('ACCUMULO_HOME')
 
 def accumulo(*args):
     return os.path.join(ACCUMULO_HOME, *args)

Modified: accumulo/trunk/test/system/bench/run.py
URL: http://svn.apache.org/viewvc/accumulo/trunk/test/system/bench/run.py?rev=1424615&r1=1424614&r2=1424615&view=diff
==============================================================================
--- accumulo/trunk/test/system/bench/run.py (original)
+++ accumulo/trunk/test/system/bench/run.py Thu Dec 20 18:09:25 2012
@@ -55,6 +55,9 @@ def main():
     if not os.getenv('ZOOKEEPER_HOME'):
         print 'Please set the environment variable \'ZOOKEEPER_HOME\' before running the
benchmarks'
         sys.exit(0)
+    if not os.getenv('ACCUMULO_HOME'):
+        print 'Please set the environment variable \'ACCUMULO_HOME\' before running the benchmarks'
+        sys.exit(0)
     import textwrap
     benchmarks = getBenchmarks()
     benchmarks.sort(benchComparator)



Mime
View raw message