if (basePathString == null || basePathString.isEmpty()) {
basePath = null;
} else {
basePath = new Path(basePathString);
}
VariableTable variables = Constants.createVariableTable();
variables.defineVariable(Constants.HDFS_PATH_VARIABLE_USER, user);
variables.defineVariable(Constants.HDFS_PATH_VARIABLE_EXECUTION_ID, executionId);
FileSystem fs;
try {
if (basePath == null) {
fs = FileSystem.get(conf);
} else {
fs = FileSystem.get(basePath.toUri(), conf);
basePath = fs.makeQualified(basePath);
}
} catch (IOException e) {
throw new BulkLoaderSystemException(e, CLASS, "TG-COMMON-00019", rawPaths);
}
List<Path> results = new ArrayList<Path>();
for (String rawPath : rawPaths) {
String resolved = variables.parse(rawPath, false);
Path fullPath;
if (basePath == null) {
fullPath = fs.makeQualified(new Path(resolved));
} else {
fullPath = new Path(basePath, resolved);