apache/flink · error · IOException

Unrecognized version or corrupt state: {}

Error message

Unrecognized version or corrupt state: {}

What it means

Error "Unrecognized version or corrupt state: {}" thrown in apache/flink.

Source

Thrown at flink-filesystems/flink-s3-fs-base/src/main/java/org/apache/flink/fs/s3/common/writer/S3RecoverableSerializer.java:122

        if (lastPartBytes == null) {
            bb.putInt(0);
        } else {
            bb.putInt(lastPartBytes.length);
            bb.put(lastPartBytes);
        }

        bb.putLong(obj.incompleteObjectLength());

        return targetBytes;
    }

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

    private static S3Recoverable 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.");
        }

        final byte[] keyBytes = new byte[bb.getInt()];
        bb.get(keyBytes);

        final byte[] uploadIdBytes = new byte[bb.getInt()];
        bb.get(uploadIdBytes);

        final int numParts = bb.getInt();
        final ArrayList<PartETag> parts = new ArrayList<>(numParts);

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/a607b37107fe7415. Report an issue: GitHub.