Review Board 1.7.22


Review of SQOOP-1213

Review Request #14542 - Created Oct. 8, 2013 and updated

James Anderson
SQOOP-1213
Reviewers
Sqoop
sqoop-trunk
In order to support reading password files from Amazon S3, instantiate the FileSystem object with the appropriate URI based on the provided path.

 

Diff revision 2 (Latest)

1 2
1 2

  1. src/java/org/apache/sqoop/util/CredentialsUtil.java: Loading...
src/java/org/apache/sqoop/util/CredentialsUtil.java
Revision 2d88bd3 New Change
[20] 54 lines
[+20] [+] public static String fetchPasswordFromFile(SqoopOptions options)
55

    
   
55

   
56
  public static String fetchPasswordFromFile(Configuration conf,
56
  public static String fetchPasswordFromFile(Configuration conf,
57
                                             String passwordFilePath)
57
                                             String passwordFilePath)
58
    throws IOException {
58
    throws IOException {
59
    LOG.debug("Fetching password from specified path: " + passwordFilePath);
59
    LOG.debug("Fetching password from specified path: " + passwordFilePath);
60
    FileSystem fs = FileSystem.get(conf);

   
61
    Path path = new Path(passwordFilePath);
60
    Path path = new Path(passwordFilePath);

    
   
61
    FileSystem fs = path.getFileSystem(conf);
62

    
   
62

   
63
    if (!fs.exists(path)) {
63
    if (!fs.exists(path)) {
64
      throw new IOException("The password file does not exist! "
64
      throw new IOException("The password file does not exist! "
65
        + passwordFilePath);
65
        + passwordFilePath);
66
    }
66
    }
[+20] [20] 18 lines
  1. src/java/org/apache/sqoop/util/CredentialsUtil.java: Loading...