apache/hadoop · error · IOException

{} not found in datanode.

Error message

{} not found in datanode.

What it means

Error "{} not found in datanode." thrown in apache/hadoop.

Source

Thrown at hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java:3639

   *          the stored GS and the visible length. 
   * @param targets targets to transfer the block to
   * @param client client name
   */
  void transferReplicaForPipelineRecovery(final ExtendedBlock b,
      final DatanodeInfo[] targets, final StorageType[] targetStorageTypes,
      final String[] targetStorageIds, final String client)
      throws IOException {
    final long storedGS;
    final long visible;
    final BlockConstructionStage stage;

    //get replica information
    try (AutoCloseableLock lock = dataSetLockManager.readLock(
        LockLevel.BLOCK_POOl, b.getBlockPoolId())) {
      Block storedBlock = data.getStoredBlock(b.getBlockPoolId(),
          b.getBlockId());
      if (null == storedBlock) {
        throw new IOException(b + " not found in datanode.");
      }
      storedGS = storedBlock.getGenerationStamp();
      if (storedGS < b.getGenerationStamp()) {
        throw new IOException(storedGS
            + " = storedGS < b.getGenerationStamp(), b=" + b);
      }
      // Update the genstamp with storedGS
      b.setGenerationStamp(storedGS);
      if (data.isValidRbw(b)) {
        stage = BlockConstructionStage.TRANSFER_RBW;
        LOG.debug("Replica is being written!");
      } else if (data.isValidBlock(b)) {
        stage = BlockConstructionStage.TRANSFER_FINALIZED;
        LOG.debug("Replica is finalized!");
      } else {
        final String r = data.getReplicaString(b.getBlockPoolId(), b.getBlockId());
        throw new IOException(b + " is neither a RBW nor a Finalized, r=" + r);
      }

View on GitHub (pinned to 2add963021)

Solutions

  1. Confirm the block id and block pool id are correct and that the replica still exists; it may have been deleted by the balancer or replication change.
  2. Retry the operation; if the block was legitimately removed, the error is benign.

When it happens

Trigger: An operation (e.g., recovery or replica lookup) references a block that does not exist in this DataNode's dataset.

Common situations: The requested block does not exist on this DataNode, often because it was deleted or balanced away. Harmless if the client retries against fresh locations.


AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22). Data as JSON: /api/errors/2c16276efd6b18c2. Report an issue: GitHub.