Skip to content

Commit

Permalink
Add as_hdfs to the smoketest, and add teravalidate as well.
Browse files Browse the repository at this point in the history
  • Loading branch information
Victor Lowther committed Oct 25, 2011
1 parent 960c5f4 commit daf1281
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions smoketest/00-deploy-hadoop.test
@@ -1,6 +1,7 @@
#!/bin/bash
# This is a placeholder for the real Hadoop smoketest.
# It does nothing and fails.
res=0

spin_until_up() {
# $1 = host
Expand Down Expand Up @@ -52,11 +53,19 @@ echo -n "Waiting for the secondary name node to come up"
spin_until_up "$secondarynamenode" hadoop-0.20-secondarynamenode
echo " Done."

as_hdfs() { run_on "$namenode" su - hdfs -- "$@"; }

# Get a dfsadmin report from the master name node for graet justice.
run_on "$namenode" su - hdfs -- hadoop dfsadmin -report
as_hdfs hadoop dfsadmin -report

# Run teragen/terasort to verify cluster functionality
echo "Running teragen..."
run_on "$namenode" su - hdfs -- hadoop jar hadoop-examples.jar teragen -Dmapred.map.tasks=4 10000 teragen || exit 1
as_hdfs hadoop jar hadoop-examples.jar teragen -Dmapred.map.tasks=4 \
100000 teragen || exit 1
echo "Running terasort..."
run_on "$namenode" su - hdfs -- hadoop jar hadoop-examples.jar terasort -Dmapred.reduce.tasks=4 teragen terasort || exit 1
as_hdfs hadoop jar hadoop-examples.jar terasort -Dmapred.reduce.tasks=4 \
teragen terasort || exit 1
echo "Running teravalidate..."
as_hdfs hadoop jar hadoop-examples.jar teravalidate terasort teravalidate || \
exit 1

0 comments on commit daf1281

Please sign in to comment.