@Test @Category(UnitTest.class) public void testGenerateSplitsFromStartAndEndIds() throws Exception { subject = new FileSplit(); long[] startIds = {1L, 10L, 20L}; long[] endIds = {5L, 14L, 23L}; String[] names = {"split1", "split2", "split3"}; subject.generateSplits(startIds, endIds, names); SplitInfo[] fileSplits = subject.getSplits(); for (int i = 0; i < startIds.length; i++) { Assert.assertEquals(endIds[i], fileSplits[i].getTileId()); Assert.assertEquals(i, fileSplits[i].getPartition()); } }
public void generateSplits(FileSplitInfo[] splits) { this.splits = new FileSplitInfo[splits.length]; System.arraycopy(splits, 0, this.splits, 0, splits.length); }
FileSplit extends Splits { public void generateSplits(FileSplitInfo[] splits) { this.splits = new FileSplitInfo[splits.length]; System.arraycopy(splits, 0, this.splits, 0, splits.length); } }
FileSplit extends Splits { public void generateSplits(FileSplitInfo[] splits) { this.splits = new FileSplitInfo[splits.length]; System.arraycopy(splits, 0, this.splits, 0, splits.length); }  }
FileSplit extends Splits { public void generateSplits(FileSplitInfo[] splits) { this.splits = new FileSplitInfo[splits.length]; System.arraycopy(splits, 0, this.splits, 0, splits.length); }  void generateSplits(FileSplitInfo[] splits); void generateSplits(long[] startIds, long[] endIds, String[] names); void generateSplits(Path parent, Configuration conf); @Override String findSplitFile(Path parent); @Override void generateSplits(SplitGenerator generator); void readSplits(InputStream stream); @SuppressWarnings("squid:S1166") // Exception caught and handled boolean isVersion2(Path splitsfile); void readSplits(Path parent); void writeSplits(OutputStream stream); void writeSplits(Path parent); @Override void readExternal(ObjectInput in); }
FileSplit extends Splits { public void generateSplits(FileSplitInfo[] splits) { this.splits = new FileSplitInfo[splits.length]; System.arraycopy(splits, 0, this.splits, 0, splits.length); }  void generateSplits(FileSplitInfo[] splits); void generateSplits(long[] startIds, long[] endIds, String[] names); void generateSplits(Path parent, Configuration conf); @Override String findSplitFile(Path parent); @Override void generateSplits(SplitGenerator generator); void readSplits(InputStream stream); @SuppressWarnings("squid:S1166") // Exception caught and handled boolean isVersion2(Path splitsfile); void readSplits(Path parent); void writeSplits(OutputStream stream); void writeSplits(Path parent); @Override void readExternal(ObjectInput in); static final String SPLIT_FILE; static final String OLD_SPLIT_FILE; }