apache/hadoop · error · UnsupportedOperationException
Replica of type ${getState()} does not support getOriginalRe
Error message
Replica of type ${getState()} does not support getOriginalReplica What it means
Error "Replica of type ${getState()} does not support getOriginalReplica" thrown in apache/hadoop.
Source
Thrown at hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/LocalReplicaInPipeline.java:391
File restartMeta = new File(blockFile.getParent() +
File.pathSeparator + "." + blockFile.getName() + ".restart");
if (!getFileIoProvider().deleteWithExistsCheck(getVolume(), restartMeta)) {
DataNode.LOG.warn("Failed to delete restart meta file: " +
restartMeta.getPath());
}
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() +View on GitHub (pinned to 2add963021)
Solutions
- Do not call getOriginalReplica on a replica in this state; only replicas under recovery expose the original replica.
- Check the replica state before invoking recovery-only APIs.
When it happens
Trigger: Code calls getOriginalReplica on a replica whose state does not support it (e.g., not a ReplicaUnderRecovery).
Common situations: Code called getOriginalReplica on a replica type that has no original, an internal misuse. Only valid on ReplicaUnderRecovery.
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/7a0b28804688abe5.
Report an issue: GitHub.