{"record":{"id":"42aa8ca2b45a8da0","repo":"apache/hadoop","slug":"level-cannot-be-negative","errorCode":null,"errorMessage":"Level cannot be negative","messagePattern":"Level cannot be negative","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"hadoop-tools/hadoop-rumen/src/main/java/org/apache/hadoop/tools/rumen/Node.java","lineNumber":49,"sourceCode":"    Collections.unmodifiableSortedSet(new TreeSet<Node>());\n  private Node parent;\n  private final String name;\n  private final int level;\n  private SortedSet<Node> children;\n\n  /**\n   * @param name\n   *          A unique name to identify a node in the cluster.\n   * @param level\n   *          The level of the node in the cluster\n   */\n  public Node(String name, int level) {\n    if (name == null) {\n      throw new IllegalArgumentException(\"Node name cannot be null\");\n    }\n\n    if (level < 0) {\n      throw new IllegalArgumentException(\"Level cannot be negative\");\n    }\n\n    this.name = name;\n    this.level = level;\n  }\n\n  /**\n   * Get the name of the node.\n   * \n   * @return The name of the node.\n   */\n  public String getName() {\n    return name;\n  }\n\n  /**\n   * Get the level of the node.\n   * @return The level of the node.","sourceCodeStart":31,"sourceCodeEnd":67,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-tools/hadoop-rumen/src/main/java/org/apache/hadoop/tools/rumen/Node.java#L31-L67","documentation":"Error \"Level cannot be negative\" thrown in apache/hadoop.","triggerScenarios":"A Rumen topology Node is constructed with a negative level value, which is rejected.","commonSituations":"See trigger scenarios.","solutions":["Use a non-negative level value when constructing the topology node."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}