apache/hadoop · error · SnapshotException
Failed to create snapshot: there are already {} snapshot(s)
Error message
Failed to create snapshot: there are already {} snapshot(s) and the {} snapshot limit is {} What it means
Error "Failed to create snapshot: there are already {} snapshot(s) and the {} snapshot limit is {}" thrown in apache/hadoop.
Source
Thrown at hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/snapshot/SnapshotManager.java:489
}
void checkFileSystemSnapshotLimit(int n) throws SnapshotException {
checkSnapshotLimit(maxSnapshotFSLimit, n, "file system");
}
void checkPerDirectorySnapshotLimit(int n) throws SnapshotException {
checkSnapshotLimit(maxSnapshotLimit, n, "per directory");
}
void checkSnapshotLimit(int limit, int snapshotCount, String type)
throws SnapshotException {
if (snapshotCount >= limit) {
String msg = "there are already " + snapshotCount
+ " snapshot(s) and the " + type + " snapshot limit is "
+ limit;
if (isImageLoaded()) {
// We have reached the maximum snapshot limit
throw new SnapshotException(
"Failed to create snapshot: " + msg);
} else {
// image is getting loaded. LOG an error msg and continue
LOG.error(msg);
}
}
}
boolean isImageLoaded() {
return fsdir.isImageLoaded();
}
/**
* Delete a snapshot for a snapshottable directory
* @param snapshotName Name of the snapshot to be deleted
* @param now is the snapshot deletion time set by Time.now().
* @param reclaimContext Used to collect information to reclaim blocks
* and inodes
*/View on GitHub (pinned to 2add963021)
Solutions
- Delete unneeded snapshots or raise the per-directory snapshot limit (dfs.namenode.snapshot.max.allow.snapshots) if justified.
When it happens
Trigger: createSnapshot exceeds the configured snapshot count limit for the directory or system.
Common situations: Automated snapshot schedules accumulating snapshots until the limit is reached.
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/add1af28f767f071.
Report an issue: GitHub.