apache/hadoop · error · SnapshotException
Unable to rename because {} has snapshottable descendant dir
Error message
Unable to rename because {} has snapshottable descendant directories and {} is a descent of a snapshottable directory, and HDFS does not support nested snapshottable directory. What it means
Error "Unable to rename because {} has snapshottable descendant directories and {} is a descent of a snapshottable directory, and HDFS does not support nested snapshottable directory." thrown in apache/hadoop.
Source
Thrown at hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirRenameOp.java:637
private static void validateNestSnapshot(FSDirectory fsd, String srcPath,
INodeDirectory dstParent, List<INodeDirectory> snapshottableDirs)
throws SnapshotException {
if (fsd.getFSNamesystem().getSnapshotManager().isAllowNestedSnapshots()) {
return;
}
/*
* snapshottableDirs is a list of snapshottable directory (child of rename
* src) which do not have snapshots yet. If this list is not empty, that
* means rename src has snapshottable descendant directories.
*/
if (snapshottableDirs != null && snapshottableDirs.size() > 0) {
if (fsd.getFSNamesystem().getSnapshotManager()
.isDescendantOfSnapshotRoot(dstParent)) {
String dstPath = dstParent.getFullPathName();
throw new SnapshotException("Unable to rename because " + srcPath
+ " has snapshottable descendant directories and " + dstPath
+ " is a descent of a snapshottable directory, and HDFS does"
+ " not support nested snapshottable directory.");
}
}
}
private static class RenameOperation {
private final FSDirectory fsd;
private INodesInPath srcIIP;
private final INodesInPath srcParentIIP;
private INodesInPath dstIIP;
private final INodesInPath dstParentIIP;
private final INodeReference.WithCount withCount;
private final int srcRefDstSnapshot;
private final INodeDirectory srcParent;
private final byte[] srcChildName;
private final boolean isSrcInSnapshot;View on GitHub (pinned to 2add963021)
Solutions
- Avoid renaming across snapshottable directory boundaries that would create nested snapshottable directories.
- Disallow snapshots on one of the directories (hdfs dfsadmin -disallowSnapshot) before renaming.
When it happens
Trigger: Renaming a directory that has snapshottable descendants into a location under another snapshottable directory, which would create nested snapshottable directories.
Common situations: See trigger scenarios.
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/1566acf7534b6343.
Report an issue: GitHub.