EmbulkInputFormat extends InputFormat<IntWritable, NullWritable> { @Override public List<InputSplit> getSplits(JobContext context) throws IOException, InterruptedException { int taskCount = EmbulkMapReduce.getMapTaskCount(context.getConfiguration()); ImmutableList.Builder<InputSplit> builder = ImmutableList.builder(); for (int i=0; i < taskCount; i++) { builder.add(new EmbulkInputSplit(new int[] { i })); } return builder.build(); }  @Override List<InputSplit> getSplits(JobContext context); @Override RecordReader<IntWritable, NullWritable> createRecordReader(
            InputSplit split, TaskAttemptContext context);  }
@Test public void getSplits() throws Exception { checkNumOfSplits(0); for (int i = 0; i < 10; i++) { int split = runtime.getRandom().nextInt(10000); checkNumOfSplits(split); } }