{"record":{"id":"769665d355f9b0b0","repo":"apache/hadoop","slug":"invalid-entry-missing-hostname","errorCode":null,"errorMessage":"Invalid entry! Missing hostname","messagePattern":"Invalid entry! Missing hostname","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"hadoop-tools/hadoop-rumen/src/main/java/org/apache/hadoop/tools/rumen/LoggedTaskAttempt.java","lineNumber":348,"sourceCode":"\n  void setFinishTime(long finishTime) {\n    this.finishTime = finishTime;\n  }\n\n  public NodeName getHostName() {\n    return hostName;\n  }\n\n  // This is needed for JSON deserialization\n  void setHostName(String hostName) {\n    this.hostName = hostName == null ? null : new NodeName(hostName);\n  }\n\n  // In job-history, hostName is saved in the format rackName/NodeName\n  //TODO this is a hack! The '/' handling needs fixing.\n  void setHostName(String hostName, String rackName) {\n    if (hostName == null || hostName.length() == 0) {\n      throw new RuntimeException(\"Invalid entry! Missing hostname\");\n    } else if (rackName == null || rackName.length() == 0) {\n      setHostName(hostName);\n    } else {\n      // make sure that the rackname is prefixed with a '/'\n      if (!rackName.startsWith(\"/\")) {\n        rackName = \"/\" + rackName;\n      }\n      // make sure that the hostname is prefixed with a '/'\n      if (!hostName.startsWith(\"/\")) {\n        hostName = \"/\" + hostName;\n      }\n      setHostName(rackName.intern() + hostName.intern());\n    }\n  }\n\n  public long getHdfsBytesRead() {\n    return hdfsBytesRead;\n  }","sourceCodeStart":330,"sourceCodeEnd":366,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-tools/hadoop-rumen/src/main/java/org/apache/hadoop/tools/rumen/LoggedTaskAttempt.java#L330-L366","documentation":"Error \"Invalid entry! Missing hostname\" thrown in apache/hadoop.","triggerScenarios":"A parsed job-history task attempt entry lacks the hostname field, so the attempt cannot be attributed to a node.","commonSituations":"See trigger scenarios.","solutions":["Check the job history log entry; the task attempt record is missing its hostname field."],"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"}