context.write(outputKey, Collections.singletonList(getMutation(word, sum)));
}
private static Mutation getMutation(Text word, int sum)
{
Column c = new Column();
c.name = ByteBuffer.wrap(Arrays.copyOf(word.getBytes(), word.getLength()));
c.value = ByteBufferUtil.bytes(String.valueOf(sum));
c.timestamp = System.currentTimeMillis() * 1000;
Mutation m = new Mutation();