From: Sage Weil Date: Mon, 18 Aug 2014 15:37:38 +0000 (-0700) Subject: qa/workunits/hadoop-wordcount: use -x X-Git-Tag: v0.86~243^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=adaf5a6a88fe947622bf27ccc95067f07db7919b;p=ceph.git qa/workunits/hadoop-wordcount: use -x Signed-off-by: Sage Weil --- diff --git a/qa/workunits/hadoop-wordcount/test.sh b/qa/workunits/hadoop-wordcount/test.sh index d670610ac332..8d678bfa05ff 100755 --- a/qa/workunits/hadoop-wordcount/test.sh +++ b/qa/workunits/hadoop-wordcount/test.sh @@ -1,4 +1,4 @@ -#!/bin/sh -e +#!/bin/sh -ex echo "starting hadoop-wordcount test" @@ -11,42 +11,16 @@ echo "starting hadoop-wordcount test" # if HADOOP_MR_HOME is not set, use default [ -z $HADOOP_MR_HOME ] && { HADOOP_MR_HOME=$TESTDIR/apache_hadoop/build; } -command0="export JAVA_HOME=/usr/lib/jvm/default-java" -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="$HADOOP_HOME/bin/hadoop fs -mkdir /wordcount_input" -command6="$HADOOP_HOME/bin/hadoop fs -rm -r -f /wordcount_output" -command7="$HADOOP_HOME/bin/hadoop fs -put $TESTDIR/hadoop_input/*txt /wordcount_input/" -command8="$HADOOP_HOME/bin/hadoop jar $HADOOP_MR_HOME/hadoop-*examples.jar wordcount /wordcount_input /wordcount_output" -command9="rm -rf $TESTDIR/hadoop_input" - -#print out the command -echo "----------------------" -echo $command0 -echo $command1 -echo $command2 -echo $command3 -echo $command4 -echo $command5 -echo $command6 -echo $command7 -echo $command8 -echo $command9 -echo "----------------------" - -#now execute the command -$command0 -$command1 -$command2 -$command3 -$command4 -$command5 -$command6 -$command7 -$command8 -$command9 +export JAVA_HOME=/usr/lib/jvm/default-java +mkdir -p $TESTDIR/hadoop_input +wget http://ceph.com/qa/hadoop_input_files.tar -O $TESTDIR/hadoop_input/files.tar +cd $TESTDIR/hadoop_input +tar -xf $TESTDIR/hadoop_input/files.tar +$HADOOP_HOME/bin/hadoop fs -mkdir /wordcount_input +$HADOOP_HOME/bin/hadoop fs -rm -r -f /wordcount_output +$HADOOP_HOME/bin/hadoop fs -put $TESTDIR/hadoop_input/*txt /wordcount_input/ +$HADOOP_HOME/bin/hadoop jar $HADOOP_MR_HOME/hadoop-*examples.jar wordcount /wordcount_input /wordcount_output +rm -rf $TESTDIR/hadoop_input echo "completed hadoop-wordcount test" exit 0