apache/hadoop · error · UnsupportedOperationException
ProvidedReplica does not support deleting block data
Error message
ProvidedReplica does not support deleting block data
What it means
Unsupported-operation sentinel in deleteBlockData: the block's bytes live in a remote/provided storage system not owned by the datanode, so locally deleting the block data is impossible and the destructive request is rejected.
Solutions
- Do not delete provided replica data through the DataNode; manage lifecycle in the external store.
- Unmap the provided file from HDFS (remove the provided mapping) rather than deleting replica data.
Defensive patterns
Strategy: validation
When it happens
Trigger: A delete of block data is attempted on a ProvidedReplica, which does not own its backing data.
Common situations: An attempt was made to delete block data of a provided replica, which is managed externally. Delete the data in the backing store instead.
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/c218c73307230d4f.
Report an issue: GitHub.
Appendix: source
Thrown at hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/ProvidedReplica.java:238
return null;
}
@Override
public boolean blockDataExists() {
if(remoteFS != null) {
try {
return remoteFS.exists(new Path(getRemoteURI()));
} catch (IOException e) {
return false;
}
} else {
return false;
}
}
@Override
public boolean deleteBlockData() {
throw new UnsupportedOperationException(
"ProvidedReplica does not support deleting block data");
}
@Override
public long getBlockDataLength() {
return this.getNumBytes();
}
@Override
public LengthInputStream getMetadataInputStream(long offset)
throws IOException {
return new LengthInputStream(new ByteArrayInputStream(NULL_CHECKSUM_ARRAY),
NULL_CHECKSUM_ARRAY.length);
}
@Override
public boolean metadataExists() {
return NULL_CHECKSUM_ARRAY == null ? false : true;View on GitHub (pinned to 2add963021)