Changes between Version 7 and Version 8 of NCHCCloudCourse100928/Lab1


Ignore:
Timestamp:
Jul 20, 2011, 10:57:00 PM (13 years ago)
Author:
waue
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • NCHCCloudCourse100928/Lab1

    v7 v8  
    3131== Hadoop Streaming with commands ==
    3232
    33  * 範例一:使用 cat 當 mapper,使用 wc 當 reducer
     33 * 確認 hadoop 有啟動
    3434{{{
    3535hadoop@lucid:~$ cd /opt/hadoop
    3636hadoop@lucid:/opt/hadoop$ bin/start-all.sh
     37}}}
     38 * 範例一:使用 cat 當 mapper,使用 wc 當 reducer
     39{{{
    3740hadoop@lucid:/opt/hadoop$ bin/hadoop fs -put conf input
    3841hadoop@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
     
    4851hadoop@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
    4952}}}
    50 
     53 * 觀看執行結果
     54{{{
     55hadoop@lucid:/opt/hadoop$ bin/hadoop fs -cat output/part-00000
     56}}}