return new Put(recalculatedKey);
So the only thing you've changed is:String recalculatedKey = keyDistributor.getDistributedKey(key + (Long.MAX_VALUE - timestamp))return new Put(recalculatedKey)
instead ofreturn new Put(key + (Long.MAX_VALUE - timestamp))right? Btw, didn't know there's a Put(String) ctor :)
And the problem is that you cannot read this data later? If yes, how do you read it? If not, could you provide more details, where you see the problem?
context.write(new ImmutableBytesWritable(Bytes.toBytes(OUTPUT_TABLE_NAME)), putForClass(key, ts, elems));
Hm. How do you check that? In shell? Could you try with shell (sorry for obvious).
This looks suspicious:context.write(new ImmutableBytesWritable(Bytes.toBytes(OUTPUT_TABLE_NAME)), putForClass(key, ts, elems));If I'm not mistaken, the key should be not the table name, but the "row key" (i.e. Put's key). Can the problem be in this?