{"record":{"id":"574229c456d96728","repo":"apache/hadoop","slug":"not-enough-bytes-to-read","errorCode":null,"errorMessage":"Not enough bytes to read.","messagePattern":"Not enough bytes to read\\.","errorType":"exception","errorClass":"EOFException","httpStatus":null,"severity":"error","filePath":"hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/HarFileSystem.java","lineNumber":1084,"sourceCode":"        if (nlength <= 0) {\n          // EOS:\n          return -1;\n        }\n        return underLyingStream.read(pos + start , b, offset, nlength);\n      }\n      \n      /**\n       * position readable again.\n       */\n      @Override\n      public void readFully(long pos, byte[] b, int offset, int length) \n      throws IOException {\n        validatePositionedReadArgs(pos, b, offset, length);\n        if (length == 0) {\n          return;\n        }\n        if (start + length + pos > end) {\n          throw new EOFException(\"Not enough bytes to read.\");\n        }\n        underLyingStream.readFully(pos + start, b, offset, length);\n      }\n\n      @Override\n      public void setReadahead(Long readahead) throws IOException {\n        underLyingStream.setReadahead(readahead);\n      }\n\n      @Override\n      public void setDropBehind(Boolean dropBehind) throws IOException {\n        underLyingStream.setDropBehind(dropBehind);\n      }\n    }\n  \n    /**\n     * constructors for har input stream.\n     * @param fs the underlying filesystem","sourceCodeStart":1066,"sourceCodeEnd":1102,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/HarFileSystem.java#L1066-L1102","documentation":"Error \"Not enough bytes to read.\" thrown in apache/hadoop.","triggerScenarios":"Thrown at hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/HarFileSystem.java:1084 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Reduce the requested read length to the remaining bytes in the entry.","Verify the Har index entry offsets/lengths match the part file contents; re-create the archive if 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"}