private String getShardKey ( long messageTime , int modShard ) { long timePartition ; if ( metadata . getPartitionDuration ( ) != null ) timePartition = ( messageTime / metadata . getPartitionDuration ( ) ) % metadata . getPartitionCount ( ) ; else timePartition = 0 ; return getName ( ) + ":" + timePartition + ":" + modShard ; }
Return the shard for this timestamp