{"record":{"id":"3dfbb42a50aeaba5","repo":"apache/hadoop","slug":"asked-for-got","errorCode":null,"errorMessage":"Asked for {} Got: {}","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":429,"sourceCode":"      }\n      if (currentValueLength < 0) {\n        throw new IOException(\"Rec# \" + recNo + \": Negative value-length: \" + \n                              currentValueLength);\n      }\n            \n      return true;\n    }\n    \n    public boolean nextRawKey(DataInputBuffer key) throws IOException {\n      if (!positionToNextRecord(dataIn)) {\n        return false;\n      }\n      if (keyBytes.length < currentKeyLength) {\n        keyBytes = new byte[currentKeyLength << 1];\n      }\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      ","sourceCodeStart":411,"sourceCodeEnd":447,"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#L411-L447","documentation":"Error \"Asked for {} Got: {}\" 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:429 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["The IFile data read does not match the expected length; treat the spill as corrupt, retry the task, and check for disk corruption or mixed-version writes."],"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"}