Changes between Version 1 and Version 2 of waue/2010/0120
- Timestamp:
- Jan 22, 2010, 5:56:48 PM (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
waue/2010/0120
v1 v2 1 * 下面程式碼雖然看起來跑wordcount , 但其實跑helloword 1 = 用Hadoop 0.18 改成 Hadoop 0.20 程式易出現的問題 = 2 3 == 前言 == 4 * 下面程式碼雖然看起來跑wordcount , 但出來的結果卻是跑 helloword 2 5 3 6 {{{ … … 72 75 }}} 73 76 77 輸入檔內容為 78 {{{ 79 #!text 74 80 81 i am little cat 82 you are small dog 83 haha 84 }}} 85 86 * 預期結果 87 88 {{{ 89 am 1 90 are 1 91 cat 1 92 .... 93 }}} 94 95 * 執行結果: 96 97 {{{ 98 0 i am little cat 99 12 you are small dog 100 32 haha 101 ... 102 }}} 103 104 * 解決方法提示 105 106 已經用 org.apache.hadoop.mapreduce.Mapper; org.apache.hadoop.mapreduce.Reducer; 來實做的map() 與 reduce () 的 function, 107 108 implement 時不可用 '''''map(LongWritable key, Text value, OutputCollector<Text, IntWritable> output, Reporter reporter) ''''', 109 110 應改成 '''map(LongWritable key, Text value, Context context) ''' 來實做 111