diff --git a/src/java/org/apache/sqoop/util/CredentialsUtil.java b/src/java/org/apache/sqoop/util/CredentialsUtil.java index 2d88bd38..64124693 100644 --- a/src/java/org/apache/sqoop/util/CredentialsUtil.java +++ b/src/java/org/apache/sqoop/util/CredentialsUtil.java @@ -57,8 +57,8 @@ public static String fetchPasswordFromFile(Configuration conf, String passwordFilePath) throws IOException { LOG.debug("Fetching password from specified path: " + passwordFilePath); - FileSystem fs = FileSystem.get(conf); Path path = new Path(passwordFilePath); + FileSystem fs = path.getFileSystem(conf); if (!fs.exists(path)) { throw new IOException("The password file does not exist! "