summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Buck <jbbuck@gmail.com>2013-05-02 13:55:57 -0700
committerJoe Buck <jbbuck@gmail.com>2013-05-02 13:55:57 -0700
commitd3107c89780e5bd75bd92895a8d1441c170d0be1 (patch)
tree7ca658647d75c3e21060d2444692dc59f16e9f15
parentb4e73cc6ccaab1a6e99aba096f38fecb0c3f6603 (diff)
downloadceph-d3107c89780e5bd75bd92895a8d1441c170d0be1.tar.gz
testing: adding a Terasort test for Hadoop
-rwxr-xr-xqa/workunits/hadoop-terasort/test.sh40
1 files changed, 40 insertions, 0 deletions
diff --git a/qa/workunits/hadoop-terasort/test.sh b/qa/workunits/hadoop-terasort/test.sh
new file mode 100755
index 00000000000..d198c5baf66
--- /dev/null
+++ b/qa/workunits/hadoop-terasort/test.sh
@@ -0,0 +1,40 @@
+#!/bin/sh -e
+
+echo "starting hadoop-terasort test"
+
+# bail if $TESTDIR is not set as this test will fail in that scenario
+[ -z $TESTDIR] && { echo "\$TESTDIR needs to be set, but is not. Exiting."; exit 1; }
+
+command0="export JAVA_HOME=/usr/lib/jvm/default-java"
+command1="$TESTDIR/apache_hadoop/bin/hadoop dfs -mkdir /tests"
+command2="$TESTDIR/apache_hadoop/bin/hadoop dfs -mkdir /tests/terasort_data"
+command3="$TESTDIR/apache_hadoop/bin/hadoop jar $TESTDIR/apache_hadoop/build/hadoop-*examples*jar teragen 20000000 /tests/terasort_data"
+command4="$TESTDIR/apache_hadoop/bin/hadoop dfs -rmr /tests/terasort_data"
+#command1="mkdir -p $TESTDIR/hadoop_input"
+#command2="wget http://ceph.com/qa/hadoop_input_files.tar -O $TESTDIR/hadoop_input/files.tar"
+#command3="cd $TESTDIR/hadoop_input"
+#command4="tar -xf $TESTDIR/hadoop_input/files.tar"
+#command5="$TESTDIR/apache_hadoop/bin/hadoop fs -mkdir wordcount_input"
+#command6="$TESTDIR/apache_hadoop/bin/hadoop fs -put $TESTDIR/hadoop_input/*txt wordcount_input/"
+#command7="$TESTDIR/apache_hadoop/bin/hadoop jar $TESTDIR/apache_hadoop/build/hadoop-example*jar wordcount wordcount_input wordcount_output"
+#command8="rm -rf $TESTDIR/hadoop_input"
+
+
+#print out the command
+echo "----------------------"
+echo $command0
+echo $command1
+echo $command2
+echo $command3
+echo $command4
+echo "----------------------"
+
+#now execute the command
+$command0
+$command1
+$command2
+$command3
+#$command4
+
+echo "completed hadoop-terasort test"
+exit 0