Changes between Version 1 and Version 2 of NCTU110329/Lab7
- Timestamp:
- Apr 26, 2011, 1:07:48 PM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
NCTU110329/Lab7
v1 v2 15 15 ~$ hadoop fs -put /etc/hadoop/conf lab7_input 16 16 ~$ 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 17 18 }}} 18 19 … … 24 25 ~$ chmod a+x streamingMapper.sh 25 26 ~$ 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 29 29 }}} 30 30 … … 99 99 * 開始執行 100 100 {{{ 101 ~$ hadoop jar hadoop-streaming.jar -mapper mapper.php -reducer reducer.php -input lab7_input -output lab7_out 2-file mapper.php -file reducer.php101 ~$ hadoop jar hadoop-streaming.jar -mapper mapper.php -reducer reducer.php -input lab7_input -output lab7_out3 -file mapper.php -file reducer.php 102 102 }}} 103 103 * 檢查結果 104 104 {{{ 105 ~$ hadoop fs -cat lab7_out 2/part-00000105 ~$ hadoop fs -cat lab7_out3/part-00000 106 106 }}} 107