How can I configure Apache FTPFileSystem java class to use FTPSClient instead of the FTPClient
FTPFileSystem
does not support FTPS. It cannot create FTPSClient
.
You should have to create your own implementation of FileSystem
based on FTPFileSystem
(changing implementation of open
), where you initialize the client as FTPSClient not FTP client. i.e:
FTPSClient client = new FTPSClient();
You can associate it with ftps://
URLs using:
conf.set("fs.ftps.impl", "com.myproject.MyFTPSFileSystem");
And you might need to set below property for the client to enter local passive mode:
conf.set("fs.ftp.data.connection.mode", "PASSIVE_LOCAL_DATA_CONNECTION_MODE");