summaryrefslogtreecommitdiff
path: root/hadoop/streaming/no_reducer.sh
diff options
context:
space:
mode:
Diffstat (limited to 'hadoop/streaming/no_reducer.sh')
-rwxr-xr-xhadoop/streaming/no_reducer.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/hadoop/streaming/no_reducer.sh b/hadoop/streaming/no_reducer.sh
new file mode 100755
index 0000000..7267166
--- /dev/null
+++ b/hadoop/streaming/no_reducer.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+
+hadoop dfs -put no_reducer.input no_reducer.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=no_reducer_out
+
+$HSTREAMING \
+ -input no_reducer.input \
+ -output $OUT \
+ -mapper "no_reducer.rb" \
+ -file "no_reducer.rb" \
+ -reducer NONE
+
+hadoop dfs -get $OUT .
+hadoop dfs -rmr $OUT
+hadoop dfs -rm no_reducer.input
+