@Override public void map(String line, Pipe<CountRec> out) { StringTokenizer tokenizer = new StringTokenizer(line); while (tokenizer.hasMoreTokens()) { outrec.word = tokenizer.nextToken(); outrec.count = 1; out.put(outrec); } }
@Override public void map(String in, Pipe<CountRec> out) { StringTokenizer tokenizer = new StringTokenizer(in); CountRec rec = new CountRec(); while (tokenizer.hasMoreTokens()) { rec.word = tokenizer.nextToken(); rec.count = 1; out.put(rec); } }