@Override
public void reduce(Utf8 word, Iterable<Long> counts,
AvroCollector<Pair<Utf8, Long>> collector,
Reporter reporter) throws IOException {
long sum = 0;
for (long count : counts)
sum += count;
Pair<Utf8, Long> outputvalue = new Pair<>(word, sum);
amos.getCollector("myavro", reporter).collect(outputvalue);
amos.collect("myavro1", reporter, outputvalue.toString());
amos.collect("myavro", reporter, new Pair<Utf8, Long>(new Utf8(""), 0L).getSchema(), outputvalue, "testavrofile");
amos.collect("myavro", reporter, Schema.create(Schema.Type.STRING), outputvalue.toString(), "testavrofile1");
collector.collect(new Pair<>(word, sum));
}