AccumuloBoltUtils { public static String getShard(int hashcode, int splits) { return Integer.toString(Math.abs(hashcode % splits), SHARD_RADIX); }  static String getEventRecordId(LogRecord record, String prefix, int splits); static String getShard(int hashcode, int splits); static final int SHARD_RADIX; }
@Test public void testGetShard() { assertThat(getShard(1, 18), is("1")); assertThat(getShard(10, 18), is("a")); assertThat(getShard(17, 18), is("h")); assertThat(getShard(18, 18), is("0")); assertThat(getShard(19, 18), is("1")); assertThat(getShard(18, 36), is("i")); assertThat(getShard(35, 36), is("z")); }