apache/seatunnel · warning

Kudu client executor did not terminate gracefully, forcing…

Error message

Kudu client executor did not terminate gracefully, forcing shutdown.

What it means

WARN logged by KuduClientResource.awaitExecutorTermination during close when the client's executor does not finish within the graceful shutdown timeout; shutdownNow() is invoked to force termination before checking again.

Solutions

  1. Investigate why Kudu operations were slow at shutdown (server load, network)
  2. Check the following 'did not terminate after forced shutdown' warnings for stubborn threads
  3. Increase GRACEFUL_SHUTDOWN_TIMEOUT_SECONDS if legitimate work needs more time
  4. Ensure sources/sinks release scanners and sessions promptly on close
Defensive patterns

Strategy: retry

Validate before calling

// Confirm Kudu cluster responsiveness before task close/shutdown
client.listTabletServers(); // slow response predicts slow executor drain

Try / catch

try {
    if (!executor.awaitTermination(GRACE_SECONDS, TimeUnit.SECONDS)) {
        executor.shutdownNow();
        if (!executor.awaitTermination(FORCED_SECONDS, TimeUnit.SECONDS)) {
            LOG.warn("Executor did not terminate after forced shutdown");
        }
    }
} catch (InterruptedException ie) {
    executor.shutdownNow();
    Thread.currentThread().interrupt();
}

Prevention

When it happens

Trigger: close() calls awaitExecutorTermination; executorService.awaitTermination(GRACEFUL_SHUTDOWN_TIMEOUT_SECONDS) returns false because in-flight Kudu RPC/callback tasks are still running or blocked.

Common situations: Slow Kudu servers keeping RPCs pending at shutdown; jobs stopped while scans are mid-flight; blocked executor threads (network stalls, DNS); too-short graceful timeout for large result-set processing.

Related errors


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

Appendix: source

Thrown at seatunnel-connectors-v2/connector-kudu/src/main/java/org/apache/seatunnel/connectors/seatunnel/kudu/kuduclient/KuduClientResource.java:70

    @Override
    public void close() throws KuduException {
        try {
            kuduClient.close();
        } finally {
            awaitExecutorTermination();
        }
    }

    private void awaitExecutorTermination() {
        executorService.shutdown();
        try {
            if (executorService.awaitTermination(
                    GRACEFUL_SHUTDOWN_TIMEOUT_SECONDS, TimeUnit.SECONDS)) {
                return;
            }

            log.warn("Kudu client executor did not terminate gracefully, forcing shutdown.");
            executorService.shutdownNow();
            if (!executorService.awaitTermination(
                    FORCED_SHUTDOWN_TIMEOUT_SECONDS, TimeUnit.SECONDS)) {
                log.warn("Kudu client executor did not terminate after forced shutdown.");
            }
        } catch (InterruptedException e) {
            executorService.shutdownNow();
            Thread.currentThread().interrupt();
            log.warn("Interrupted while waiting for Kudu client executor to terminate.", e);
        }
    }
}

View on GitHub (pinned to cf67b549a7)