seatunnel
seatunnel copied to clipboard
[Bug] [Connector-V2][FTP] FTP connector connection_mode is not effective
Search before asking
- [X] I had searched in the issues and found no similar issues.
What happened
Configuring connection_mode does not take effect
source {
FtpFile {
host= "ip"
port= 21
connection_mode= "passive_local"
user= "admin"
password= "admin"
path= "/123.txt"
file_format_type= "binary"
encoding = "UTF-8"
}
}
Exception:
Cause of the problem:
Described in the document: You can set active_local and passive_local,
that is: connection_mode = "active_local"
In FtpConnectionMode.java
you can see the implementation code:
But when ConfigUtil parses the mode, it tries to filter by ACTIVE_LOCAL_DATA_CONNECTION_MODE = active_local, which is wrong.
This will eventually cause the enumeration parsing to fail and return an exception.
Resolve method: The name in the enumeration must be consistent with the logic of the ConfigUtil.convertToEnum method
SeaTunnel Version
dev
SeaTunnel Config
source {
FtpFile {
host= "ip"
port= 21
connection_mode= "passive_local"
user= "admin"
password= "admin"
path= "/123.txt"
file_format_type= "binary"
encoding = "UTF-8"
}
}
Are you willing to submit PR?
- [X] Yes I am willing to submit a PR!
Code of Conduct
- [X] I agree to follow this project's Code of Conduct