{"record":{"id":"bffc69642bfb9edb","repo":"apache/seatunnel","slug":"file-read-strategy-not-support-bffc69","errorCode":"FILE_READ_STRATEGY_NOT_SUPPORT","errorMessage":"Cannot found the read strategy for this table: [${tableId}]","messagePattern":"Cannot found the read strategy for this table: \\[(.+?)\\]","errorType":"error_code","errorClass":"FileConnectorException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-hive/src/main/java/org/apache/seatunnel/connectors/seatunnel/hive/source/reader/MultipleTableHiveSourceReader.java","lineNumber":76,"sourceCode":"                        .collect(\n                                Collectors.toMap(\n                                        localFileSourceConfig ->\n                                                localFileSourceConfig\n                                                        .getCatalogTable()\n                                                        .getTableId()\n                                                        .toTablePath()\n                                                        .toString(),\n                                        HiveSourceConfig::getReadStrategy));\n    }\n\n    @Override\n    public void pollNext(Collector<SeaTunnelRow> output) {\n        synchronized (output.getCheckpointLock()) {\n            FileSourceSplit split = sourceSplits.poll();\n            if (null != split) {\n                ReadStrategy readStrategy = readStrategyMap.get(split.getTableId());\n                if (readStrategy == null) {\n                    throw new FileConnectorException(\n                            FILE_READ_STRATEGY_NOT_SUPPORT,\n                            \"Cannot found the read strategy for this table: [\"\n                                    + split.getTableId()\n                                    + \"]\");\n                }\n                try {\n                    readStrategy.read(split.getFilePath(), split.getTableId(), output);\n                } catch (Exception e) {\n                    String errorMsg =\n                            String.format(\n                                    \"Read data failed, tableId=[%s], file=[%s], splitId=[%s]\",\n                                    split.getTableId(), split.getFilePath(), split.splitId());\n                    throw new FileConnectorException(FILE_READ_FAILED, errorMsg, e);\n                }\n            } else if (noMoreSplit && sourceSplits.isEmpty()) {\n                // signal to the source that we have reached the end of the data.\n                log.info(\n                        \"There is no more element for the bounded MultipleTableLocalFileSourceReader\");","sourceCodeStart":58,"sourceCodeEnd":94,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-hive/src/main/java/org/apache/seatunnel/connectors/seatunnel/hive/source/reader/MultipleTableHiveSourceReader.java#L58-L94","documentation":"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.","triggerScenarios":"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).","commonSituations":"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).","solutions":["Rebuild/restart the job so reader initialization and split enumeration cover the same table set","Ensure every configured table's format maps to a supported ReadStrategy (parquet/orc/text/csv) before submitting","If restoring from a checkpoint/snapshot state, discard incompatible state and start a fresh run"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    reader.pollNext(output);\n} catch (FileConnectorException e) {\n    if (e.getSeaTunnelErrorCode() == FileConnectorErrorCode.FILE_READ_STRATEGY_NOT_SUPPORT) {\n        // table/split set mismatch: restart with consistent table list, drop stale checkpoint\n    }\n}","preventionTips":["Keep the table list stable between job submit and checkpoint restore","Ensure every configured table's format is supported","Discard incompatible checkpoint/snapshot state after config changes"],"tags":["hive","reader","split","state"],"backgroundTag":"resource-not-found","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}