apache/seatunnel · warning

Text file does not support this compress type

Error message

Text file does not support this compress type: {}

What it means

TextReadStrategy.readProcess encountered a CompressFormat that the plain-text reader cannot wrap a decompressing stream around. The switch over compress format has cases for the supported codecs (e.g. GZIP, LZO, NONE) and falls into the default branch for anything else. It logs this warning, falls back to reading the raw (still-compressed) bytes, and continues, which means the parsed rows are almost certainly garbage.

Solutions

  1. Change the job config so the text-format source uses a supported compress codec (NONE/GZIP/LZO) or remove the compress option
  2. Verify the actual file compression matches the configured codec; recompress or decompress the file to a supported format
  3. If the codec genuinely must be supported, add a case in the switch in TextReadStrategy.readProcess that wraps the input stream with the appropriate decompressor

Example fix

// before (config)
source {
  LocalFile {
    format = text
    compress = snappy
  }
}
// after
source {
  LocalFile {
    format = text
    compress = none
  }
}
Defensive patterns

Strategy: validation

Validate before calling

// Before submitting the job, check the compress codec against text-supported values
java.util.Set<String> supported = new java.util.HashSet<>(
        java.util.Arrays.asList("NONE", "GZIP", "LZO"));
if (!supported.contains(compressFormat.name())) {
    throw new IllegalArgumentException(
            "format=text does not support compress codec: " + compressFormat.name());
}

Prevention

When it happens

Trigger: Assigning a file source a compress codec that TextReadStrategy has no case for, e.g. a compress format enum value added for other readers (ORC/Parquet-only codecs like SNAPPY variants) but mapped onto a text file, or a newly introduced CompressFormat not yet handled in the switch.

Common situations: Configuring format=text with compress codec options copied from a Parquet/ORC job; upgrading SeaTunnel where a new compress enum value exists but the text path was not updated; user setting compress=snappy on a .txt file expecting transparent snappy text decompression.

Related errors


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

Appendix: source

Thrown at seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/reader/TextReadStrategy.java:200

    @Override
    public void readProcess(
            FileSourceSplit split,
            Collector<SeaTunnelRow> output,
            InputStream inputStream,
            Map<String, String> partitionsMap,
            String currentFileName)
            throws IOException {
        InputStream actualInputStream;
        switch (compressFormat) {
            case LZO:
                LzopCodec lzo = new LzopCodec();
                actualInputStream = lzo.createInputStream(inputStream);
                break;
            case NONE:
                actualInputStream = inputStream;
                break;
            default:
                log.warn(
                        "Text file does not support this compress type: {}",
                        compressFormat.getCompressCodec());
                actualInputStream = inputStream;
                break;
        }
        // rebuild inputStream
        final boolean useSplitRead = enableSplitFile && split.getLength() > -1;
        if (useSplitRead) {
            actualInputStream = safeSlice(actualInputStream, split.getStart(), split.getLength());
        }
        try (BufferedReader reader = createBomAwareBufferedReader(actualInputStream, encoding)) {

            LineProcessor lineProcessor =
                    line -> {
                        try {
                            processLineData(line, split.getTableId(), output, partitionsMap);
                        } catch (FileConnectorException e) {
                            throw new IOException(e);

View on GitHub (pinned to cf67b549a7)