{"record":{"id":"e835b645347f4f72","repo":"apache/hadoop","slug":"acls-not-supported-by-imagewriter","errorCode":null,"errorMessage":"ACLs not supported by ImageWriter","messagePattern":"ACLs not supported by ImageWriter","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"hadoop-tools/hadoop-fs2img/src/main/java/org/apache/hadoop/hdfs/server/namenode/TreePath.java","lineNumber":162,"sourceCode":"        .setReplication(blk.getReplication(s))\n        .setModificationTime(s.getModificationTime())\n        .setAccessTime(s.getAccessTime())\n        .setPreferredBlockSize(blk.preferredBlockSize(s))\n        .setPermission(permissions)\n        .setStoragePolicyID(HdfsConstants.PROVIDED_STORAGE_POLICY_ID);\n\n    // pathhandle allows match as long as the file matches exactly.\n    PathHandle pathHandle = null;\n    if (fs != null) {\n      try {\n        pathHandle = fs.getPathHandle(s, Options.HandleOpt.exact());\n      } catch (UnsupportedOperationException e) {\n        LOG.warn(\n            \"Exact path handle not supported by filesystem \" + fs.toString());\n      }\n    }\n    if (aclStatus != null) {\n      throw new UnsupportedOperationException(\n          \"ACLs not supported by ImageWriter\");\n    }\n    //TODO: storage policy should be configurable per path; use BlockResolver\n    long off = 0L;\n    for (BlockProto block : blk.resolve(s)) {\n      b.addBlocks(block);\n      writeBlock(block.getBlockId(), off, block.getNumBytes(),\n          block.getGenStamp(), pathHandle, out);\n      off += block.getNumBytes();\n    }\n    INode.Builder ib = INode.newBuilder()\n        .setType(INode.Type.FILE)\n        .setId(id)\n        .setName(ByteString.copyFrom(string2Bytes(s.getPath().getName())))\n        .setFile(b);\n    return ib.build();\n  }\n","sourceCodeStart":144,"sourceCodeEnd":180,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-tools/hadoop-fs2img/src/main/java/org/apache/hadoop/hdfs/server/namenode/TreePath.java#L144-L180","documentation":"Error \"ACLs not supported by ImageWriter\" thrown in apache/hadoop.","triggerScenarios":"The input path carries ACL entries while ImageWriter is configured in a mode that does not support writing ACLs into the generated fsimage.","commonSituations":"See trigger scenarios.","solutions":["Strip ACLs from the input (do not use -getfacl output with ACLs) or extend ImageWriter to serialize ACLs; the writer rejects them."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}