apache/hadoop · error · IOException
The new snapshot name is null or empty.
Error message
The new snapshot name is null or empty.
What it means
Parameter validation in NameNodeRpcServer.renameSnapshot: the new snapshot name is null or empty, so the rename request has no valid target name and is rejected.
Solutions
- Provide a non-null, non-empty new snapshot name for the rename operation.
Defensive patterns
Strategy: validation
When it happens
Trigger: renameSnapshot is invoked with a null or empty new name.
Common situations: Calling 'hdfs dfs -renameSnapshot <path> <old> ""' or an API call with a missing new name.
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/6281e430416c3cb8.
Report an issue: GitHub.
Appendix: source
Thrown at hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeRpcServer.java:2021
@Override
// Client Protocol
public void disallowSnapshot(String snapshot) throws IOException {
checkNNStartup();
metrics.incrDisAllowSnapshotOps();
namesystem.disallowSnapshot(snapshot);
}
@Override
// ClientProtocol
public void renameSnapshot(String snapshotRoot, String snapshotOldName,
String snapshotNewName) throws IOException {
checkNNStartup();
LOG.debug(
"*DIR* NameNode.renameSnapshot: Snapshot Path {},snapshotOldName {}, snapshotNewName {}",
snapshotRoot, snapshotOldName, snapshotNewName);
if (snapshotNewName == null || snapshotNewName.isEmpty()) {
throw new IOException("The new snapshot name is null or empty.");
}
namesystem.checkOperation(OperationCategory.WRITE);
metrics.incrRenameSnapshotOps();
CacheEntry cacheEntry = getCacheEntry();
if (cacheEntry != null && cacheEntry.isSuccess()) {
return; // Return previous response
}
boolean success = false;
try {
namesystem.renameSnapshot(snapshotRoot, snapshotOldName,
snapshotNewName, cacheEntry != null);
success = true;
} finally {
RetryCache.setState(cacheEntry, success);
}
}
@Override // Client ProtocolView on GitHub (pinned to 2add963021)