public void testMMMRCalculatePartition() throws Exception
{
final JobConf j = new JobConf();
final int maptasks = 20;
j.setNumMapTasks(maptasks);
final SETPartitioner p = new SETPartitioner();
p.configure(j);
assertEquals(0, p.calculatePartition(0, 2));
assertEquals(0, p.calculatePartition(1, 2));
assertEquals(0, p.calculatePartition(9, 2));
assertEquals(1, p.calculatePartition(10, 2));
assertEquals(1, p.calculatePartition(19, 2));
}