apache/seatunnel · warning

Text file does not support this compress type: {}

Error message

Text file does not support this compress type: {}

What it means

This warning is emitted by TextWriteStrategy.getOrCreateOutputStream when the configured compress format is not one of the branches handled for plain-text output. The strategy falls back to writing an uncompressed stream (still writing the configured header), so the compression setting is ignored.

Source

Thrown at seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/sink/writer/TextWriteStrategy.java:163

    public FSDataOutputStream getOrCreateOutputStream(@NonNull String filePath) {
        FSDataOutputStream fsDataOutputStream = beingWrittenOutputStream.get(filePath);
        if (fsDataOutputStream == null) {
            try {
                switch (compressFormat) {
                    case LZO:
                        LzopCodec lzo = new LzopCodec();
                        OutputStream out =
                                lzo.createOutputStream(
                                        hadoopFileSystemProxy.getOutputStream(filePath));
                        fsDataOutputStream = new FSDataOutputStream(out, null);
                        enableWriteHeader(fsDataOutputStream);
                        break;
                    case NONE:
                        fsDataOutputStream = hadoopFileSystemProxy.getOutputStream(filePath);
                        enableWriteHeader(fsDataOutputStream);
                        break;
                    default:
                        log.warn(
                                "Text file does not support this compress type: {}",
                                compressFormat.getCompressCodec());
                        fsDataOutputStream = hadoopFileSystemProxy.getOutputStream(filePath);
                        enableWriteHeader(fsDataOutputStream);
                        break;
                }
                beingWrittenOutputStream.put(filePath, fsDataOutputStream);
                isFirstWrite.put(filePath, true);
            } catch (IOException e) {
                throw CommonError.fileOperationFailed("TextFile", "open", filePath, e);
            }
        }
        return fsDataOutputStream;
    }

    private void enableWriteHeader(FSDataOutputStream fsDataOutputStream) throws IOException {
        if (enableHeaderWriter) {
            fsDataOutputStream.write(

View on GitHub (pinned to cf67b549a7)

Solutions

  1. Set compress to gzip, lzo, or none for text sinks (per docs)
  2. Verify supported compress values in the file sink documentation
  3. Use archive compress if you need the file delivered compressed in another way
  4. Extend TextWriteStrategy.getOrCreateOutputStream with the codec if it must be supported

Example fix

// before
sink = {
  file_format = "text"
  compress = "snappy"
}
// after
sink = {
  file_format = "text"
  compress = "gzip"
}
Defensive patterns

Strategy: validation

Validate before calling

Set<String> supported = Set.of("none", "lzo", "gzip");
if (!supported.contains(compressValue.toLowerCase())) {
    throw new IllegalArgumentException("text sink supports compress " + supported + ", got: " + compressValue);
}

Prevention

When it happens

Trigger: file_format=text sink with a compress option whose codec has no case in the switch (e.g. ZSTD, BROTLI, SNAPPY); logged when the first record causes stream creation.

Common situations: Copying compress configs from ORC/Parquet jobs; expecting snappy text output; upstream CompressFormat additions missing from TextWriteStrategy.

Related errors


AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10). Data as JSON: /api/errors/ae63c03e809ed7e5. Report an issue: GitHub.