{"record":{"id":"40ccf5bf5c7bee9c","repo":"apache/seatunnel","slug":"file-split-fail","errorCode":"FILE_SPLIT_FAIL","errorMessage":"rowDelimiter must not be empty","messagePattern":"rowDelimiter must not be empty","errorType":"validation","errorClass":"SeaTunnelRuntimeException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/split/AccordingToSplitSizeSplitStrategy.java","lineNumber":73,"sourceCode":"    private final long skipHeaderRowNumber;\n    private final long splitSize;\n    private final byte[] delimiterBytes;\n\n    public AccordingToSplitSizeSplitStrategy(\n            HadoopConf hadoopConf,\n            String rowDelimiter,\n            long skipHeaderRowNumber,\n            String encodingName,\n            long splitSize) {\n        if (splitSize <= 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                            splitSize));\n        }\n        if (rowDelimiter == null || rowDelimiter.isEmpty()) {\n            throw new SeaTunnelRuntimeException(\n                    FileConnectorErrorCode.FILE_SPLIT_FAIL, \"rowDelimiter must not be empty\");\n        }\n        this.hadoopFileSystemProxy = new HadoopFileSystemProxy(hadoopConf);\n        this.skipHeaderRowNumber = skipHeaderRowNumber;\n        this.splitSize = splitSize;\n        this.delimiterBytes = rowDelimiter.getBytes(Charset.forName(encodingName));\n        if (delimiterBytes.length == 0) {\n            throw new SeaTunnelRuntimeException(\n                    FileConnectorErrorCode.FILE_SPLIT_FAIL,\n                    \"rowDelimiter must not be empty after encoding\");\n        }\n    }\n\n    @Override\n    public List<FileSourceSplit> split(String tableId, String filePath) {\n        String normalizedPath = normalizePath(filePath);\n        List<FileSourceSplit> splits = new ArrayList<>();\n        long fileSize = safeGetFileSize(normalizedPath);","sourceCodeStart":55,"sourceCodeEnd":91,"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/AccordingToSplitSizeSplitStrategy.java#L55-L91","documentation":"Validation error thrown by the AccordingToSplitSizeSplitStrategy constructor when the configured row delimiter string is empty and cannot be used to delimit text-file splits. It guards split computation before any file is read.","triggerScenarios":"Constructing AccordingToSplitSizeSplitStrategy with rowDelimiter == null or \"\" — e.g. field_delimiter/row delimiter option absent or resolved to empty string.","commonSituations":"Text file source with enable_file_split=true but no row_delimiter configured; config value read as empty string due to quoting mistakes.","solutions":["Set row_delimiter explicitly, e.g. row_delimiter = \"\\n\".","Rely on the default row delimiter instead of overriding it with an empty value.","Check that the config value isn't stripped to empty by HOCON parsing/quoting."],"exampleFix":"// before\nrow_delimiter = \"\"\n// after\nrow_delimiter = \"\\n\"","handlingStrategy":"validation","validationCode":"String rd = config.hasPath(\"row_delimiter\") ? config.getString(\"row_delimiter\") : \"\\n\";\nif (rd == null || rd.isEmpty()) throw new IllegalArgumentException(\"row_delimiter must not be empty\");","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always set row_delimiter explicitly when enable_file_split=true.","Watch for empty-string defaults from config templating.","Escape delimiters (\\n) correctly in HOCON."],"tags":["file-connector","split","delimiter","config-validation"],"backgroundTag":"empty-required-field","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}