Updated Branches: refs/heads/master c909eb1fc -> 03e4ea131
BIGTOP-1057: Adding teragen/terasort and benchmark tests to mapreduce smokes Project: http://git-wip-us.apache.org/repos/asf/bigtop/repo Commit: http://git-wip-us.apache.org/repos/asf/bigtop/commit/03e4ea13 Tree: http://git-wip-us.apache.org/repos/asf/bigtop/tree/03e4ea13 Diff: http://git-wip-us.apache.org/repos/asf/bigtop/diff/03e4ea13 Branch: refs/heads/master Commit: 03e4ea131a334572e44416cba982bf4768d25a83 Parents: c909eb1 Author: jayunit100 <[email protected]> Authored: Thu Sep 5 11:56:39 2013 -0400 Committer: Roman Shaposhnik <[email protected]> Committed: Sun Sep 8 12:28:23 2013 -0700 ---------------------------------------------------------------------- .../hadoop/mapreduce/TestHadoopExamples.groovy | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/bigtop/blob/03e4ea13/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/mapreduce/TestHadoopExamples.groovy ---------------------------------------------------------------------- diff --git a/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/mapreduce/TestHadoopExamples.groovy b/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/mapreduce/TestHadoopExamples.groovy index 7d91f28..890e39b 100644 --- a/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/mapreduce/TestHadoopExamples.groovy +++ b/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/mapreduce/TestHadoopExamples.groovy @@ -57,7 +57,8 @@ class TestHadoopExamples { private static Configuration conf; private static String mr_version = System.getProperty("mr.version", "mr2"); - static final String RANDOMTEXTWRITER_TOTALBYTES = (mr_version == "mr1") ? + + static final String RANDOMTEXTWRITER_TOTALBYTES = (mr_version == "mr1") ? "test.randomtextwrite.total_bytes" : "mapreduce.randomtextwriter.totalbytes"; @BeforeClass @@ -66,15 +67,23 @@ class TestHadoopExamples { TestUtils.unpackTestResources(TestHadoopExamples.class, EXAMPLES, null, EXAMPLES_OUT); } + static long terasortid = System.currentTimeMillis(); + + //Number of rows for terasort ~ number of splits + public static String terasort_rows = System.getProperty("terasort_rows", "1000"); + static Map examples = [ pi :'2 1000', wordcount :"$EXAMPLES/text $EXAMPLES_OUT/wordcount", + teragen :"${terasort_rows} teragen${terasortid}", + terasort :"teragen${terasortid} terasort${terasortid}", + teravalidate :"terasort${terasortid} tervalidate${terasortid}", multifilewc :"$EXAMPLES/text $EXAMPLES_OUT/multifilewc", aggregatewordcount:"$EXAMPLES/text $EXAMPLES_OUT/aggregatewordcount 2 textinputformat", aggregatewordhist :"$EXAMPLES/text $EXAMPLES_OUT/aggregatewordhist 2 textinputformat", grep :"$EXAMPLES/text $EXAMPLES_OUT/grep '[Cc]uriouser'", -// sleep :"-m 10 -r 10", + sleep :"-m 10 -r 10", secondarysort :"$EXAMPLES/ints $EXAMPLES_OUT/secondarysort", randomtextwriter :"-D $RANDOMTEXTWRITER_TOTALBYTES=1073741824 $EXAMPLES_OUT/randomtextwriter" ]; @@ -99,8 +108,7 @@ class TestHadoopExamples { @Test void testMRExample() { sh.exec("hadoop jar $testJar $testName $testArgs"); - - assertTrue("Example $testName failed", - sh.getRet() == 0); + assertTrue("Example $testName $testJar $testName $testArgs failed", sh.getRet() == 0); } } +
