{"record":{"id":"0b4e2aa9973412ef","repo":"apache/flink","slug":"recoverable-writers-on-azureblob-are-only-supporte","errorCode":null,"errorMessage":"Recoverable writers on AzureBlob are only supported for ABFS","messagePattern":"Recoverable writers on AzureBlob are only supported for ABFS","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"flink-filesystems/flink-azure-fs-hadoop/src/main/java/org/apache/flink/fs/azurefs/AzureBlobRecoverableWriter.java","lineNumber":44,"sourceCode":"\nimport java.io.IOException;\n\n/** Recoverable writer for AzureBlob file system. */\npublic class AzureBlobRecoverableWriter extends HadoopRecoverableWriter {\n    /**\n     * Creates a new Recoverable writer.\n     *\n     * @param fs The AzureBlob file system on which the writer operates.\n     */\n    public AzureBlobRecoverableWriter(FileSystem fs) {\n        super(fs);\n    }\n\n    protected void checkSupportedFSSchemes(org.apache.hadoop.fs.FileSystem fs) {\n        // This writer is only supported on a subset of file systems\n        if (!(\"abfs\".equalsIgnoreCase(fs.getScheme())\n                || \"abfss\".equalsIgnoreCase(fs.getScheme()))) {\n            throw new UnsupportedOperationException(\n                    \"Recoverable writers on AzureBlob are only supported for ABFS\");\n        }\n    }\n\n    @Override\n    protected RecoverableFsDataOutputStream getRecoverableFsDataOutputStream(\n            org.apache.hadoop.fs.Path targetFile, org.apache.hadoop.fs.Path tempFile)\n            throws IOException {\n        return new AzureBlobFsRecoverableDataOutputStream(fs, targetFile, tempFile);\n    }\n\n    @Override\n    public RecoverableFsDataOutputStream recover(ResumeRecoverable recoverable) throws IOException {\n        return new AzureBlobFsRecoverableDataOutputStream(fs, (HadoopFsRecoverable) recoverable);\n    }\n\n    @Override\n    public RecoverableFsDataOutputStream.Committer recoverForCommit(CommitRecoverable recoverable)","sourceCodeStart":26,"sourceCodeEnd":62,"githubUrl":"https://github.com/apache/flink/blob/2f3c205e9266cb30240eb7f4fdab15cad629a70f/flink-filesystems/flink-azure-fs-hadoop/src/main/java/org/apache/flink/fs/azurefs/AzureBlobRecoverableWriter.java#L26-L62","documentation":"Thrown by AzureBlobRecoverableWriter.checkSupportedFSSchemes when the Hadoop FileSystem passed to the writer has a scheme other than 'abfs' or 'abfss' (case-insensitive). The recoverable-writer machinery (append, persist, commit-by-rename) is only implemented for the ABFS driver, so legacy wasb/wasbs endpoints or other filesystems are rejected explicitly.","triggerScenarios":"Creating an AzureBlobRecoverableWriter (e.g. StreamingFileSink/FileSink on 'wasb://...' or 'wasbs://...' paths) — the scheme check runs at writer construction and fails fast before any write.","commonSituations":"Migrating legacy WASB-based jobs to the recoverable sink without changing URIs; mixing schemes in one path; typo in the scheme.","solutions":["Change sink/checkpoint/output paths from wasb(s):// to abfs(s):// (e.g. abfs://container@account.dfs.core.windows.net/path)","Use abfss:// for encrypted-channel ABFS endpoints where required","If you must stay on wasb, use a non-recoverable sink (bucketing/file sink without recoverable writer) — expect no exactly-once file guarantees"],"exampleFix":"// before\nPath path = new Path(\"wasb://container@account.blob.core.windows.net/out\");\nFileSink.forRowFormat(path, encoder)\n    .build(); // constructs AzureBlobRecoverableWriter -> fails\n\n// after\nPath path = new Path(\"abfs://container@account.dfs.core.windows.net/out\");\nFileSink.forRowFormat(path, encoder)\n    .build();","handlingStrategy":"validation","validationCode":"// before creating the sink/writer, assert the scheme is supported\nString scheme = path.toUri().getScheme();\nif (!(\"abfs\".equalsIgnoreCase(scheme) || \"abfss\".equalsIgnoreCase(scheme))) {\n    throw new IllegalArgumentException(\n        \"Recoverable Azure sink requires abfs:// or abfss://, got: \" + path);\n}","typeGuard":null,"tryCatchPattern":"try {\n    new AzureBlobRecoverableWriter(hadoopFs);\n} catch (UnsupportedOperationException e) {\n    // migrate the path to abfs(s):// or fall back to a non-recoverable sink\n}","preventionTips":["Migrate legacy wasb:// URIs to abfs(s):// during Flink upgrades","Add a config lint step that rejects wasb paths for recoverable sinks","Remember abfs uses the dfs endpoint host (account.dfs.core.windows.net)"],"tags":["azure","abfs","wasb","scheme","file-sink"],"backgroundTag":null,"analyzedSha":"2f3c205e9266cb30240eb7f4fdab15cad629a70f","analyzedAt":"2026-08-14T08:48:24.518Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}