HADOOP-7112. Issue a warning when GenericOptionsParser libjars are not on local filesystem.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1075554 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Thomas White 2011-02-28 21:48:49 +00:00
parent 4d53649f49
commit d97ab376d2
2 changed files with 6 additions and 0 deletions

View File

@ -60,6 +60,9 @@ Trunk (unreleased changes)
HADOOP-7151. Document need for stable hashCode() in WritableComparable. HADOOP-7151. Document need for stable hashCode() in WritableComparable.
(Dmitriy V. Ryaboy via todd) (Dmitriy V. Ryaboy via todd)
HADOOP-7112. Issue a warning when GenericOptionsParser libjars are not on
local filesystem. (tomwhite)
OPTIMIZATIONS OPTIMIZATIONS
BUG FIXES BUG FIXES

View File

@ -342,6 +342,9 @@ public class GenericOptionsParser {
Path tmp = new Path(file); Path tmp = new Path(file);
if (tmp.getFileSystem(conf).equals(FileSystem.getLocal(conf))) { if (tmp.getFileSystem(conf).equals(FileSystem.getLocal(conf))) {
cp.add(FileSystem.getLocal(conf).pathToFile(tmp).toURI().toURL()); cp.add(FileSystem.getLocal(conf).pathToFile(tmp).toURI().toURL());
} else {
LOG.warn("The libjars file " + tmp + " is not on the local " +
"filesystem. Ignoring.");
} }
} }
return cp.toArray(new URL[0]); return cp.toArray(new URL[0]);