apache/hadoop · error · UnsupportedOperationException

ProvidedReplica does not support deleting block data

Error message

ProvidedReplica does not support deleting block data

What it means

Error "ProvidedReplica does not support deleting block data" thrown in apache/hadoop.

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)

Solutions

  1. Do not delete provided replica data through the DataNode; manage lifecycle in the external store.
  2. Unmap the provided file from HDFS (remove the provided mapping) rather than deleting replica data.

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.