// If path is a directory
if (fStats.isDir()) {
dirs.offer(path);
}
else if ((new CompressionCodecFactory(job)).getCodec(path) != null) {
return super.getSplits(job, numSplits);
}
while (dirs.peek() != null) {
Path tstPath = dirs.remove();
FileStatus[] fStatus = inpFs.listStatus(tstPath);
for (int idx = 0; idx < fStatus.length; idx++) {
if (fStatus[idx].isDir()) {
dirs.offer(fStatus[idx].getPath());
}
else if ((new CompressionCodecFactory(job)).getCodec(fStatus[idx].getPath()) != null) {
return super.getSplits(job, numSplits);
}
}
}
}