{"record":{"id":"8605097e31392369","repo":"apache/hadoop","slug":"the-xattr-is-too-big-the-maximum-combined-size-of","errorCode":null,"errorMessage":"The XAttr is too big. The maximum combined size of the name and value is <xattrMaxSize>, but the total size is <size>","messagePattern":"The XAttr is too big\\. The maximum combined size of the name and value is <xattrMaxSize>, but the total size is <size>","errorType":"exception","errorClass":"HadoopIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirXAttrOp.java","lineNumber":441,"sourceCode":"          fsd.checkOwner(pc, iip);\n        }\n      } else {\n        fsd.checkPathAccess(pc, iip, FsAction.WRITE);\n      }\n    }\n  }\n\n  /**\n   * Verifies that the combined size of the name and value of an xattr is within\n   * the configured limit. Setting a limit of zero disables this check.\n   */\n  private static void checkXAttrSize(FSDirectory fsd, XAttr xAttr) {\n    int size = DFSUtil.string2Bytes(xAttr.getName()).length;\n    if (xAttr.getValue() != null) {\n      size += xAttr.getValue().length;\n    }\n    if (size > fsd.getXattrMaxSize()) {\n      throw new HadoopIllegalArgumentException(\n          \"The XAttr is too big. The maximum combined size of the\"\n          + \" name and value is \" + fsd.getXattrMaxSize()\n          + \", but the total size is \" + size);\n    }\n  }\n\n  private static void checkXAttrsConfigFlag(FSDirectory fsd) throws\n                                                             IOException {\n    if (!fsd.isXattrsEnabled()) {\n      throw new IOException(String.format(\n          \"The XAttr operation has been rejected.  \"\n              + \"Support for XAttrs has been disabled by setting %s to false.\",\n          DFSConfigKeys.DFS_NAMENODE_XATTRS_ENABLED_KEY));\n    }\n  }\n\n  private static List<XAttr> getXAttrs(FSDirectory fsd, INodesInPath iip)\n      throws IOException {","sourceCodeStart":423,"sourceCodeEnd":459,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirXAttrOp.java#L423-L459","documentation":"Error \"The XAttr is too big. The maximum combined size of the name and value is <xattrMaxSize>, but the total size is <size>\" thrown in apache/hadoop.","triggerScenarios":"Setting an XAttr whose combined name plus value size exceeds the configured limit (dfs.namenode.fs-limits.max-xattr-size).","commonSituations":"See trigger scenarios.","solutions":["Reduce the combined size of the XAttr name and value below dfs.namenode.fs-limits.max-xattr-size (default 16KB).","Store large data in a file and keep only a reference in the XAttr."],"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"}