Changes between Version 1 and Version 2 of NCTU110329/Lab7


Ignore:
Timestamp:
Apr 26, 2011, 1:07:48 PM (14 years ago)
Author:
jazz
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • NCTU110329/Lab7

    v1 v2  
    1515~$ hadoop fs -put /etc/hadoop/conf lab7_input
    1616~$ hadoop jar hadoop-streaming.jar -input lab7_input -output lab7_out1 -mapper /bin/cat -reducer /usr/bin/wc
     17~$ hadoop fs -cat lab7_out1/part-00000
    1718}}}
    1819
     
    2425~$ chmod a+x streamingMapper.sh
    2526~$ chmod a+x streamingReducer.sh
    26 ~$ hadoop fs -rmr input output
    27 ~$ hadoop fs -put /etc/hadoop/conf input
    28 ~$ hadoop jar hadoop-streaming.jar -input input -output output -mapper streamingMapper.sh -reducer streamingReducer.sh -file streamingMapper.sh -file streamingReducer.sh
     27~$ hadoop jar hadoop-streaming.jar -input lab7_input -output lab7_out2 -mapper streamingMapper.sh -reducer streamingReducer.sh -file streamingMapper.sh -file streamingReducer.sh
     28~$ hadoop fs -cat lab7_out2/part-00000
    2929}}}
    3030
     
    9999 * 開始執行
    100100{{{
    101 ~$ hadoop jar hadoop-streaming.jar -mapper mapper.php -reducer reducer.php -input lab7_input -output lab7_out2 -file mapper.php -file reducer.php
     101~$ hadoop jar hadoop-streaming.jar -mapper mapper.php -reducer reducer.php -input lab7_input -output lab7_out3 -file mapper.php -file reducer.php
    102102}}}
    103103 * 檢查結果
    104104{{{
    105 ~$ hadoop fs -cat lab7_out2/part-00000
     105~$ hadoop fs -cat lab7_out3/part-00000
    106106}}}
    107