apache/hadoop · error · IOException

Can't find minimum sources required by reconstruction, block

Error message

Can't find minimum sources required by reconstruction, block id: {}

What it means

Error "Can't find minimum sources required by reconstruction, block id: {}" thrown in apache/hadoop.

Source

Thrown at hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/erasurecode/StripedReader.java:164

    // list of DNs for next iteration read.
    successList = new int[minRequiredSources];

    StripedBlockReader reader;
    int nSuccess = 0;
    for (int i = 0; i < sources.length && nSuccess < minRequiredSources; i++) {
      reader = createReader(i, 0);
      readers.add(reader);
      if (reader.getBlockReader() != null) {
        initOrVerifyChecksum(reader);
        successList[nSuccess++] = i;
      }
    }

    if (nSuccess < minRequiredSources) {
      String error = "Can't find minimum sources required by "
          + "reconstruction, block id: "
          + reconstructor.getBlockGroup().getBlockId();
      throw new IOException(error);
    }
  }

  StripedBlockReader createReader(int idxInSources, long offsetInBlock) {
    return new StripedBlockReader(this, datanode,
        conf, liveIndices[idxInSources],
        reconstructor.getBlock(liveIndices[idxInSources]),
        sources[idxInSources], offsetInBlock);
  }

  private void initBufferSize() {
    int bytesPerChecksum = checksum.getBytesPerChecksum();
    // The bufferSize is flat to divide bytesPerChecksum
    int readBufferSize = stripedReadBufferSize;
    bufferSize = readBufferSize < bytesPerChecksum ? bytesPerChecksum :
        readBufferSize - readBufferSize % bytesPerChecksum;
  }

View on GitHub (pinned to 2add963021)

Solutions

  1. Ensure at least the minimum number of source DataNodes required by the erasure coding policy are live and serving the block's stripe.
  2. Run 'hdfs fsck' on the file to check the block state; recover or re-replicate missing internal blocks.
  3. Check network and disk health on the DataNodes holding the stripe and bring them back online.

When it happens

Trigger: Erasure-coding read when fewer live source DataNodes than the minimum required by the EC policy hold the block's stripes, e.g. after multiple DataNode or disk failures.

Common situations: See trigger scenarios.


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