apache/seatunnel · warning
enable_file_split=true but file_format_type={} does not supp
Error message
enable_file_split=true but file_format_type={} does not support file split. Falling back to non-splitting mode. What it means
WARN logged by FileSplitStrategyFactory.initFileSplitStrategy when the user enabled file splitting (enable_file_split=true) but the chosen file_format_type's FileFormat does not support splitting. The factory silently degrades to DefaultFileSplitStrategy (whole-file reads), so the job runs but without the requested parallel per-file splitting.
Source
Thrown at seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/split/FileSplitStrategyFactory.java:44
import org.apache.seatunnel.connectors.seatunnel.file.exception.FileConnectorErrorCode;
import lombok.extern.slf4j.Slf4j;
import java.util.Objects;
import static org.apache.seatunnel.connectors.seatunnel.file.config.FileBaseSourceOptions.DEFAULT_ROW_DELIMITER;
@Slf4j
public class FileSplitStrategyFactory {
public static FileSplitStrategy initFileSplitStrategy(
ReadonlyConfig readonlyConfig, HadoopConf hadoopConf) {
if (!readonlyConfig.get(FileBaseSourceOptions.ENABLE_FILE_SPLIT)) {
return new DefaultFileSplitStrategy();
}
FileFormat fileFormat = readonlyConfig.get(FileBaseSourceOptions.FILE_FORMAT_TYPE);
if (!fileFormat.supportFileSplit()) {
log.warn(
"enable_file_split=true but file_format_type={} does not support file split. "
+ "Falling back to non-splitting mode.",
fileFormat);
return new DefaultFileSplitStrategy();
}
CompressFormat compressCodec = readonlyConfig.get(FileBaseSourceOptions.COMPRESS_CODEC);
ArchiveCompressFormat archiveCompressCodec =
readonlyConfig.get(FileBaseSourceOptions.ARCHIVE_COMPRESS_CODEC);
if (compressCodec != CompressFormat.NONE
|| archiveCompressCodec != ArchiveCompressFormat.NONE) {
log.warn(
"enable_file_split=true but compress_codec={} or archive_compress_codec={} is not NONE. "
+ "Falling back to non-splitting mode.",
compressCodec,
archiveCompressCodec);
return new DefaultFileSplitStrategy();
}
View on GitHub (pinned to cf67b549a7)
Solutions
- Set file_format_type to a split-supporting format (e.g. Parquet, ORC) if you need split-based parallelism.
- Otherwise accept the fallback — remove enable_file_split=true from config to make intent explicit and silence the warning.
- Increase source parallelism via other means (more files/partitions) if whole-file mode is required.
Example fix
// before enable_file_split = true file_format_type = "csv" // after (either disable the option...) file_format_type = "csv" // ...or use a splittable format enable_file_split = true file_format_type = "parquet"
Defensive patterns
Strategy: validation
Validate before calling
// Before enabling split mode, check format support
FileFormat fmt = ReadonlyConfig get FILE_FORMAT_TYPE;
if (enableFileSplit && !fmt.supportFileSplit()) {
throw new IllegalArgumentException(
"file_format_type=" + fmt + " does not support file split");
} Type guard
// Java-style check
if (fileFormat instanceof SplittableFileFormat) { /* safe to enable split */ } Prevention
- Only set enable_file_split=true for splittable formats (Parquet, ORC).
- Validate file_format_type against format capabilities before deploying configs.
- Remove enable_file_split=true when using text/CSV to keep configs intention-revealing.
When it happens
Trigger: Config with enable_file_split=true and a FILE_FORMAT_TYPE whose format reports supportFileSplit()==false — e.g. CSV/text formats (or other formats lacking splittable readers) rather than splittable columnar formats.
Common situations: User expects text/CSV files to be split for parallelism; enabling the option while reading formats that only support whole-file reads; copying an option set from a Parquet/ORC job to a CSV job.
Understand the failure class
Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.
Related errors
- enable_file_split=true but compress_codec={} or archive_comp
- File format 'pdf' does not support writing.
- Fallback content comparison failed, fallback to COPY. source
- File checksum is not available, fallback to content comparis
- prepare method is not supported
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/787f15c15f689b31.
Report an issue: GitHub.