Arrays.sort(splits, new InputSplitComparator()); LOG.info("Number of input splits: " + splits.length + ". " + availableSlots + " available slots, " + waves + " waves. Input format is: " + realInputFormatName);
@Test public void testCompare1() throws Exception { FileSplit split1 = new FileSplit(new Path("/abc/def"), 2000L, 500L, EMPTY); FileSplit split2 = new FileSplit(new Path("/abc/def"), 1000L, 500L, EMPTY); InputSplitComparator comparator = new InputSplitComparator(); assertEquals(1, comparator.compare(split1, split2)); } }
Arrays.sort(splits, new InputSplitComparator()); LOG.info("Number of input splits: " + splits.length + ". " + availableSlots + " available slots, " + waves + " waves. Input format is: " + realInputFormatName);