{"record":{"id":"550c0eadb19eb602","repo":"apache/hadoop","slug":"not-an-abfs-filesystem-s","errorCode":null,"errorMessage":"Not an abfs filesystem: %s","messagePattern":"Not an abfs filesystem: (.+?)","errorType":"exception","errorClass":"PathIOException","httpStatus":null,"severity":"error","filePath":"hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/commit/AbfsManifestStoreOperations.java","lineNumber":85,"sourceCode":"   */\n  private boolean etagsPreserved;\n\n  @Override\n  public AzureBlobFileSystem getFileSystem() {\n    return (AzureBlobFileSystem) super.getFileSystem();\n  }\n\n  /**\n   * Bind to the store.\n   *\n   * @param filesystem FS.\n   * @param path path to work under\n   * @throws IOException binding problems.\n   */\n  @Override\n  public void bindToFileSystem(FileSystem filesystem, Path path) throws IOException {\n    if (!(filesystem instanceof AzureBlobFileSystem)) {\n      throw new PathIOException(path.toString(),\n          \"Not an abfs filesystem: \" + filesystem.getClass());\n    }\n    super.bindToFileSystem(filesystem, path);\n    try {\n      resilientCommitByRename = getFileSystem().createResilientCommitSupport(path);\n      // this also means that etags are preserved.\n      etagsPreserved = true;\n      LOG.debug(\"Bonded to filesystem with resilient commits under path {}\", path);\n    } catch (UnsupportedOperationException e) {\n      LOG.debug(\"No resilient commit support under path {}\", path);\n    }\n  }\n\n  /**\n   * Etags are preserved through Gen2 stores, but not wasb stores.\n   * @param path path to probe.\n   * @return true if this store preserves etags.\n   */","sourceCodeStart":67,"sourceCodeEnd":103,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/commit/AbfsManifestStoreOperations.java#L67-L103","documentation":"AbfsManifestStoreOperations implements the manifest-store binding for the ABFS magic committer (uncommitted-file reconciliation). bindToFileSystem requires an AzureBlobFileSystem instance; any other FileSystem implementation (RawLocalFileSystem, s3a, gcs, viewfs, wasb) triggers PathIOException 'Not an abfs filesystem: <class>' before any commit work starts. This is a wiring/binding error, not a data problem.","triggerScenarios":"Constructing ManifestCommitOperations with AbfsManifestStoreOperations and calling bindToFileSystem on a non-ABFS filesystem - most often the output path resolving to file:/// in tests, or committer factories applied globally so some tasks bind to local/other filesystems.","commonSituations":"Committer configuration (mapreduce.outputcommitter.factory.scheme.*) applied to jobs whose working/output paths are local; unit tests binding the ABFS manifest store to a mock or local FS; copy-paste of ABFS committer settings into non-ABFS pipelines.","solutions":["Bind the ABFS manifest committer only to abfs(s):// output paths; select committers per scheme.","Scope mapreduce.outputcommitter.factory.scheme.abfs / .abfss keys so they do not attach to file:// or other schemes.","In tests, either bind to a real AzureBlobFileSystem or use the committer implementation matching the local filesystem.","Verify fs.getUri().getScheme() before constructing the manifest store."],"exampleFix":"// before\nManifestStoreOperations store = new AbfsManifestStoreOperations();\nstore.bindToFileSystem(localFs, outputPath);   // throws\n\n// after\nif (!(fs instanceof AzureBlobFileSystem)) {\n  throw new IOException(\"ABFS manifest committer requires an abfs:// path, got: \" + fs.getUri());\n}\nstore.bindToFileSystem(fs, outputPath);","handlingStrategy":"type-guard","validationCode":"if (!(fs instanceof AzureBlobFileSystem)) {\n  throw new IOException(\"ABFS manifest committer requires abfs://, got: \" + fs.getUri());\n}","typeGuard":"static boolean isAbfsFileSystem(FileSystem fs) {\n  return fs instanceof org.apache.hadoop.fs.azurebfs.AzureBlobFileSystem;\n}","tryCatchPattern":"try {\n  storeOps.bindToFileSystem(fs, path);\n} catch (PathIOException e) {\n  if (e.getMessage().startsWith(\"Not an abfs filesystem\")) { /* select a committer matching fs.getUri().getScheme() */ }\n}","preventionTips":["Scope output-committer factory keys per scheme (abfs/abfss only).","Assert the output path scheme before constructing committers.","In tests, bind the ABFS store only to a real AzureBlobFileSystem harness."],"tags":["azure","abfs","output-committer","manifest","filesystem-binding","wiring"],"backgroundTag":"filesystem-type-mismatch","analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-23T01:17:44.959Z"}