{"record":{"id":"c2ec8b87744c74c2","repo":"apache/hadoop","slug":"malformed-livenodes-json-got-token-s-currentn","errorCode":null,"errorMessage":"Malformed LiveNodes JSON; got token = %s; currentNodeAddr = %s: %s","messagePattern":"Malformed LiveNodes JSON; got token = (.+?); currentNodeAddr = (.+?): (.+?)","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"hadoop-tools/hadoop-dynamometer/hadoop-dynamometer-infra/src/main/java/org/apache/hadoop/tools/dynamometer/DynoInfraUtils.java","lineNumber":508,"sourceCode":"\n    int objectDepth = 0;\n    String currentNodeAddr = null;\n    for (JsonToken tok = parser.nextToken(); tok != null; tok = parser\n        .nextToken()) {\n      if (tok == JsonToken.START_OBJECT) {\n        objectDepth++;\n      } else if (tok == JsonToken.END_OBJECT) {\n        objectDepth--;\n      } else if (tok == JsonToken.FIELD_NAME) {\n        if (objectDepth == 1) {\n          // This is where the Datanode identifiers are stored\n          currentNodeAddr = parser.getCurrentName();\n        } else if (objectDepth == 2) {\n          if (parser.getCurrentName().equals(\"numBlocks\")) {\n            JsonToken valueToken = parser.nextToken();\n            if (valueToken != JsonToken.VALUE_NUMBER_INT\n                || currentNodeAddr == null) {\n              throw new IOException(String.format(\"Malformed LiveNodes JSON; \"\n                      + \"got token = %s; currentNodeAddr = %s: %s\",\n                  valueToken, currentNodeAddr, liveNodeJsonString));\n            }\n            int numBlocks = parser.getIntValue();\n            if (numBlocks < blockThreshold) {\n              log.debug(String.format(\n                  \"Queueing Datanode <%s> for block report; numBlocks = %d\",\n                  currentNodeAddr, numBlocks));\n              dataNodesToReport.add(currentNodeAddr);\n            } else {\n              log.debug(String.format(\n                  \"Not queueing Datanode <%s> for block report; numBlocks = %d\",\n                  currentNodeAddr, numBlocks));\n            }\n          }\n        }\n      }\n    }","sourceCodeStart":490,"sourceCodeEnd":526,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-tools/hadoop-dynamometer/hadoop-dynamometer-infra/src/main/java/org/apache/hadoop/tools/dynamometer/DynoInfraUtils.java#L490-L526","documentation":"Dynamometer utility parse failure: while tokenizing the NameNode's LiveNodes JMX JSON to find stale DataNodes, the stream did not match the expected structure at the given token/current node address; the raw values are included for diagnosis.","triggerScenarios":"The LiveNodes JSON returned by the NameNode JMX endpoint cannot be parsed into the expected structure, e.g. because the token order or format changed or the endpoint returned an error page.","commonSituations":"See trigger scenarios.","solutions":["Verify the NameNode JMX/LiveNodes endpoint returns well-formed JSON; an upgrade or proxy may have altered the response format."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}