apache/hadoop · error · IOException
Cannot add additional XAttr to inode, would exceed limit of
Error message
Cannot add additional XAttr to inode, would exceed limit of <inodeXAttrsLimit>
What it means
Error "Cannot add additional XAttr to inode, would exceed limit of <inodeXAttrsLimit>" thrown in apache/hadoop.
Source
Thrown at hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirXAttrOp.java:384
for (XAttr existing : existingXAttrs) {
boolean alreadySet = false;
for (XAttr set : toSet) {
if (set.equalsIgnoreValue(existing)) {
alreadySet = true;
break;
}
}
if (!alreadySet) {
xAttrs.add(existing);
if (isUserVisible(existing)) {
userVisibleXAttrsNum++;
}
}
}
}
if (userVisibleXAttrsNum > fsd.getInodeXAttrsLimit()) {
throw new IOException("Cannot add additional XAttr to inode, "
+ "would exceed limit of " + fsd.getInodeXAttrsLimit());
}
return xAttrs;
}
static XAttr getXAttrByPrefixedName(FSDirectory fsd, INodesInPath iip,
String prefixedName) throws IOException {
fsd.readLock();
try {
return XAttrStorage.readINodeXAttrByPrefixedName(iip.getLastINode(),
iip.getPathSnapshotId(), prefixedName);
} finally {
fsd.readUnlock();
}
}
static XAttr unprotectedGetXAttrByPrefixedName(View on GitHub (pinned to 2add963021)
Solutions
- Remove existing XAttrs before adding new ones.
- Raise dfs.namenode.fs-limits.max-xattrs-per-inode if more attributes per inode are legitimately needed.
When it happens
Trigger: Setting XAttrs on an inode that already holds the configured maximum number of XAttrs (dfs.namenode.fs-limits.max-xattrs-per-inode).
Common situations: See trigger scenarios.
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/917a138c3e4adb1d.
Report an issue: GitHub.