final String pathURI = getTaskConfiguration().getString(INPUT_PATH_CONFIG_KEY, null);
if (pathURI == null) {
throw new IOException("The path to the file was not found in the runtime configuration.");
}
final Path path;
try {
path = new Path(pathURI);
} catch (Exception iaex) {
throw new IOException("Invalid file path specifier: ", iaex);
}
final List<FileInputSplit> inputSplits = new ArrayList<FileInputSplit>();
// get all the files that are involved in the splits
final List<FileStatus> files = new ArrayList<FileStatus>();
long totalLength = 0;
final FileSystem fs = path.getFileSystem();
final FileStatus pathFile = fs.getFileStatus(path);
if (pathFile.isDir()) {
// input is directory. list all contained files
final FileStatus[] dir = fs.listStatus(path);