apache/seatunnel · error · RuntimeException

error while loading data.

Error message

error while loading data.

What it means

checkLoadException rethrows an asynchronous load failure stored in the loadException field as a plain RuntimeException('error while loading data.'). Stream loads run async via pendingLoadFuture; failures captured by the async callback are surfaced at the next write() or timerFlush().

Solutions

  1. Inspect the cause (loadException) attached to the RuntimeException for the root error
  2. Check Doris BE/FE health and network reachability from the worker
  3. Review job logs for the original async failure message
  4. Retry the job from the last checkpoint; enable 2PC for exactly-once recovery
Defensive patterns

Strategy: try-catch

Try / catch

try { writer.write(row); } catch (RuntimeException e) { if ("error while loading data.".equals(e.getMessage()) && e.getCause() != null) { log.error("async load root cause", e.getCause()); } throw e; }

Prevention

When it happens

Trigger: The async stream load (DorisStreamLoad future) failed (network error, HTTP error, response parse failure), the callback recorded loadException, and the next call to write() or timerFlush() invokes checkLoadException().

Common situations: BE node down mid-load; HTTP timeouts under load; unexpected response body breaking RespContent parsing; label conflicts surfaced asynchronously.

Understand the failure class

Background: 'Something went wrong' / 'Request failed (500)' / 'HTTP error! status: 404' — what failed HTTP requests actually mean and how to find the real cause — this error's family across 28 libraries.

Related errors


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

Appendix: source

Thrown at seatunnel-connectors-v2/connector-doris/src/main/java/org/apache/seatunnel/connectors/doris/sink/writer/DorisSinkWriter.java:339

        // the load future is done and checked in prepareCommit().
        // this will check error while loading.
        String errorMsg;
        log.debug("start timer checker, interval {} ms", intervalTime);
        if ((errorMsg = dorisStreamLoad.getLoadFailedMsg()) != null) {
            log.error("stream load finished unexpectedly: {}", errorMsg);
            loadException =
                    new DorisConnectorException(
                            DorisConnectorErrorCode.STREAM_LOAD_FAILED, errorMsg);
            // Stop the scheduler to prevent repeated error logging when downstream is unavailable.
            // Once loadException is set, write() will throw on the next call via
            // checkLoadException().
            scheduledExecutorService.shutdownNow();
        }
    }

    private void checkLoadException() {
        if (loadException != null) {
            throw new RuntimeException("error while loading data.", loadException);
        }
    }

    @Override
    public void close() throws IOException {
        if (!dorisSinkConfig.getEnable2PC()) {
            flush();
        }
        if (scheduledExecutorService != null) {
            scheduledExecutorService.shutdownNow();
        }
        if (dorisStreamLoad != null) {
            dorisStreamLoad.close();
        }
        if (controlStreamLoad != null && controlStreamLoad != dorisStreamLoad) {
            controlStreamLoad.close();
        }
    }

View on GitHub (pinned to cf67b549a7)