{"record":{"id":"cacfc64610d981d1","repo":"apache/hadoop","slug":"host-location-component-index-out-of-range","errorCode":null,"errorMessage":"Host location component index out of range.","messagePattern":"Host location component index out of range\\.","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"hadoop-tools/hadoop-rumen/src/main/java/org/apache/hadoop/tools/rumen/ParsedHost.java","lineNumber":54,"sourceCode":"      .compile(\"/([^/]+)/([^/]+)\");\n\n  /**\n   * TODO handle arbitrary level of network names.\n   */\n  static int numberOfDistances() {\n    return 3;\n  }\n\n  String nameComponent(int i) throws IllegalArgumentException {\n    switch (i) {\n    case 0:\n      return rackName;\n\n    case 1:\n      return nodeName;\n\n    default:\n      throw new IllegalArgumentException(\n          \"Host location component index out of range.\");\n    }\n  }\n\n  @Override\n  public int hashCode() {\n    return rackName.hashCode() * 17 + nodeName.hashCode();\n  }\n\n  public static ParsedHost parse(String name) {\n    // separate out the node name\n    Matcher matcher = splitPattern.matcher(name);\n\n    if (!matcher.matches())\n      return null;\n\n    return new ParsedHost(matcher.group(1), matcher.group(2));\n  }","sourceCodeStart":36,"sourceCodeEnd":72,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-tools/hadoop-rumen/src/main/java/org/apache/hadoop/tools/rumen/ParsedHost.java#L36-L72","documentation":"Error \"Host location component index out of range.\" thrown in apache/hadoop.","triggerScenarios":"A host location component index is requested beyond the number of location components parsed from the host name.","commonSituations":"See trigger scenarios.","solutions":["Check the host name string; the requested location component index exceeds the number of path components."],"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-23T01:17:44.959Z"}