{"record":{"id":"5d11c9b7308c948c","repo":"apache/hadoop","slug":"property-not-found-within","errorCode":null,"errorMessage":"Property {} not found within {}","messagePattern":"Property (.+?) not found within (.+?)","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":587,"sourceCode":"    while (objectDepth > 0) {\n      JsonToken tok = parser.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 (parser.getCurrentName().equals(property)) {\n          parser.nextToken();\n          ret = parser.getText();\n          break;\n        }\n      }\n    }\n    parser.close();\n    in.close();\n    conn.disconnect();\n    if (ret == null) {\n      throw new IOException(\n          \"Property \" + property + \" not found within \" + jmxBeanQuery);\n    } else {\n      return ret;\n    }\n  }\n\n}\n","sourceCodeStart":569,"sourceCodeEnd":595,"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#L569-L595","documentation":"After the JMX JSON passes the shape check, the parser walks the first bean object looking for a field named exactly like the requested property. If no such field is found, ret stays null and this IOException names the property and the query. The endpoint and bean are fine; the first matching bean simply does not expose that attribute.","triggerScenarios":"Calling the JMX fetch helper with a property the bean does not define: a misspelled or wrong-case metric name, a metric renamed/removed in a different Hadoop version, or a qry= that matches several beans where the parser only scans the first one and it lacks the property.","commonSituations":"Replaying a fsimage against a different Hadoop version whose MBean attribute names changed, typo'd property constants, or asking a NameNode bean for a DataNode-only metric (e.g. 'VolumeInfo' style attributes).","solutions":["curl 'http://<host>:<httpPort>/jmx?qry=<beanQuery>' and copy the exact attribute name out of the first bean object","Make the qry= more specific so the bean carrying the property is the first element of the beans array","Verify the attribute still exists in the Hadoop version running inside Dynamometer","Check spelling and case of the property string"],"exampleFix":"// before: attribute names are case-sensitive\nString v = DynoInfraUtils.fetchJMXProperty(url, beanQuery, \"missingblocks\");\n// after: use the exact name from the bean JSON\nString v = DynoInfraUtils.fetchJMXProperty(url, beanQuery, \"MissingBlocks\");","handlingStrategy":"validation","validationCode":"// fetch the bean JSON once and verify the attribute exists before polling for it\nObjectMapper om = new ObjectMapper();\nJsonNode firstBean = om.readTree(new URL(jmxUrl)).path(\"beans\").path(0);\nif (!firstBean.has(property)) {\n  throw new IllegalStateException(\"bean lacks attribute '\" + property + \"'; has: \" + firstBean.fieldNames());\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Pin property names against the exact Hadoop version you replay","Prefer reading attribute names from a live curl of the bean rather than docs/memory","Keep the qry= filter narrow so the first bean is deterministic"],"tags":["dynamometer","jmx","metrics","configuration"],"backgroundTag":"jmx-attribute-not-found","analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}