aboutsummaryrefslogtreecommitdiff
path: root/demo
diff options
context:
space:
mode:
authorAndrew McDermott <andrew.mcdermott@linaro.org>2014-02-18 17:58:46 +0000
committerAndrew McDermott <andrew.mcdermott@linaro.org>2014-02-18 17:58:46 +0000
commit399b03781b9eca11fe4a0048d6d56939f0427cf2 (patch)
tree6238fb76548f0645b8f2e79821950c449960bb1d /demo
parent9316e4410771173f5f7333c500bd97178ec4a0fd (diff)
downloadopenjdk8-hadoop-LCA14-399b03781b9eca11fe4a0048d6d56939f0427cf2.tar.gz
Paramaterise dfsio tests
Diffstat (limited to 'demo')
-rwxr-xr-xdemo/dfsio-read-test9
-rwxr-xr-xdemo/dfsio-write-test8
2 files changed, 15 insertions, 2 deletions
diff --git a/demo/dfsio-read-test b/demo/dfsio-read-test
index f0e5bdd..49b3968 100755
--- a/demo/dfsio-read-test
+++ b/demo/dfsio-read-test
@@ -2,4 +2,11 @@
# test using 10 input files of size 1GB
-hadoop jar ${HADOOP_COMMON_HOME}/share/hadoop/mapreduce/hadoop-mapreduce-client-jobclient-${HADOOP_VERSN}-tests.jar TestDFSIO -read -nrFiles 10 -fileSize 1000
+
+nrFiles=1
+fileSize=100
+
+[[ $# -ge 1 ]] && nrFiles=$1
+[[ $# -ge 2 ]] && fileSize=$2
+
+hadoop jar ${HADOOP_COMMON_HOME}/share/hadoop/mapreduce/hadoop-mapreduce-client-jobclient-${HADOOP_VERSN}-tests.jar TestDFSIO -read -nrFiles $nrFiles -fileSize $fileSize
diff --git a/demo/dfsio-write-test b/demo/dfsio-write-test
index ae56c33..575ee01 100755
--- a/demo/dfsio-write-test
+++ b/demo/dfsio-write-test
@@ -2,4 +2,10 @@
# test that generates 10 output files of size 1GB for a total of 10GB
-hadoop jar ${HADOOP_COMMON_HOME}/share/hadoop/mapreduce/hadoop-mapreduce-client-jobclient-${HADOOP_VERSN}-tests.jar TestDFSIO -read -nrFiles 10 -fileSize 1000
+nrFiles=1
+fileSize=100
+
+[[ $# -ge 1 ]] && nrFiles=$1
+[[ $# -ge 2 ]] && fileSize=$2
+
+hadoop jar ${HADOOP_COMMON_HOME}/share/hadoop/mapreduce/hadoop-mapreduce-client-jobclient-${HADOOP_VERSN}-tests.jar TestDFSIO -write -nrFiles $nrFiles -fileSize $fileSize