{"record":{"id":"90567d1f403cc576","repo":"apache/hadoop","slug":"invalid-class-value-in-nodeplan-json-textvalue","errorCode":null,"errorMessage":"Invalid @class value in NodePlan JSON: {textValue}","messagePattern":"Invalid @class value in NodePlan JSON: (.+?)","errorType":"validation","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/diskbalancer/planner/NodePlan.java","lineNumber":198,"sourceCode":"   *\n   * @param node a node representing the root of tree structure\n   * @throws IOException if any unexpected `@class` values are found - this is the\n   * pre-existing exception type exposed by the calling code\n   */\n  private static void checkNodes(JsonNode node) throws IOException {\n    if (node == null) {\n      return;\n    }\n\n    // Check Node and Recurse into child nodes\n    if (node.isObject()) {\n      Iterator<Map.Entry<String, JsonNode>> fieldsIterator = node.fields();\n      while (fieldsIterator.hasNext()) {\n        Map.Entry<String, JsonNode> entry = fieldsIterator.next();\n        if (\"@class\".equals(entry.getKey())) {\n          String textValue = entry.getValue().asText();\n          if (textValue != null && !textValue.isBlank() && !stepClassIsAllowed(textValue)) {\n            throw new IOException(\"Invalid @class value in NodePlan JSON: \" + textValue);\n          }\n        }\n        checkNodes(entry.getValue());\n      }\n    } else if (node.isArray()) {\n      for (int i = 0; i < node.size(); i++) {\n        checkNodes(node.get(i));\n      }\n    }\n  }\n\n  /**\n   * Returns a JSON representation of NodePlan.\n   *\n   * @return - JSON String\n   * @throws IOException\n   */\n  public String toJson() throws IOException {","sourceCodeStart":180,"sourceCodeEnd":216,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/diskbalancer/planner/NodePlan.java#L180-L216","documentation":"Error \"Invalid @class value in NodePlan JSON: {textValue}\" thrown in apache/hadoop.","triggerScenarios":"DiskBalancer plan parsing when the JSON @class field names a class that is not a known NodePlan implementation.","commonSituations":"See trigger scenarios.","solutions":["Fix the @class field in the NodePlan JSON to a valid planner step class name.","Regenerate the plan file with the diskbalancer tool instead of editing it by hand."],"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"}