From 230d90c5b9cc0d6e74bf16b1cf6685a163a24d48 Mon Sep 17 00:00:00 2001 From: Wangda Tan Date: Mon, 24 Sep 2018 13:30:02 -0700 Subject: [PATCH] MAPREDUCE-7125. JobResourceUploader creates LocalFileSystem when it's not necessary. (Peter Cseh via wangda) Change-Id: I1aa720ed03739f6f4abeec46f6068e2ab332987a --- .../java/org/apache/hadoop/mapreduce/JobResourceUploader.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/JobResourceUploader.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/JobResourceUploader.java index 1dbecb6fc9..e106a5465e 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/JobResourceUploader.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/JobResourceUploader.java @@ -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);