Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

ACCUMULO-827 Get all CloudStone tests running again

- Fix table code in CloudStone 7 and 8
- Fix options in README


git-svn-id: https://svn.apache.org/repos/asf/accumulo/trunk@1407902 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information...
commit a33a33cc44798c11731f4ffedc22ccb8388a0dd5 1 parent b9842d7
@joshelser joshelser authored
View
4 test/system/bench/README
@@ -8,8 +8,8 @@ Syntax for running run.py:
Specifying a specific benchmark or set of benchmarks runs only those, while
not specifying any runs all benchmarks.
-l Lists the benchmarks that will be run
--v <run_speed> can either be slow, medium or fast
--s <log_level> is a number representing the verbosity of the debugging output: 10 is debug, 20 is info, 30 is warning, etc.
+-s <run_speed> can either be slow, medium or fast
+-v <log_level> is a number representing the verbosity of the debugging output: 10 is debug, 20 is info, 30 is warning, etc.
-u <user> user to use when connecting with accumulo. If not set you will be prompted to input it.
-p <password> password to use when connecting with accumulo. If not set you will be prompted to input it.
-i <instance> instance to use when connecting with accumulo. If not set you will be prompted to input it.
View
30 test/system/bench/lib/RowHashBenchmark.py
@@ -42,23 +42,20 @@ class RowHashBenchmark(Benchmark):
output_table = 'RowHashTestOutput'
def setUp(self):
- random.jumpahead(int(time.time()))
- num = random.randint(1, 100000)
- self.input_table = self.input_table + "_" + str(num)
- self.output_table = self.output_table + "_" + str(num)
#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 RowHashTestInput\n')
- # if out.find('no such table') == -1:
- # code, out, err = cloudshell.run(self.username, self.password, 'deletetable RowHashTestInput\n')
- # self.sleep(15)
+ code, out, err = cloudshell.run(self.username, self.password, 'table %s\n' % self.input_table)
+ if out.find('does not exist') == -1:
+ code, out, err = cloudshell.run(self.username, self.password, 'deletetable -f %s\n' % self.input_table)
+ self.sleep(15)
code, out, err = cloudshell.run(self.username, self.password, "createtable %s -sf %s\n" % (self.input_table, file))
- #code, out, err = cloudshell.run('table RowHashTest\n')
- #if out.find('no such table') == -1:
- # code, out, err = cloudshell.run('user root\nsecret\ndeletetable RowHashTest\n')
- # self.sleep(15)
+ code, out, err = cloudshell.run(self.username, self.password, 'table %s\n' % self.output_table)
+ if out.find('does not exist') == -1:
+ code, out, err = cloudshell.run(self.username, self.password, 'deletetable -f %s\n' %
+ self.output_table)
+ self.sleep(15)
code, out, err = cloudshell.run(self.username, self.password, "createtable %s -sf %s\n" % (self.output_table, file))
command = self.buildcommand('org.apache.accumulo.examples.simple.mapreduce.TeraSortIngest',
self.numrows(),
@@ -77,6 +74,13 @@ def setUp(self):
out, err = handle.communicate("")
Benchmark.setUp(self)
+ def tearDown(self):
+ code, out, err = cloudshell.run(self.username, self.password, "deletetable -f %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 -f %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
@@ -109,7 +113,7 @@ def runTest(self):
return handle.returncode, out, err
def shortDescription(self):
- return 'Hashes %d rows from one tableand outputs them into another Table. '\
+ return 'Hashes %d rows from one table and outputs them into another table. '\
'Lower score is better.' % (self.numrows())
def setSpeed(self, speed):
View
18 test/system/bench/lib/TeraSortBenchmark.py
@@ -42,16 +42,16 @@ class TeraSortBenchmark(Benchmark):
def setUp(self):
- random.jumpahead(int(time.time()))
- num = random.randint(1, 100000)
- #self.tablename = self.tablename + "-" + str(num)
- # Find which hadoop version
- # code, out, err = cloudshell.run(self.username, self.password, 'table %s\n' % self.tablename)
- #if out.find('no such table') == -1:
- # log.debug('Deleting table %s' % self.tablename)
- # code, out, err = cloudshell.run(self.username, self.password, 'deletetable %s\n' % self.tablename)
- # self.sleep(10)
+ code, out, err = cloudshell.run(self.username, self.password, 'table %s\n' % self.tablename)
+ if out.find('does not exist') == -1:
+ log.debug('Deleting table %s' % self.tablename)
+ code, out, err = cloudshell.run(self.username, self.password, 'deletetable -f %s\n' % self.tablename)
Benchmark.setUp(self)
+
+ def tearDown(self):
+ code, out, err = cloudshell.run(self.username, self.password, "deletetable -f %s\n" % self.tablename)
+ self.assertEqual(code, 0, 'Could not delete %s, %s' % (self.tablename, out))
+ Benchmark.tearDown(self)
def keysizemin(self):
return self.keymin
Please sign in to comment.
Something went wrong with that request. Please try again.