mapper - the type must implement the inherited abstract method Reducer.reduce(Object, Iterator, OutputCollector, Reporter) -


i new hadoop, , first hadoop program.

i trying create mapper class called wordmapper, throws below error.

the type wordmapper must implement inherited abstract method mapper.map(object, object, outputcollector, reporter)

public class wordmapper extends mapreducebase implements mapper  {     public void map(writablecomparable key, writable values, outputcollector output, reporter reporter) throws ioexception      {         string line=values.tostring();         stringtokenizer tok=new stringtokenizer(line);         while(tok.hasmoretokens())         {             string t=tok.nexttoken();             output.collect(new text(t), new intwritable(1));         }      }  } 

can please tell me going wrong , suggest overcome problem

try fulfill mapper parameter this:

public class wcmapper extends mapreducebase implements mapper<longwritable, text, text, intwritable>  public void map(longwritable key, text values, outputcollector output, reporter reporter) 

Comments