apache/hadoop · error · UnsupportedOperationException
Replica of type ${getState()} does not support getRecoveryID
Error message
Replica of type ${getState()} does not support getRecoveryID What it means
Error "Replica of type ${getState()} does not support getRecoveryID" thrown in apache/hadoop.
Source
Thrown at hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/LocalReplicaInPipeline.java:397
return getFileIoProvider().getFileOutputStream(getVolume(), restartMeta);
}
@Override
public String toString() {
return super.toString()
+ "\n bytesAcked=" + bytesAcked
+ "\n bytesOnDisk=" + bytesOnDisk;
}
@Override
public ReplicaInfo getOriginalReplica() {
throw new UnsupportedOperationException("Replica of type " + getState() +
" does not support getOriginalReplica");
}
@Override
public long getRecoveryID() {
throw new UnsupportedOperationException("Replica of type " + getState() +
" does not support getRecoveryID");
}
@Override
public void setRecoveryID(long recoveryId) {
throw new UnsupportedOperationException("Replica of type " + getState() +
" does not support setRecoveryID");
}
@Override
public ReplicaRecoveryInfo createInfo(){
throw new UnsupportedOperationException("Replica of type " + getState() +
" does not support createInfo");
}
public void moveReplicaFrom(ReplicaInfo oldReplicaInfo, File newBlkFile)
throws IOException {
View on GitHub (pinned to 2add963021)
Solutions
- Only call getRecoveryID on replicas under recovery; guard the call with a state check.
- Use ReplicaUnderRecovery for recovery operations instead of the base replica object.
When it happens
Trigger: getRecoveryID is invoked on a replica type that does not track recovery IDs.
Common situations: getRecoveryID was called on a replica type that does not track recovery IDs. Indicates internal misuse; only recovery-state replicas support it.
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/ab905a748605d938.
Report an issue: GitHub.