{"record":{"id":"0ae8b1bee74f5019","repo":"apache/seatunnel","slug":"enable-file-split-true-but-compress-codec-or-ar","errorCode":null,"errorMessage":"enable_file_split=true but compress_codec={} or archive_compress_codec={} is not NONE. Falling back to non-splitting mode.","messagePattern":"enable_file_split=true but compress_codec=(.+?) or archive_compress_codec=(.+?) is not NONE\\. Falling back to non-splitting mode\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/split/FileSplitStrategyFactory.java","lineNumber":55,"sourceCode":"    public static FileSplitStrategy initFileSplitStrategy(\n            ReadonlyConfig readonlyConfig, HadoopConf hadoopConf) {\n        if (!readonlyConfig.get(FileBaseSourceOptions.ENABLE_FILE_SPLIT)) {\n            return new DefaultFileSplitStrategy();\n        }\n        FileFormat fileFormat = readonlyConfig.get(FileBaseSourceOptions.FILE_FORMAT_TYPE);\n        if (!fileFormat.supportFileSplit()) {\n            log.warn(\n                    \"enable_file_split=true but file_format_type={} does not support file split. \"\n                            + \"Falling back to non-splitting mode.\",\n                    fileFormat);\n            return new DefaultFileSplitStrategy();\n        }\n        CompressFormat compressCodec = readonlyConfig.get(FileBaseSourceOptions.COMPRESS_CODEC);\n        ArchiveCompressFormat archiveCompressCodec =\n                readonlyConfig.get(FileBaseSourceOptions.ARCHIVE_COMPRESS_CODEC);\n        if (compressCodec != CompressFormat.NONE\n                || archiveCompressCodec != ArchiveCompressFormat.NONE) {\n            log.warn(\n                    \"enable_file_split=true but compress_codec={} or archive_compress_codec={} is not NONE. \"\n                            + \"Falling back to non-splitting mode.\",\n                    compressCodec,\n                    archiveCompressCodec);\n            return new DefaultFileSplitStrategy();\n        }\n\n        Objects.requireNonNull(\n                hadoopConf, \"hadoopConf must not be null when file split is enabled\");\n\n        long fileSplitSize = readonlyConfig.get(FileBaseSourceOptions.FILE_SPLIT_SIZE);\n        if (fileSplitSize <= 0) {\n            throw new SeaTunnelRuntimeException(\n                    FileConnectorErrorCode.FILE_SPLIT_SIZE_ILLEGAL,\n                    String.format(\n                            \"file_split_size must be greater than 0 when enable_file_split=true, but got: %d\",\n                            fileSplitSize));\n        }","sourceCodeStart":37,"sourceCodeEnd":73,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/split/FileSplitStrategyFactory.java#L37-L73","documentation":"WARN logged by FileSplitStrategyFactory.initFileSplitStrategy when enable_file_split=true but the configured compress_codec or archive_compress_codec is not NONE. Splitting is unsafe on compressed/archived data (split boundaries would corrupt decoding), so the factory falls back to DefaultFileSplitStrategy (whole-file reads).","triggerScenarios":"Config combining enable_file_split=true with compress_codec values like GZIP/LZO/etc., or archive_compress_codec values like ZIP/TAR/GZIP — any non-NONE combination triggers the fallback.","commonSituations":"Reading gzip-compressed text files with splitting enabled; reading zipped/tarred archives while expecting split parallelism; leftover compress settings from a previous config.","solutions":["Set compress_codec=NONE and archive_compress_codec=NONE if you want file splitting.","If compression is required, accept the fallback and remove enable_file_split=true for clarity.","Pre-decompress/archive-extract data into splittable uncompressed files before ingestion if parallelism is critical.","Use natively splittable compression (e.g. bzip2 with formats that support it, or columnar formats with internal block compression like Parquet+snappy) instead of whole-file codecs."],"exampleFix":"// before\nenable_file_split = true\ncompress_codec = \"gzip\"\n// after\nenable_file_split = true\ncompress_codec = \"none\"\narchive_compress_codec = \"none\"","handlingStrategy":"validation","validationCode":"// Reject conflicting combination before submission\nif (enableFileSplit\n    && (compressCodec != CompressFormat.NONE\n        || archiveCompressCodec != ArchiveCompressFormat.NONE)) {\n    throw new IllegalArgumentException(\n        \"file split requires compress_codec=NONE and archive_compress_codec=NONE\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Treat enable_file_split, compress_codec, archive_compress_codec as mutually exclusive knobs.","Uncompress archives before ingestion if split-based parallelism is needed.","Prefer columnar formats with internal compression (Parquet+snappy) when both splitting and compression are required."],"tags":["configuration","file","compression","split","conflicting-options","log-warning"],"backgroundTag":"conflicting-config-options","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}