org.apache.hadoop.fs.ftp.FTPFileSystem Java Examples

The following examples show how to use org.apache.hadoop.fs.ftp.FTPFileSystem. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AbstractFTPInputOperator.java    From attic-apex-malhar with Apache License 2.0 5 votes vote down vote up
@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;
}
 
Example #2
Source File: TestFTPContractRename.java    From hadoop with Apache License 2.0 2 votes vote down vote up
/**
 * Check the exception was about cross-directory renames
 * -if not, rethrow it.
 * @param e exception raised
 * @throws IOException
 */
private void verifyUnsupportedDirRenameException(IOException e) throws IOException {
  if (!e.toString().contains(FTPFileSystem.E_SAME_DIRECTORY_ONLY)) {
    throw e;
  }
}
 
Example #3
Source File: TestFTPContractRename.java    From big-c with Apache License 2.0 2 votes vote down vote up
/**
 * Check the exception was about cross-directory renames
 * -if not, rethrow it.
 * @param e exception raised
 * @throws IOException
 */
private void verifyUnsupportedDirRenameException(IOException e) throws IOException {
  if (!e.toString().contains(FTPFileSystem.E_SAME_DIRECTORY_ONLY)) {
    throw e;
  }
}