wiki:NCHCCloudCourse100802/Demo1

Version 2 (modified by jazz, 14 years ago) (diff)

--

Hadoop Streaming with commands

jazz@hadoop:~$ echo "sed -e \"s/ /\n/g\" | grep ." > streamingMapper.sh
jazz@hadoop:~$ echo "uniq -c | awk '{print $2 \"\t\" $1}'" > streamingReducer.sh
jazz@hadoop:~$ hadoop fs -rmr input output
jazz@hadoop:~$ hadoop fs -put /etc/hadoop/conf input
jazz@hadoop:~$ hadoop jar hadoop-streaming.jar -input input -output output -mapper `pwd`/streamingMapper.sh -reducer `pwd`/streamingReducer.sh