SimpleRollingPartitioner implements IDataPartitioner<T> { @Override public int partition(int total, T data) { return Math.abs(i++ % total); }  @Override int partition(int total, T data); @Override int maxRetryCount();  }
@Test public void testPartition() { SimpleRollingPartitioner<SampleData> partitioner = new SimpleRollingPartitioner<SampleData>(); Assert.assertEquals(partitioner.partition(10, new SampleData()), 0); Assert.assertEquals(partitioner.partition(10, new SampleData()), 1); Assert.assertEquals(partitioner.partition(10, new SampleData()), 2); }