@Override
public void reduce(Text key, Iterable<PairOfIntLong> values, Context context)
throws IOException, InterruptedException {
String term = key.toString();
Iterator<PairOfIntLong> iter = values.iterator();
PairOfIntLong p = iter.next();
int df = p.getLeftElement();
long cf = p.getRightElement();
WritableUtils.writeVInt(dfByTermOut, df);
WritableUtils.writeVLong(cfByTermOut, cf);
if (iter.hasNext()) {
throw new RuntimeException("More than one record for term: " + term);
}