{"record":{"id":"1b66ea668e181028","repo":"apache/flink","slug":"stream-is-closed-1b66ea","errorCode":null,"errorMessage":"Stream is closed","messagePattern":"Stream is closed","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"flink-filesystems/flink-s3-fs-native/src/main/java/org/apache/flink/fs/s3native/NativeS3OutputStream.java","lineNumber":104,"sourceCode":"        this.position = 0;\n    }\n\n    @Override\n    public long getPos() throws IOException {\n        lock.lock();\n        try {\n            return position;\n        } finally {\n            lock.unlock();\n        }\n    }\n\n    @Override\n    public void write(int b) throws IOException {\n        lock.lock();\n        try {\n            if (fileUploaded) {\n                throw new IOException(\"Stream is closed\");\n            }\n            bufferedStream.write(b);\n            position++;\n        } finally {\n            lock.unlock();\n        }\n    }\n\n    @Override\n    public void write(byte[] b, int off, int len) throws IOException {\n        if (b == null) {\n            throw new NullPointerException();\n        }\n        if (off < 0 || len < 0 || len > b.length - off) {\n            throw new IndexOutOfBoundsException();\n        }\n        lock.lock();\n        try {","sourceCodeStart":86,"sourceCodeEnd":122,"githubUrl":"https://github.com/apache/flink/blob/2f3c205e9266cb30240eb7f4fdab15cad629a70f/flink-filesystems/flink-s3-fs-native/src/main/java/org/apache/flink/fs/s3native/NativeS3OutputStream.java#L86-L122","documentation":"Error \"Stream is closed\" thrown in apache/flink.","triggerScenarios":"Triggered at runtime when the operation fails because: Stream is closed.","commonSituations":"Commonly caused by misconfiguration, missing dependencies or files, unsupported types or operations, or invalid user input leading to: Stream is closed.","solutions":["Address the cause reported by the error message: Stream is closed","Verify the inputs, configuration values, and classpath/dependency setup related to this operation, then retry."],"exampleFix":"Correct the condition described (\"Stream is closed\") and rerun the job or command.","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2f3c205e9266cb30240eb7f4fdab15cad629a70f","analyzedAt":"2026-08-14T08:48:24.518Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}