Example usage for org.apache.hadoop.fs.ftp FTPFileSystem initialize

List of usage examples for org.apache.hadoop.fs.ftp FTPFileSystem initialize

Introduction

In this page you can find the example usage for org.apache.hadoop.fs.ftp FTPFileSystem initialize.

Prototype

@Override
    public void initialize(URI uri, Configuration conf) throws IOException 

Source Link

Usage

From source file:com.datatorrent.lib.io.AbstractFTPInputOperator.java

License:Open Source License

@Override
protected FileSystem getFSInstance() throws IOException {
    FTPFileSystem ftpFileSystem = new FTPFileSystem();
    String ftpUri = "ftp://" + userName + ":" + password + "@" + host + ":" + port;
    LOG.debug("ftp uri {}", ftpUri);
    ftpFileSystem.initialize(URI.create(ftpUri), configuration);
    return ftpFileSystem;
}