Skip to content

Commit

Permalink
[Fix] [Connectors-v2-file-ftp] add ftp connection mode (apache#6077)
Browse files Browse the repository at this point in the history
  • Loading branch information
xumingbei committed Dec 26, 2023
1 parent a606868 commit cfa675e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public static HadoopConf buildWithConfig(Config config) {
"fs.ftp.password." + host, config.getString(FtpConfigOptions.FTP_PASSWORD.key()));
if (config.hasPath(FtpConfigOptions.FTP_ACTIVE_MODE_STATUS.key())) {
ftpOptions.put(
"fs.ftp.data.connection.mode." + host,
"fs.ftp.connection.mode",
config.getString(FtpConfigOptions.FTP_ACTIVE_MODE_STATUS.key()));
}
hadoopConf.setExtraOptions(ftpOptions);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public class SeaTunnelFTPFileSystem extends FileSystem {
public static final String FS_FTP_HOST = "fs.ftp.host";
public static final String FS_FTP_HOST_PORT = "fs.ftp.host.port";
public static final String FS_FTP_PASSWORD_PREFIX = "fs.ftp.password.";
public static final String FS_FTP_ACTIVE_MODEL_STATUS = "fs.ftp.data.connection.mode.";
public static final String FS_FTP_ACTIVE_MODEL_STATUS = "fs.ftp.connection.mode";
public static final String E_SAME_DIRECTORY_ONLY = "only same directory renames are supported";

private URI uri;
Expand Down Expand Up @@ -155,7 +155,7 @@ private FTPClient connect() throws IOException {
}

// set passive mode
if (!conf.getBoolean(FS_FTP_ACTIVE_MODEL_STATUS + host, true)) {
if (!conf.getBoolean(FS_FTP_ACTIVE_MODEL_STATUS, true)) {
client.enterLocalPassiveMode();
}

Expand Down

0 comments on commit cfa675e

Please sign in to comment.