apache/hadoop · error · IllegalArgumentException

Level cannot be negative

Error message

Level cannot be negative

What it means

Error "Level cannot be negative" thrown in apache/hadoop.

Source

Thrown at hadoop-tools/hadoop-rumen/src/main/java/org/apache/hadoop/tools/rumen/Node.java:49

    Collections.unmodifiableSortedSet(new TreeSet<Node>());
  private Node parent;
  private final String name;
  private final int level;
  private SortedSet<Node> children;

  /**
   * @param name
   *          A unique name to identify a node in the cluster.
   * @param level
   *          The level of the node in the cluster
   */
  public Node(String name, int level) {
    if (name == null) {
      throw new IllegalArgumentException("Node name cannot be null");
    }

    if (level < 0) {
      throw new IllegalArgumentException("Level cannot be negative");
    }

    this.name = name;
    this.level = level;
  }

  /**
   * Get the name of the node.
   * 
   * @return The name of the node.
   */
  public String getName() {
    return name;
  }

  /**
   * Get the level of the node.
   * @return The level of the node.

View on GitHub (pinned to 2add963021)

Solutions

  1. Use a non-negative level value when constructing the topology node.

When it happens

Trigger: A Rumen topology Node is constructed with a negative level value, which is rejected.

Common situations: See trigger scenarios.


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