apache/seatunnel · error · IOException
Not supported
Error message
Not supported
What it means
SFTPFileSystem.append() is not implemented: this filesystem only supports creating new files and overwriting, not appending to an existing remote file. Any call throws IOException with the constant message 'Not supported'.
Solutions
- Do not use append with SFTPFileSystem; write to a new file instead.
- Configure the writer to overwrite the file rather than append, or delete the target file before writing.
- Write to a local/HDFS filesystem that supports append, then upload the complete file via SFTP if incremental append is required.
- Check framework sink config for an append/overwrite option and set it appropriately.
Example fix
// before
FSDataOutputStream out = sftpFs.append(path, 4096, () -> {});
// after
FSDataOutputStream out = sftpFs.create(path, true); // overwrite instead of append Defensive patterns
Strategy: fallback
Validate before calling
// SFTPFileSystem never supports append; check mode before choosing FS
if (writeMode == WriteMode.APPEND) { /* use a filesystem that supports append */ } Try / catch
try { out = fs.append(path, buf, progress); }
catch (IOException e) {
if ("Not supported".equals(e.getMessage())) { out = fs.create(path, true); }
else throw e;
} Prevention
- Never configure append mode for SFTP-backed sinks
- Delete or rotate target files instead of appending
- Document SFTP append limitation in job configs
When it happens
Trigger: Calling fs.append(path, bufferSize, progress) on an SFTPFileSystem instance, directly or through a sink/framework configured to append to an existing file.
Common situations: A sink job configured with append/write mode (e.g. overwrite=false and append semantics) writing to an existing SFTP file; migrating code from HDFS (which supports append) to SFTP.
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
- Seek 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
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/ab7ccd059bec0dc4.
Report an issue: GitHub.
Appendix: source
Thrown at seatunnel-connectors-v2/connector-file/connector-file-sftp/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/sftp/system/SFTPFileSystem.java:570
if (e instanceof IOException) {
throw (IOException) e;
}
throw new IOException(e);
}
}
private void disconnectAfterFailure(ChannelSftp channel, Exception originalFailure) {
try {
disconnect(channel);
} catch (IOException disconnectFailure) {
originalFailure.addSuppressed(disconnectFailure);
}
}
@Override
public FSDataOutputStream append(Path f, int bufferSize, Progressable progress)
throws IOException {
throw new IOException(E_NOT_SUPPORTED);
}
/*
* The parent of source and destination can be different. It is suppose to
* work like 'move'
*/
@Override
public boolean rename(Path src, Path dst) throws IOException {
ChannelSftp channel = connect();
try {
boolean success = rename(channel, src, dst);
return success;
} finally {
disconnect(channel);
}
}
@OverrideView on GitHub (pinned to cf67b549a7)