apache/hadoop · error · HadoopIllegalArgumentException
".snapshot" is a reserved name.
Error message
".snapshot" is a reserved name.
What it means
verifyINodeName: a child named ".snapshot" (DOT_SNAPSHOT_DIR) is being created in the tree; the name is reserved for snapshot directories and is rejected (with an upgrade rename hint when the image is still loading).
Solutions
- '.snapshot' is reserved for the snapshot mechanism; choose a different name for the file or directory.
Defensive patterns
Strategy: validation
When it happens
Trigger: Creating a file or directory named '.snapshot', which is reserved by HDFS for snapshot access.
Common situations: See trigger scenarios.
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/fd13bfae8df29b89.
Report an issue: GitHub.
Appendix: source
Thrown at hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java:1265
if (q != null) { // a directory with quota
try {
q.verifyQuota(deltas);
} catch (QuotaExceededException e) {
e.setPathName(iip.getPath(i));
throw e;
}
}
}
}
/** Verify if the inode name is legal. */
void verifyINodeName(byte[] childName) throws HadoopIllegalArgumentException {
if (Arrays.equals(HdfsServerConstants.DOT_SNAPSHOT_DIR_BYTES, childName)) {
String s = "\"" + HdfsConstants.DOT_SNAPSHOT_DIR + "\" is a reserved name.";
if (!namesystem.isImageLoaded()) {
s += " Please rename it before upgrade.";
}
throw new HadoopIllegalArgumentException(s);
}
}
/**
* Verify child's name for fs limit.
*
* @param childName byte[] containing new child name
* @param parentPath String containing parent path
* @throws PathComponentTooLongException child's name is too long.
*/
void verifyMaxComponentLength(byte[] childName, String parentPath)
throws PathComponentTooLongException {
if (maxComponentLength == 0) {
return;
}
final int length = childName.length;
if (length > maxComponentLength) {View on GitHub (pinned to 2add963021)