apache/hadoop · error · StandbyException
Operation category {op} is not supported at {getRole()}
Error message
Operation category {op} is not supported at {getRole()} What it means
Error "Operation category {op} is not supported at {getRole()}" thrown in apache/hadoop.
Source
Thrown at hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/BackupNode.java:459
@Override // NameNode
protected NameNodeHAContext createHAContext() {
return new BNHAContext();
}
private class BNHAContext extends NameNodeHAContext {
@Override // NameNodeHAContext
public void checkOperation(OperationCategory op)
throws StandbyException {
if (op == OperationCategory.UNCHECKED ||
op == OperationCategory.CHECKPOINT) {
return;
}
if (OperationCategory.JOURNAL != op &&
!(OperationCategory.READ == op && !isRole(NamenodeRole.CHECKPOINT))) {
String msg = "Operation category " + op
+ " is not supported at " + getRole();
throw new StandbyException(msg);
}
}
@Override // NameNodeHAContext
public void prepareToStopStandbyServices() throws ServiceFailedException {
}
/**
* Start services for BackupNode.
* <p>
* The following services should be muted
* (not run or not pass any control commands to DataNodes)
* on BackupNode:
* {@link LeaseManager.Monitor} protected by SafeMode.
* {@link BlockManager.RedundancyMonitor} protected by SafeMode.
* {@link HeartbeatManager.Monitor} protected by SafeMode.
* {@link DatanodeAdminManager.Monitor} need to prohibit refreshNodes().
* {@link PendingReconstructionBlocks.PendingReconstructionMonitor}View on GitHub (pinned to 2add963021)
Solutions
- Issue the operation against the active NameNode instead of the BackupNode; BackupNode only supports read/checkpoint-related operation categories.
When it happens
Trigger: RPC for a write or unsupported operation category sent to a BackupNode/standby role instead of the active NameNode.
Common situations: See trigger scenarios.
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/d750f896756d8019.
Report an issue: GitHub.