#!/usr/bin/env bash input_file=${1} ; shift output_file=${1} ; shift map_script=${1-/bin/cat} ; shift reduce_script=${1-/usr/bin/uniq} ; shift if [ "$reduce_script" == "" ] ; then echo "$0 input_file output_file [sort_fields] [mapper] [reducer] [args]" ; exit ; fi hadoop jar /home/flip/hadoop/h/contrib/streaming/hadoop-*-streaming.jar \ -mapper "$map_script" \ -reducer "$reduce_script" \ -input "$input_file" \ -output "$output_file" \ "$@" # -jobconf mapred.map.tasks=3 \ # -jobconf mapred.reduce.tasks=3 \