LOG.debug("Input folder location: " + inputFolderPath);
List<List<Path>> splits = getBalancedSplits(snapshotFiles, mappers);
Path[] inputFiles = new Path[splits.size()];
Text key = new Text();
for (int i = 0; i < inputFiles.length; i++) {
List<Path> files = splits.get(i);
inputFiles[i] = new Path(inputFolderPath, String.format("export-%d.seq", i));
SequenceFile.Writer writer = SequenceFile.createWriter(fs, conf, inputFiles[i],
Text.class, NullWritable.class);
LOG.debug("Input split: " + i);
try {
for (Path file: files) {
LOG.debug(file.toString());
key.set(file.toString());
writer.append(key, NullWritable.get());
}
} finally {
writer.close();
}