apache/hadoop · error · IllegalArgumentException

Bandwidth should not exceed maximum limit {} bytes per secon

Error message

Bandwidth should not exceed maximum limit {} bytes per second

What it means

Error "Bandwidth should not exceed maximum limit {} bytes per second" thrown in apache/hadoop.

Source

Thrown at hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeRpcServer.java:1494

    String[] files = new String[fbs.size()];
    int i = 0;
    for(FSNamesystem.CorruptFileBlockInfo fb: fbs) {
      files[i++] = fb.path;
    }
    return new CorruptFileBlocks(files, cookieTab[0]);
  }

  /**
   * Tell all datanodes to use a new, non-persistent bandwidth value for
   * dfs.datanode.balance.bandwidthPerSec.
   * @param bandwidth Balancer bandwidth in bytes per second for all datanodes.
   * @throws IOException
   */
  @Override // ClientProtocol
  public void setBalancerBandwidth(long bandwidth) throws IOException {
    if (bandwidth > HdfsServerConstants.MAX_BANDWIDTH_PER_DATANODE) {
      throw new IllegalArgumentException(
          "Bandwidth should not exceed maximum limit "
              + HdfsServerConstants.MAX_BANDWIDTH_PER_DATANODE
              + " bytes per second");
    }
    checkNNStartup();
    namesystem.setBalancerBandwidth(bandwidth);
  }
  
  @Override // ClientProtocol
  public ContentSummary getContentSummary(String path) throws IOException {
    checkNNStartup();
    return namesystem.getContentSummary(path);
  }

  @Override // ClientProtocol
  public QuotaUsage getQuotaUsage(String path) throws IOException {
    checkNNStartup();
    return namesystem.getQuotaUsage(path);

View on GitHub (pinned to 2add963021)

Solutions

  1. Set the balancer bandwidth at or below the maximum configured via dfs.balancer.max-bandwidth / dfs.datanode.balance.bandwidthPerSec.

When it happens

Trigger: setBalancerBandwidth is called with a value exceeding the configured maximum limit.

Common situations: Running 'hdfs dfsadmin -setBalancerBandwidth' with a value above the allowed cap.


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