{"record":{"id":"4208d2ea21974244","repo":"apache/hadoop","slug":"found-s-replication-strings","errorCode":null,"errorMessage":"Found %s replication strings","messagePattern":"Found (.+?) replication strings","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"hadoop-tools/hadoop-dynamometer/hadoop-dynamometer-blockgen/src/main/java/org/apache/hadoop/tools/dynamometer/blockgenerator/XMLParser.java","lineNumber":91,"sourceCode":"   */\n  List<BlockInfo> parseLine(String line) throws IOException {\n    if (currentState == State.DEFAULT) {\n      if (line.contains(\"<INodeSection>\")) {\n        transitionTo(State.INODE_SECTION);\n      } else {\n        return Collections.emptyList();\n      }\n    }\n    if (line.contains(\"<inode>\")) {\n      transitionTo(State.INODE);\n    }\n    if (line.contains(\"<type>FILE</type>\")) {\n      transitionTo(State.FILE);\n    }\n    List<String> replicationStrings = valuesFromXMLString(line, \"replication\");\n    if (!replicationStrings.isEmpty()) {\n      if (replicationStrings.size() > 1) {\n        throw new IOException(String.format(\"Found %s replication strings\",\n            replicationStrings.size()));\n      }\n      transitionTo(State.FILE_WITH_REPLICATION);\n      currentReplication = Short.parseShort(replicationStrings.get(0));\n    }\n    Matcher blockMatcher = BLOCK_PATTERN.matcher(line);\n    List<BlockInfo> blockInfos = new ArrayList<>();\n    while (blockMatcher.find()) {\n      if (currentState != State.FILE_WITH_REPLICATION) {\n        throw new IOException(\n            \"Found a block string when in state: \" + currentState);\n      }\n      long id = Long.parseLong(blockMatcher.group(1));\n      long gs = Long.parseLong(blockMatcher.group(2));\n      long size = Long.parseLong(blockMatcher.group(3));\n      blockInfos.add(new BlockInfo(id, gs, size, currentReplication));\n    }\n    if (line.contains(\"</inode>\")) {","sourceCodeStart":73,"sourceCodeEnd":109,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-tools/hadoop-dynamometer/hadoop-dynamometer-blockgen/src/main/java/org/apache/hadoop/tools/dynamometer/blockgenerator/XMLParser.java#L73-L109","documentation":"Error \"Found %s replication strings\" thrown in apache/hadoop.","triggerScenarios":"The XMLParser encounters a replication-related token in the input XML while it is not in the state that expects block replication strings, indicating a malformed or out-of-order fsimage XML document.","commonSituations":"See trigger scenarios.","solutions":["Regenerate the fsimage XML with 'hdfs oiv' and retry; the input XML is malformed or truncated.","Verify the fsimage file passed to the block generator is complete and not corrupt."],"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"}