Changes between Version 1 and Version 2 of waue/2010/0120


Ignore:
Timestamp:
Jan 22, 2010, 5:56:48 PM (14 years ago)
Author:
waue
Comment:

--

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
    25
    36{{{
     
    7275}}}
    7376
     77輸入檔內容為
     78{{{
     79#!text
    7480
     81i am little cat
     82you are small dog
     83haha
     84}}}
     85
     86 * 預期結果
     87
     88{{{
     89am 1
     90are 1
     91cat 1
     92....
     93}}}
     94
     95 * 執行結果:
     96
     97{{{
     980   i am little cat
     9912    you are small dog
     10032  haha
     101...
     102}}}
     103
     104 * 解決方法提示
     105
     106已經用 org.apache.hadoop.mapreduce.Mapper;  org.apache.hadoop.mapreduce.Reducer;  來實做的map() 與 reduce () 的 function,
     107
     108implement 時不可用 '''''map(LongWritable key, Text value,  OutputCollector<Text, IntWritable> output, Reporter reporter) ''''',
     109
     110應改成 '''map(LongWritable key, Text value,  Context context)  ''' 來實做
     111