apache/hadoop · error · IOException

<minReplication> < <uris.length>: Minimum replication < #des

Error message

<minReplication> < <uris.length>: Minimum replication < #destinations

What it means

Error "<minReplication> < <uris.length>: Minimum replication < #destinations" thrown in apache/hadoop.

Source

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

  private NflyFSystem(URI[] uris, Configuration conf, int minReplication,
      EnumSet<NflyKey> nflyFlags) throws IOException {
    this(uris, conf, minReplication, nflyFlags, null);
  }

  /**
   * Creates a new Nfly instance.
   *
   * @param uris the list of uris in the mount point
   * @param conf configuration object
   * @param minReplication minimum copies to commit a write op
   * @param nflyFlags modes such readMostRecent
   * @param fsGetter to get the file system instance with the given uri
   * @throws IOException
   */
  private NflyFSystem(URI[] uris, Configuration conf, int minReplication,
      EnumSet<NflyKey> nflyFlags, FsGetter fsGetter) throws IOException {
    if (uris.length < minReplication) {
      throw new IOException(minReplication + " < " + uris.length
          + ": Minimum replication < #destinations");
    }
    setConf(conf);
    final String localHostName = InetAddress.getLocalHost().getHostName();

    // build a list for topology resolution
    final List<String> hostStrings = new ArrayList<String>(uris.length + 1);
    for (URI uri : uris) {
      final String uriHost = uri.getHost();
      // assume local file system or another closest filesystem if no authority
      hostStrings.add(uriHost == null ? localHostName : uriHost);
    }
    // resolve the client node
    hostStrings.add(localHostName);

    final DNSToSwitchMapping tmpDns = ReflectionUtils.newInstance(conf.getClass(
        CommonConfigurationKeys.NET_TOPOLOGY_NODE_SWITCH_MAPPING_IMPL_KEY,
        ScriptBasedMapping.class, DNSToSwitchMapping.class), conf);

View on GitHub (pinned to 2add963021)

Solutions

  1. Set minReplication less than or equal to the number of configured Nfly target URIs.
  2. Add more destination URIs or lower the minimum replication setting.

When it happens

Trigger: Thrown by NflyFSystem when the configured minimum replication (nfly.minReplication) is less than the number of destination URIs, so writes cannot satisfy the policy.

Common situations: See trigger scenarios.


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