Changes between Version 7 and Version 8 of NCHCCloudCourse100928/Lab1
- Timestamp:
- Jul 20, 2011, 10:57:00 PM (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
NCHCCloudCourse100928/Lab1
v7 v8 31 31 == Hadoop Streaming with commands == 32 32 33 * 範例一:使用 cat 當 mapper,使用 wc 當 reducer33 * 確認 hadoop 有啟動 34 34 {{{ 35 35 hadoop@lucid:~$ cd /opt/hadoop 36 36 hadoop@lucid:/opt/hadoop$ bin/start-all.sh 37 }}} 38 * 範例一:使用 cat 當 mapper,使用 wc 當 reducer 39 {{{ 37 40 hadoop@lucid:/opt/hadoop$ bin/hadoop fs -put conf input 38 41 hadoop@lucid:/opt/hadoop$ bin/hadoop jar ./contrib/streaming/hadoop-0.20.2-streaming.jar -input input -output output -mapper /bin/cat -reducer /usr/bin/wc … … 48 51 hadoop@lucid:/opt/hadoop$ bin/hadoop jar ./contrib/streaming/hadoop-0.20.2-streaming.jar -input input -output output -mapper streamingMapper.sh -reducer streamingReducer.sh -file streamingMapper.sh -file streamingReducer.sh 49 52 }}} 50 53 * 觀看執行結果 54 {{{ 55 hadoop@lucid:/opt/hadoop$ bin/hadoop fs -cat output/part-00000 56 }}}