{"record":{"id":"2a8d2597d050c930","repo":"apache/hadoop","slug":"node-name-cannot-be-null","errorCode":null,"errorMessage":"Node name cannot be null","messagePattern":"Node name cannot be null","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"hadoop-tools/hadoop-rumen/src/main/java/org/apache/hadoop/tools/rumen/Node.java","lineNumber":45,"sourceCode":" * {@link MachineNode}, or a {@link RackNode}, etc.\n */\npublic class Node implements Comparable<Node> {\n  private static final SortedSet<Node> EMPTY_SET = \n    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  }","sourceCodeStart":27,"sourceCodeEnd":63,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-tools/hadoop-rumen/src/main/java/org/apache/hadoop/tools/rumen/Node.java#L27-L63","documentation":"Error \"Node name cannot be null\" thrown in apache/hadoop.","triggerScenarios":"A Rumen topology Node is constructed with a null name, which is rejected.","commonSituations":"See trigger scenarios.","solutions":["Provide a non-null node name 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"}