{"record":{"id":"c73fb6f2a6220bba","repo":"apache/hadoop","slug":"asked-for-currentvaluelength-got-i","errorCode":null,"errorMessage":"Asked for {currentValueLength} Got: {i}","messagePattern":"Asked for (.+?) Got: (.+?)","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/IFile.java","lineNumber":444,"sourceCode":"      }\n      int i = readData(keyBytes, 0, currentKeyLength);\n      if (i != currentKeyLength) {\n        throw new IOException (\"Asked for \" + currentKeyLength + \" Got: \" + i);\n      }\n      key.reset(keyBytes, currentKeyLength);\n      bytesRead += currentKeyLength;\n      return true;\n    }\n    \n    public void nextRawValue(DataInputBuffer value) throws IOException {\n      final int targetSize = currentValueLength << 1;\n\n      final byte[] valBytes = (value.getData().length < currentValueLength)\n        ? new byte[targetSize < 0 ? ARRAY_MAX_SIZE : targetSize]\n        : value.getData();\n      int i = readData(valBytes, 0, currentValueLength);\n      if (i != currentValueLength) {\n        throw new IOException (\"Asked for \" + currentValueLength + \" Got: \" + i);\n      }\n      value.reset(valBytes, currentValueLength);\n      \n      // Record the bytes read\n      bytesRead += currentValueLength;\n\n      ++recNo;\n      ++numRecordsRead;\n    }\n    \n    public void close() throws IOException {\n      // Close the underlying stream\n      in.close();\n      \n      // Release the buffer\n      dataIn = null;\n      buffer = null;\n      if(readRecordsCounter != null) {","sourceCodeStart":426,"sourceCodeEnd":462,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/IFile.java#L426-L462","documentation":"Error \"Asked for {currentValueLength} Got: {i}\" thrown in apache/hadoop.","triggerScenarios":"Thrown at hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/IFile.java:444 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["The IFile value record length mismatches what was requested; retry the task and verify no concurrent modification or corruption of spill files occurred."],"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"}