apache/seatunnel · error · IOException
Not supported
Error message
Not supported
What it means
SeaTunnelFTPFileSystem explicitly does not implement append(); any call throws this IOException. The FTP-backed filesystem only supports creating new files and overwriting, not appending to an existing file.
Solutions
- Rewrite the logic to create a new file per run instead of appending
- Buffer data locally and write a complete new file via fs.create(path, overwrite=true)
- Switch to a filesystem/connector that supports append (e.g. HDFS, S3 with appropriate setup)
- Check the connector's write-mode configuration and remove append-oriented settings
Example fix
// before FSDataOutputStream out = fs.append(path); out.write(data); // after FSDataOutputStream out = fs.create(path, true); // overwrite instead of append out.write(data);
Defensive patterns
Strategy: fallback
Validate before calling
// detect append support before calling boolean supportsAppend = !(fs instanceof org.apache.seatunnel.connectors.seatunnel.file.ftp.system.SeaTunnelFTPFileSystem);
Type guard
boolean supportsAppend(org.apache.hadoop.fs.FileSystem fs) {
return !(fs instanceof org.apache.seatunnel.connectors.seatunnel.file.ftp.system.SeaTunnelFTPFileSystem);
} Try / catch
try {
out = fs.append(path);
} catch (IOException e) {
if (e.getMessage().equals("Not supported")) {
out = fs.create(path, true); // fallback: rewrite file instead of appending
} else { throw e; }
} Prevention
- Never design FTP-connector pipelines around append semantics
- Buffer locally and write one complete file per run
- Avoid reusing HDFS-specific append code paths with the FTP filesystem
When it happens
Trigger: Calling fs.append(path, bufferSize, progress) on a SeaTunnelFTPFileSystem instance, e.g. from code that assumes Hadoop-compatible append semantics or a sink configured in append mode.
Common situations: Streaming writes that rely on append to an existing file on FTP; migrating a job from HDFS (which supports append) to the FTP connector; sink configurations that set append/write-mode options.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- Not supported
- A decoding format must override this method to apply…
- Can't create JdbcDialect without compatible mode for…
- Can't make directory for path
- can't support custom load jar
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/5cfabaed422bd853.
Report an issue: GitHub.
Appendix: source
Thrown at seatunnel-connectors-v2/connector-file/connector-file-ftp/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/ftp/system/SeaTunnelFTPFileSystem.java:408
"Could not complete transfer, Reply Code - "
+ client.getReplyCode());
}
}
};
if (!FTPReply.isPositivePreliminary(client.getReplyCode())) {
// The ftpClient is an inconsistent state. Must close the stream
// which in turn will logout and disconnect from FTP server
fos.close();
throw new IOException("Unable to create file: " + file + ", Aborting");
}
return fos;
}
/** This optional operation is not yet supported. */
@Override
public FSDataOutputStream append(Path f, int bufferSize, Progressable progress)
throws IOException {
throw new IOException("Not supported");
}
/**
* Convenience method, so that we don't open a new connection when using this method from within
* another method. Otherwise every API invocation incurs the overhead of opening/closing a TCP
* connection.
*
* @throws IOException on IO problems other than FileNotFoundException
*/
private boolean exists(FTPClient client, Path file) throws IOException {
try {
return getFileStatus(client, file) != null;
} catch (FileNotFoundException fnfe) {
LOG.debug("File does not exist: " + file, fnfe);
return false;
}
}
View on GitHub (pinned to cf67b549a7)