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

The following examples show how to use org.apache.hadoop.fs.ftp.FTPFileSystem. These examples are extracted from open source projects. 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
@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 Project: hadoop   Source File: TestFTPContractRename.java    License: 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 Project: big-c   Source File: TestFTPContractRename.java    License: 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;
  }
}