apache/hadoop · error · IOException

Failed to sufficiently replicate: min=<minReplication> actua

Error message

Failed to sufficiently replicate: min=<minReplication> actual=<opSet.cardinality()>

What it means

Error "Failed to sufficiently replicate: min=<minReplication> actual=<opSet.cardinality()>" thrown in apache/hadoop.

Source

Thrown at hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/NflyFSystem.java:392

      }
      mayThrow(ioExceptions);
    }

    @Override
    public void close() throws IOException {
      final List<IOException> ioExceptions = new ArrayList<IOException>();
      for (int i = opSet.nextSetBit(0);
           i >= 0;
           i = opSet.nextSetBit(i + 1)) {
        try {
          outputStreams[i].close();
        } catch (Throwable t) {
          osException(i, "close", t, ioExceptions);
        }
      }
      if (opSet.cardinality() < minReplication) {
        cleanupAllTmpFiles();
        throw new IOException("Failed to sufficiently replicate: min="
            + minReplication + " actual=" + opSet.cardinality());
      } else {
        commit();
      }
    }

    private void cleanupAllTmpFiles() throws IOException {
      for (int i = 0; i < outputStreams.length; i++) {
        try {
          nodes[i].fs.delete(tmpPath);
        } catch (Throwable t) {
          processThrowable(nodes[i], "delete", t, null, tmpPath);
        }
      }
    }

    private void commit() throws IOException {
      final List<IOException> ioExceptions = new ArrayList<IOException>();

View on GitHub (pinned to 2add963021)

Solutions

  1. Check the health of the Nfly target filesystems; fewer replicas than minReplication succeeded.
  2. Lower minReplication or fix the failing target filesystem writes.

When it happens

Trigger: Thrown by NflyFSystem after a write/repair when fewer replicas than minReplication succeeded, i.e. the operation could not be sufficiently replicated.

Common situations: See trigger scenarios.


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