dictionary - Map reduce java fails at mapping during its first reading -
when i'm trying debug program on simple input, fails @ context.write(text, text)
command. why this, , how can fix it?
public class taskmapper extends mapper<longwritable, text, text, text> { private text country = new text(); private text browser = new text(); public void map(longwritable offset, text line, context context) throws ioexception, interruptedexception { string[] words = line.tostring().split(" "); country.set(words[1]); browser.set(words[0]); context.write(country, browser); } }
the input file is:
chrome israel ie israel firefox denmark safari denmark chrome israel
Comments
Post a Comment