From 26c490f404731d053a6205719b6246502c07b449 Mon Sep 17 00:00:00 2001 From: Patrick Simianer Date: Sat, 14 Jun 2014 16:46:27 +0200 Subject: init --- hadoop/cacheArchive/streaming.sh | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 hadoop/cacheArchive/streaming.sh (limited to 'hadoop/cacheArchive/streaming.sh') diff --git a/hadoop/cacheArchive/streaming.sh b/hadoop/cacheArchive/streaming.sh new file mode 100755 index 0000000..6bc9cda --- /dev/null +++ b/hadoop/cacheArchive/streaming.sh @@ -0,0 +1,28 @@ +#!/bin/sh + +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" + +hadoop dfs -put input input +hadoop dfs -put my_module.zip my_module.zip +hadoop dfs -put other_module.zip other_module.zip + +IN=input +OUT=output + +$HSTREAMING \ + -input $IN\ + -output $OUT \ + -mapper "python mapper.py" \ + -reducer "NONE" \ + -file mapper.py\ + -cacheArchive 'hdfs:///user/simianer/my_module.zip#my_module' \ + -cacheArchive 'hdfs:///user/simianer/other_module.zip#other_module' \ + -jobconf mapred.reduce.tasks=30 #hier mal 30 statt 3 + +hadoop dfs -get $OUT . +hadoop dfs -rm $IN +hadoop dfs -rmr $OUT + -- cgit v1.2.3