apache/seatunnel · error · SeaTunnelRuntimeException

FILE_SPLIT_FAIL

FILE_SPLIT_FAIL

Error message

rowDelimiter must not be empty

What it means

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.

Source

Thrown at seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/split/AccordingToSplitSizeSplitStrategy.java:73

    private final long skipHeaderRowNumber;
    private final long splitSize;
    private final byte[] delimiterBytes;

    public AccordingToSplitSizeSplitStrategy(
            HadoopConf hadoopConf,
            String rowDelimiter,
            long skipHeaderRowNumber,
            String encodingName,
            long splitSize) {
        if (splitSize <= 0) {
            throw new SeaTunnelRuntimeException(
                    FileConnectorErrorCode.FILE_SPLIT_SIZE_ILLEGAL,
                    String.format(
                            "file_split_size must be greater than 0 when enable_file_split=true, but got: %d",
                            splitSize));
        }
        if (rowDelimiter == null || rowDelimiter.isEmpty()) {
            throw new SeaTunnelRuntimeException(
                    FileConnectorErrorCode.FILE_SPLIT_FAIL, "rowDelimiter must not be empty");
        }
        this.hadoopFileSystemProxy = new HadoopFileSystemProxy(hadoopConf);
        this.skipHeaderRowNumber = skipHeaderRowNumber;
        this.splitSize = splitSize;
        this.delimiterBytes = rowDelimiter.getBytes(Charset.forName(encodingName));
        if (delimiterBytes.length == 0) {
            throw new SeaTunnelRuntimeException(
                    FileConnectorErrorCode.FILE_SPLIT_FAIL,
                    "rowDelimiter must not be empty after encoding");
        }
    }

    @Override
    public List<FileSourceSplit> split(String tableId, String filePath) {
        String normalizedPath = normalizePath(filePath);
        List<FileSourceSplit> splits = new ArrayList<>();
        long fileSize = safeGetFileSize(normalizedPath);

View on GitHub (pinned to cf67b549a7)

Solutions

  1. Set row_delimiter explicitly, e.g. row_delimiter = "\n".
  2. Rely on the default row delimiter instead of overriding it with an empty value.
  3. Check that the config value isn't stripped to empty by HOCON parsing/quoting.

Example fix

// before
row_delimiter = ""
// after
row_delimiter = "\n"
Defensive patterns

Strategy: validation

Validate before calling

String rd = config.hasPath("row_delimiter") ? config.getString("row_delimiter") : "\n";
if (rd == null || rd.isEmpty()) throw new IllegalArgumentException("row_delimiter must not be empty");

Prevention

When it happens

Trigger: Constructing AccordingToSplitSizeSplitStrategy with rowDelimiter == null or "" — e.g. field_delimiter/row delimiter option absent or resolved to empty string.

Common situations: Text file source with enable_file_split=true but no row_delimiter configured; config value read as empty string due to quoting mistakes.

Understand the failure class

Background: "must not be empty", "cannot be empty" — required-field validation errors across open-source libraries — this error's family across 41 libraries.

Related errors


AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10). Data as JSON: /api/errors/40ccf5bf5c7bee9c. Report an issue: GitHub.