{"record":{"id":"a67562283c0c21eb","repo":"apache/hadoop","slug":"invalid-meta-data-for-the-har-filesystem","errorCode":null,"errorMessage":"Invalid meta data for the Har Filesystem","messagePattern":"Invalid meta data for the Har Filesystem","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/HarFileSystem.java","lineNumber":190,"sourceCode":"      metadata.parseMetaData();\n      harMetaCache.put(uri, metadata);\n    }\n  }\n\n  @Override\n  public Configuration getConf() {\n    return fs.getConf();\n  }\n\n  // get the version of the filesystem from the masterindex file\n  // the version is currently not useful since its the first version\n  // of archives\n  public int getHarVersion() throws IOException {\n    if (metadata != null) {\n      return metadata.getVersion();\n    }\n    else {\n      throw new IOException(\"Invalid meta data for the Har Filesystem\");\n    }\n  }\n\n  /*\n   * find the parent path that is the \n   * archive path in the path. The last\n   * path segment that ends with .har is \n   * the path that will be returned.\n   */\n  private Path archivePath(Path p) {\n    Path retPath = null;\n    Path tmp = p;\n    for (int i=0; i< p.depth(); i++) {\n      if (tmp.toString().endsWith(\".har\")) {\n        retPath = tmp;\n        break;\n      }\n      tmp = tmp.getParent();","sourceCodeStart":172,"sourceCodeEnd":208,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/HarFileSystem.java#L172-L208","documentation":"Error \"Invalid meta data for the Har Filesystem\" thrown in apache/hadoop.","triggerScenarios":"Thrown at hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/HarFileSystem.java:190 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Re-generate the Har archive; its _masterindex/_index metadata is corrupt.","Verify the archive version matches the reader's expected version."],"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"}