apache/seatunnel · error · FileConnectorException

FILE_READ_STRATEGY_NOT_SUPPORT

FILE_READ_STRATEGY_NOT_SUPPORT

Error message

Cannot found the read strategy for this table: [${tableId}]

What it means

Each FileSourceSplit is read by a per-table ReadStrategy chosen from readStrategyMap, keyed by table id. If a split arrives whose table has no registered strategy (i.e. the strategy was never created for that table during reader initialization), pollNext throws FileConnectorException with code FILE_READ_STRATEGY_NOT_SUPPORT rather than silently skipping data.

Source

Thrown at seatunnel-connectors-v2/connector-hive/src/main/java/org/apache/seatunnel/connectors/seatunnel/hive/source/reader/MultipleTableHiveSourceReader.java:76

                        .collect(
                                Collectors.toMap(
                                        localFileSourceConfig ->
                                                localFileSourceConfig
                                                        .getCatalogTable()
                                                        .getTableId()
                                                        .toTablePath()
                                                        .toString(),
                                        HiveSourceConfig::getReadStrategy));
    }

    @Override
    public void pollNext(Collector<SeaTunnelRow> output) {
        synchronized (output.getCheckpointLock()) {
            FileSourceSplit split = sourceSplits.poll();
            if (null != split) {
                ReadStrategy readStrategy = readStrategyMap.get(split.getTableId());
                if (readStrategy == null) {
                    throw new FileConnectorException(
                            FILE_READ_STRATEGY_NOT_SUPPORT,
                            "Cannot found the read strategy for this table: ["
                                    + split.getTableId()
                                    + "]");
                }
                try {
                    readStrategy.read(split.getFilePath(), split.getTableId(), output);
                } catch (Exception e) {
                    String errorMsg =
                            String.format(
                                    "Read data failed, tableId=[%s], file=[%s], splitId=[%s]",
                                    split.getTableId(), split.getFilePath(), split.splitId());
                    throw new FileConnectorException(FILE_READ_FAILED, errorMsg, e);
                }
            } else if (noMoreSplit && sourceSplits.isEmpty()) {
                // signal to the source that we have reached the end of the data.
                log.info(
                        "There is no more element for the bounded MultipleTableLocalFileSourceReader");

View on GitHub (pinned to cf67b549a7)

Solutions

  1. Rebuild/restart the job so reader initialization and split enumeration cover the same table set
  2. Ensure every configured table's format maps to a supported ReadStrategy (parquet/orc/text/csv) before submitting
  3. If restoring from a checkpoint/snapshot state, discard incompatible state and start a fresh run
Defensive patterns

Strategy: try-catch

Try / catch

try {
    reader.pollNext(output);
} catch (FileConnectorException e) {
    if (e.getSeaTunnelErrorCode() == FileConnectorErrorCode.FILE_READ_STRATEGY_NOT_SUPPORT) {
        // table/split set mismatch: restart with consistent table list, drop stale checkpoint
    }
}

Prevention

When it happens

Trigger: MultipleTableHiveSourceReader.pollNext polls a FileSourceSplit whose split.getTableId() is absent from readStrategyMap — typically a split produced for a table that the reader never initialized a strategy for (e.g. table list changed after split enumeration/restore, or strategy registration skipped a table).

Common situations: Checkpoint restore where the expanded table set differs from the original job; split enumerator produced splits for tables pruned from the config; race/state bug after failover; manually crafted multi-table configs where an entry lacks a matching read strategy (format mismatch).

Understand the failure class

Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.

Related errors


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