apache/flink · error · IOException

Unrecognized version or corrupt state: %s

Error message

Unrecognized version or corrupt state: %s

What it means

Error "Unrecognized version or corrupt state: %s" thrown in apache/flink.

Source

Thrown at flink-formats/flink-hadoop-bulk/src/main/java/org/apache/flink/formats/hadoop/bulk/HadoopPathBasedPartFileWriter.java:209

            bb.putInt(pathBytes.length);
            bb.put(pathBytes);
            bb.putInt(inProgressBytes.length);
            bb.put(inProgressBytes);
            bb.putLong(hadoopRecoverable.getSize());

            return targetBytes;
        }

        @Override
        public HadoopPathBasedPendingFileRecoverable deserialize(int version, byte[] serialized)
                throws IOException {
            switch (version) {
                case 1:
                    return deserializeV1(serialized);
                case 2:
                    return deserializeV2(serialized);
                default:
                    throw new IOException("Unrecognized version or corrupt state: " + version);
            }
        }

        private HadoopPathBasedPendingFileRecoverable deserializeV1(byte[] serialized)
                throws IOException {
            final ByteBuffer bb = ByteBuffer.wrap(serialized).order(ByteOrder.LITTLE_ENDIAN);

            if (bb.getInt() != MAGIC_NUMBER) {
                throw new IOException("Corrupt data: Unexpected magic number.");
            }

            byte[] targetFilePathBytes = new byte[bb.getInt()];
            bb.get(targetFilePathBytes);
            String targetFilePath = new String(targetFilePathBytes, CHARSET);

            byte[] tempFilePathBytes = new byte[bb.getInt()];
            bb.get(tempFilePathBytes);
            String tempFilePath = new String(tempFilePathBytes, CHARSET);

View on GitHub (pinned to 2f3c205e92)

Solutions

  1. Address the cause reported by the error message: Unrecognized version or corrupt state: the reported value
  2. Verify the inputs, configuration values, and classpath/dependency setup related to this operation, then retry.

Example fix

Correct the condition described ("Unrecognized version or corrupt state: the reported value") and rerun the job or command.

When it happens

Trigger: Triggered at runtime when the operation fails because: Unrecognized version or corrupt state: the reported value.

Common situations: Commonly caused by misconfiguration, missing dependencies or files, unsupported types or operations, or invalid user input leading to: Unrecognized version or corrupt state: the reported value.


AI-assisted analysis of apache/flink@2f3c205e92 (2026-08-14). Data as JSON: /api/errors/c57e528c2265d01f. Report an issue: GitHub.