MAPREDUCE-7125. JobResourceUploader creates LocalFileSystem when it's not necessary. (Peter Cseh via wangda)

Change-Id: I1aa720ed03739f6f4abeec46f6068e2ab332987a
This commit is contained in:
Wangda Tan 2018-09-24 13:30:02 -07:00
parent 67173b4847
commit 230d90c5b9

View File

@ -855,8 +855,8 @@ private String validateFilePath(String file, Configuration conf)
throw new IllegalArgumentException(e);
}
Path path = new Path(pathURI);
FileSystem localFs = FileSystem.getLocal(conf);
if (pathURI.getScheme() == null) {
FileSystem localFs = FileSystem.getLocal(conf);
// default to the local file system
// check if the file exists or not first
localFs.getFileStatus(path);