public void reduce(ITuple group, Iterable<ITuple> tuples, TupleMRContext context, Collector collector)
throws IOException, InterruptedException, TupleMRException {
Iterator<ITuple> iterator = tuples.iterator();
while(iterator.hasNext()) {
ITuple tuple = iterator.next();
Utf8 text = (Utf8) tuple.get("word");
countToEmit.set((Integer) tuple.get("count"));
collector.write(text, countToEmit);
Assert.assertFalse(iterator.hasNext());
}
}