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
- Set compress to gzip, lzo, or none for text sinks (per docs)
- Verify supported compress values in the file sink documentation
- Use archive compress if you need the file delivered compressed in another way
- 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
- Use only text-documented compress codecs
- Confirm compression took effect by checking output file names/extensions
- Validate configs with a small local run first
- Cover every CompressFormat branch in TextWriteStrategy tests
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
- CanalJson file does not support this compress type: {}
- Csv file does not support this compress type: {}
- DebeziumJson file does not support this compress type: {}
- Json file does not support this compress type: {}
- MaxWellJson file does not support this compress type: {}
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/ae63c03e809ed7e5.
Report an issue: GitHub.