apache/hadoop · error · IOException
The snapshot name is null or empty.
Error message
The snapshot name is null or empty.
What it means
Error "The snapshot name is null or empty." thrown in apache/hadoop.
Source
Thrown at hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeRpcServer.java:1979
metrics.incrCreateSnapshotOps();
String ret = null;
try {
ret = namesystem.createSnapshot(snapshotRoot, snapshotName,
cacheEntry != null);
} finally {
RetryCache.setState(cacheEntry, ret != null, ret);
}
return ret;
}
@Override
public void deleteSnapshot(String snapshotRoot, String snapshotName)
throws IOException {
checkNNStartup();
LOG.debug("*DIR* NameNode.deleteSnapshot: Path {} and SnapshotName {}",
snapshotRoot, snapshotName);
if (snapshotName == null || snapshotName.isEmpty()) {
throw new IOException("The snapshot name is null or empty.");
}
namesystem.checkOperation(OperationCategory.WRITE);
metrics.incrDeleteSnapshotOps();
CacheEntry cacheEntry = getCacheEntry();
if (cacheEntry != null && cacheEntry.isSuccess()) {
return; // Return previous response
}
boolean success = false;
try {
namesystem.deleteSnapshot(snapshotRoot, snapshotName, cacheEntry != null);
success = true;
} finally {
RetryCache.setState(cacheEntry, success);
}
}
@Override
// Client ProtocolView on GitHub (pinned to 2add963021)
Solutions
- Provide a non-null, non-empty snapshot name when creating a snapshot.
When it happens
Trigger: createSnapshot is invoked without a snapshot name (null or empty).
Common situations: Calling 'hdfs dfs -createSnapshot <path>' without specifying a name where the API requires one.
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/d2bebc92e5261fed.
Report an issue: GitHub.