#!/bin/bash HADOOP_HOME=${HADOOP_HOME-/usr/lib/hadoop} input_file=${1} ; shift output_file=${1} ; shift if [ "$output_file" == "" ] ; then echo "$0 input_file output_file" ; exit ; fi HADOOP_HOME=${HADOOP_HOME-/usr/lib/hadoop} cmd="${HADOOP_HOME}/bin/hadoop \ jar ${HADOOP_HOME}/contrib/streaming/hadoop-*streaming*.jar \ -Dmapred.output.compress=true \ -Dmapred.output.compression.codec=org.apache.hadoop.io.compress.BZip2Codec \ -Dmapred.reduce.tasks=1 \ -mapper \"/bin/cat\" \ -reducer \"/bin/cat\" \ -input \"$input_file\" \ -output \"$output_file\" \ " echo $cmd $cmd