DefaultJobIdPartitioner implements JobIdPartitioner { @Override public int partition(int numTotalParts, String jobId) { int hash = jobId.hashCode(); hash = Math.abs(hash); return hash % numTotalParts; }  @Override int partition(int numTotalParts, String jobId);  }
@Test public void testPartition() { DefaultJobIdPartitioner defaultJobIdPartitioner = new DefaultJobIdPartitioner(); Assert.assertEquals(0, defaultJobIdPartitioner.partition(5, "application_1479206441898_35343")); }