apache/seatunnel · error · IllegalArgumentException
Unsupported compression type: %s, supported: %s
Error message
Unsupported compression type: %s, supported: %s
What it means
EdgeSocketCompressionType.from() maps the configured compression value to its enum. Unrecognized values cause an IllegalArgumentException listing all supported compression types. It exists to reject invalid compression config before packets are (de)serialized.
Source
Thrown at seatunnel-connectors-v2/connector-edge-socket/src/main/java/org/apache/seatunnel/connectors/seatunnel/edgesocket/serialize/EdgeSocketCompressionType.java:61
* Resolve compression enum from config/packet value.
*
* @param value user configured or packet declared compression string
* @return matched compression type
*/
public static EdgeSocketCompressionType from(String value) {
Objects.requireNonNull(value, "compressionType must not be null");
String normalized = value.trim().toLowerCase(Locale.ROOT);
for (EdgeSocketCompressionType compressionType : values()) {
if (compressionType.getValue().equals(normalized)
|| compressionType.name().equalsIgnoreCase(normalized)) {
return compressionType;
}
}
String supported =
Arrays.stream(values())
.map(EdgeSocketCompressionType::getValue)
.collect(Collectors.joining(", "));
throw new IllegalArgumentException(
"Unsupported compression type: " + value + ", supported: " + supported);
}
}
View on GitHub (pinned to cf67b549a7)
Solutions
- Set the compression config option to one of the values listed in 'supported: ...' (e.g. none, gzip, zlib, deflate).
- Use 'none' (or blank) if you do not want compression.
- Trim whitespace and fix casing in the config value.
Example fix
// before compression = "zstd" // after compression = "gzip"
Defensive patterns
Strategy: validation
Validate before calling
Set<String> valid = Arrays.stream(EdgeSocketCompressionType.values()).map(EdgeSocketCompressionType::getValue).collect(Collectors.toSet());
if (compression != null && !valid.contains(compression.trim())) {
throw new IllegalArgumentException("compression must be one of " + valid);
} Prevention
- Use only codecs listed in the error's 'supported' list (none/gzip/zlib/deflate).
- Align compression settings with the peer before rollout.
- Trim config values and keep consistent casing.
When it happens
Trigger: EdgeSocketCompressionType.from(value) invoked with a compression string (e.g. 'gzip ' with trailing space, 'Gzip', 'lz4') that matches no enum value.
Common situations: Typos in the compression config option, assuming an unsupported codec like zstd or lz4 is available, or mixed-case values.
Understand the failure class
Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.
Related errors
- Unknown compression: ${value}
- Unknown format type:
- not support this type of bufferType: ${bufferType}
- COMMON_ILLEGAL_ARGUMENT
- Unsupported auth type: %s, supported: %s
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/a88a6899f6eda6e0.
Report an issue: GitHub.