{"record":{"id":"ab7ccd059bec0dc4","repo":"apache/seatunnel","slug":"not-supported-ab7ccd","errorCode":null,"errorMessage":"Not supported","messagePattern":"Not supported","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-file/connector-file-sftp/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/sftp/system/SFTPFileSystem.java","lineNumber":570,"sourceCode":"            if (e instanceof IOException) {\n                throw (IOException) e;\n            }\n            throw new IOException(e);\n        }\n    }\n\n    private void disconnectAfterFailure(ChannelSftp channel, Exception originalFailure) {\n        try {\n            disconnect(channel);\n        } catch (IOException disconnectFailure) {\n            originalFailure.addSuppressed(disconnectFailure);\n        }\n    }\n\n    @Override\n    public FSDataOutputStream append(Path f, int bufferSize, Progressable progress)\n            throws IOException {\n        throw new IOException(E_NOT_SUPPORTED);\n    }\n\n    /*\n     * The parent of source and destination can be different. It is suppose to\n     * work like 'move'\n     */\n    @Override\n    public boolean rename(Path src, Path dst) throws IOException {\n        ChannelSftp channel = connect();\n        try {\n            boolean success = rename(channel, src, dst);\n            return success;\n        } finally {\n            disconnect(channel);\n        }\n    }\n\n    @Override","sourceCodeStart":552,"sourceCodeEnd":588,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-file/connector-file-sftp/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/sftp/system/SFTPFileSystem.java#L552-L588","documentation":"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'.","triggerScenarios":"Calling fs.append(path, bufferSize, progress) on an SFTPFileSystem instance, directly or through a sink/framework configured to append to an existing file.","commonSituations":"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.","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."],"exampleFix":"// before\nFSDataOutputStream out = sftpFs.append(path, 4096, () -> {});\n// after\nFSDataOutputStream out = sftpFs.create(path, true); // overwrite instead of append","handlingStrategy":"fallback","validationCode":"// SFTPFileSystem never supports append; check mode before choosing FS\nif (writeMode == WriteMode.APPEND) { /* use a filesystem that supports append */ }","typeGuard":null,"tryCatchPattern":"try { out = fs.append(path, buf, progress); }\ncatch (IOException e) {\n    if (\"Not supported\".equals(e.getMessage())) { out = fs.create(path, true); }\n    else throw e;\n}","preventionTips":["Never configure append mode for SFTP-backed sinks","Delete or rotate target files instead of appending","Document SFTP append limitation in job configs"],"tags":["sftp","unsupported-operation","append"],"backgroundTag":"unsupported-operation","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}