apache/flink · error · IllegalArgumentException

PostScript too large at {}

Error message

PostScript too large at {}

What it means

Error "PostScript too large at {}" thrown in apache/flink.

Source

Thrown at flink-formats/flink-orc/src/main/java/org/apache/flink/orc/writer/PhysicalWriterImpl.java:217

        long startPosition = out.getPos();
        OrcProto.Footer footer = builder.build();
        writeFileFooter(footer);
        this.footerLength = (int) (out.getPos() - startPosition);
    }

    @Override
    public long writePostScript(OrcProto.PostScript.Builder builder) throws IOException {
        builder.setFooterLength(footerLength);
        builder.setMetadataLength(metadataLength);

        OrcProto.PostScript ps = builder.build();
        // need to write this uncompressed
        long startPosition = out.getPos();
        ps.writeTo(out);
        long length = out.getPos() - startPosition;

        if (length > 255) {
            throw new IllegalArgumentException("PostScript too large at " + length);
        }

        out.write((int) length);
        return out.getPos();
    }

    @Override
    public void close() {
        // Just release the codec but don't close the internal stream here to avoid
        // Stream Closed or ClosedChannelException when Flink performs checkpoint.
        OrcCodecPool.returnCodec(compress, codec);
        codec = null;
    }

    @Override
    public void flush() throws IOException {
        out.flush();
    }

View on GitHub (pinned to 2f3c205e92)

Solutions

  1. Address the cause reported by the error message: PostScript too large at 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 ("PostScript too large at the reported value") and rerun the job or command.

When it happens

Trigger: Triggered at runtime when the operation fails because: PostScript too large at the reported value.

Common situations: Commonly caused by misconfiguration, missing dependencies or files, unsupported types or operations, or invalid user input leading to: PostScript too large at the reported value.


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