summaryrefslogtreecommitdiff
path: root/hadoop/streaming/test
diff options
context:
space:
mode:
authorPatrick Simianer <p@simianer.de>2014-06-14 19:03:21 +0200
committerPatrick Simianer <p@simianer.de>2014-06-14 19:03:21 +0200
commit5ddc763ab9953eebdaf78af4eb72288d7955b310 (patch)
treefffaf3d22173feae684b7c02ce86c67cf77c7fec /hadoop/streaming/test
parent26c490f404731d053a6205719b6246502c07b449 (diff)
cleanup
Diffstat (limited to 'hadoop/streaming/test')
-rw-r--r--hadoop/streaming/test/input10
-rwxr-xr-xhadoop/streaming/test/test.sh23
2 files changed, 33 insertions, 0 deletions
diff --git a/hadoop/streaming/test/input b/hadoop/streaming/test/input
new file mode 100644
index 0000000..338fd87
--- /dev/null
+++ b/hadoop/streaming/test/input
@@ -0,0 +1,10 @@
+0 1 a c
+0 2 b c
+0 3 c c
+1 4 a c
+1 5 b c
+1 6 c c
+1 7 d c
+2 8 a c
+2 9 b c
+2 10 c c
diff --git a/hadoop/streaming/test/test.sh b/hadoop/streaming/test/test.sh
new file mode 100755
index 0000000..2f09bac
--- /dev/null
+++ b/hadoop/streaming/test/test.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+
+hadoop dfs -put input input
+
+HADOOP_HOME=/usr/lib/hadoop
+HADOOP_VERSION=0.20.2-cdh3u1
+JAR=contrib/streaming/hadoop-streaming-$HADOOP_VERSION.jar
+HSTREAMING="$HADOOP_HOME/bin/hadoop jar $HADOOP_HOME/$JAR"
+
+OUT=test_out
+
+$HSTREAMING \
+ -input input \
+ -output $OUT \
+ -mapper /bin/cat \
+ -jobconf "mapred.reduce.tasks=3" \
+ -reducer org.apache.hadoop.mapred.lib.IdentityReducer
+
+hadoop dfs -get $OUT .
+hadoop dfs -rmr $OUT
+hadoop dfs -rm input
+