aboutsummaryrefslogtreecommitdiff
path: root/demo
diff options
context:
space:
mode:
authorAndrew McDermott <andrew.mcdermott@linaro.org>2014-02-12 16:59:54 +0000
committerAndrew McDermott <andrew.mcdermott@linaro.org>2014-02-12 16:59:54 +0000
commit86a9909c577bdd641e7483f56ffbec998ea421eb (patch)
tree3f67536f5008b7d434d0a25e2d1aa97d9179b74b /demo
downloadopenjdk8-hadoop-LCA14-86a9909c577bdd641e7483f56ffbec998ea421eb.tar.gz
Initial import
Signed-off-by: Andrew McDermott <andrew.mcdermott@linaro.org>
Diffstat (limited to 'demo')
-rwxr-xr-xdemo/teragen14
-rwxr-xr-xdemo/terasort11
-rwxr-xr-xdemo/teravalidate11
3 files changed, 36 insertions, 0 deletions
diff --git a/demo/teragen b/demo/teragen
new file mode 100755
index 0000000..7169484
--- /dev/null
+++ b/demo/teragen
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+if [ $# -lt 2 ]; then
+ echo "usage: teragen <number-of-gigabytes> <output-filename>"
+ exit 1
+fi
+
+# The first parameter specifies the number of rows of input data to
+# generate, each of which having a size of 100 bytes, hence n/100.
+
+one_gb_in_bytes=1073741824
+let input_size="${one_gb_in_bytes} / 100 * $1"
+
+hadoop jar ${HADOOP_COMMON_HOME}/share/hadoop/mapreduce/hadoop-mapreduce-examples-${HADOOP_VERSN}.jar teragen $input_size "$2"
diff --git a/demo/terasort b/demo/terasort
new file mode 100755
index 0000000..a36bf0c
--- /dev/null
+++ b/demo/terasort
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+progname=$(basename "$0")
+
+if [ $# -lt 2 ]; then
+ echo "usage: $progname <input-file> <output-file>"
+ exit 1
+fi
+
+hadoop jar ${HADOOP_COMMON_HOME}/share/hadoop/mapreduce/hadoop-mapreduce-examples-${HADOOP_VERSN}.jar terasort "$1" "$2"
+
diff --git a/demo/teravalidate b/demo/teravalidate
new file mode 100755
index 0000000..c4a7b44
--- /dev/null
+++ b/demo/teravalidate
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+progname=$(basename "$0")
+
+if [ $# -lt 2 ]; then
+ echo "usage: $progname <input-file> <output-file>"
+ exit 1
+fi
+
+hadoop jar ${HADOOP_COMMON_HOME}/share/hadoop/mapreduce/hadoop-mapreduce-examples-${HADOOP_VERSN}.jar teravalidate "$1" "$2"
+