Created
June 5, 2015 09:16
-
-
Save akanto/22c2aa0d46fa2bbd657c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| export HADOOP_LIBS=/usr/hdp/2.2.4.2-2/hadoop-mapreduce | |
| export JAR_EXAMPLES=$HADOOP_LIBS/hadoop-mapreduce-examples.jar | |
| export JAR_JOBCLIENT=$HADOOP_LIBS/hadoop-mapreduce-client-jobclient-2.6.0.2.2.4.2-2-tests.jar | |
| terasort(){ | |
| echo "############################################" | |
| echo Running terasort tests.. | |
| echo "############################################" | |
| CMD="hadoop jar $JAR_EXAMPLES teragen -Dmapreduce.job.maps=250 5000000000 /user/ambari-qa/terasort-input" | |
| echo TEST 1: $CMD | |
| su hdfs -c "$CMD" 1> terasort-teragen-time.log 2> terasort-teragen.log | |
| CMD="hadoop jar $JAR_EXAMPLES terasort -Dmapreduce.job.reduces=200 /user/ambari-qa/terasort-input /user/ambari-qa/terasort-output" | |
| echo TEST 2: $CMD | |
| su hdfs -c "$CMD" 1> terasort-terasort-time.log 2> terasort-terasort.log | |
| CMD="hadoop jar $JAR_EXAMPLES teravalidate /user/ambari-qa/terasort-output /user/ambari-qa/terasort-report" | |
| echo TEST 3: $CMD | |
| su hdfs -c "$CMD" 1> terasort-teravalidate-time.log 2> terasort-teravalidate.log | |
| } | |
| terasort | |
| tar -zcvf logs.tar.gz *.log |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment