apache/seatunnel · error · ElasticsearchConnectorException

OPERATION_NOT_SUPPORTED

OPERATION_NOT_SUPPORTED

Error message

Unsupported handleSplitRequest: 

What it means

ElasticsearchSourceSplitEnumerator does not support readers requesting splits (it pushes splits proactively in assignSplits). Any call to handleSplitRequest throws ElasticsearchConnectorException with OPERATION_NOT_SUPPORTED, including the requesting subtask id.

Source

Thrown at seatunnel-connectors-v2/connector-elasticsearch/src/main/java/org/apache/seatunnel/connectors/seatunnel/elasticsearch/source/ElasticsearchSourceSplitEnumerator.java:204

        esRestClient.close();
    }

    @Override
    public void addSplitsBack(List<ElasticsearchSourceSplit> splits, int subtaskId) {
        if (!splits.isEmpty()) {
            addPendingSplit(splits, subtaskId);
            assignSplit(Collections.singletonList(subtaskId));
        }
    }

    @Override
    public int currentUnassignedSplitSize() {
        return pendingSplit.size();
    }

    @Override
    public void handleSplitRequest(int subtaskId) {
        throw new ElasticsearchConnectorException(
                CommonErrorCode.OPERATION_NOT_SUPPORTED,
                "Unsupported handleSplitRequest: " + subtaskId);
    }

    @Override
    public void registerReader(int subtaskId) {
        log.debug("Register reader {} to ElasticsearchSourceSplitEnumerator.", subtaskId);
        if (!pendingSplit.isEmpty()) {
            assignSplit(Collections.singletonList(subtaskId));
        }
    }

    @Override
    public ElasticsearchSourceState snapshotState(long checkpointId) throws Exception {
        synchronized (stateLock) {
            return new ElasticsearchSourceState(shouldEnumerate, pendingSplit);
        }
    }

View on GitHub (pinned to cf67b549a7)

Solutions

  1. Do not call handleSplitRequest on the ES enumerator; rely on its proactive split assignment
  2. Align engine and connector versions so the expected enumeration protocol matches
  3. For custom readers, use registerReader + the push-based split flow instead

Example fix

// before
enumerator.handleSplitRequest(subtaskId);
// after
enumerator.registerReader(subtaskId); // splits are pushed proactively by the enumerator
Defensive patterns

Strategy: validation

Prevention

When it happens

Trigger: A SourceReader (or engine framework) calls handleSplitRequest(subtaskId) on the ES split enumerator — usually when the engine is configured for request-based split assignment or a reader incorrectly requests a split after startup.

Common situations: Engine/connector protocol mismatch where the runtime expects request-driven enumeration; custom source readers built against a request-response enumeration contract.

Related errors


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