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

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

Introduction

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

Prototype

FTPFileSystem

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;
}