Sha256: e4b88fdf69cbcad3205d96bcf9c93d0d17cce176db67dc98d07979be63dd2561
Contents?: true
Size: 972 Bytes
Versions: 7
Compression:
Stored size: 972 Bytes
Contents
#!/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 [ "$output_file" == "" ] ; then echo "$0 input_file output_file [mapper=/bin/cat] [reducer=/usr/bin/uniq] [extra_args]" ; exit ; fi HADOOP_HOME=${HADOOP_HOME-/usr/lib/hadoop} # Can add fun stuff like # -jobconf mapred.map.tasks=3 \ # -jobconf mapred.reduce.tasks=3 \ exec ${HADOOP_HOME}/bin/hadoop \ jar ${HADOOP_HOME}/contrib/streaming/hadoop-*streaming*.jar \ "$@" \ -jobconf "mapred.job.name=`basename $0`-$map_script-$input_file-$output_file" \ -mapper "$map_script" \ -reducer "$reduce_script" \ -input "$input_file" \ -output "$output_file"
Version data entries
7 entries across 7 versions & 1 rubygems