{"record":{"id":"91ea2f500f6d4e75","repo":"apache/seatunnel","slug":"file-read-failed-91ea2f","errorCode":"FILE_READ_FAILED","errorMessage":"Read data failed, tableId=[${tableId}], file=[${filePath}], splitId=[${splitId}]","messagePattern":"Read data failed, tableId=\\[(.+?)\\], file=\\[(.+?)\\], splitId=\\[(.+?)\\]","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":89,"sourceCode":"        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\");\n                context.signalNoMoreElement();\n            }\n        }\n    }\n\n    @Override\n    public List<FileSourceSplit> snapshotState(long checkpointId) {\n        return new ArrayList<>(sourceSplits);\n    }\n\n    @Override\n    public void addSplits(List<FileSourceSplit> splits) {\n        sourceSplits.addAll(splits);","sourceCodeStart":71,"sourceCodeEnd":107,"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#L71-L107","documentation":"This wraps any exception thrown by readStrategy.read(...) during split consumption in pollNext into a FileConnectorException with code FILE_READ_FAILED, preserving the cause and adding tableId, file path, and splitId context so the failing file is identifiable. It signals a genuine read failure (corrupt file, schema mismatch, IO/permission error) rather than a config error.","triggerScenarios":"readStrategy.read(split.getFilePath(), split.getTableId(), output) throws any Exception while reading the split's file — IO errors, deserialization/schema evolution errors, HDFS permission or missing-file errors, corrupt parquet/orc footers.","commonSituations":"Files deleted or compacted in Hive while the job is running (split points to a stale path); permission changes on HDFS; schema mismatch between the file and configured schema; unsupported/corrupt file written by another job.","solutions":["Inspect the root cause (cause chain) and the file path in the message; verify the file exists and is readable from the cluster","Re-run the job after the underlying file issue (deletion/compaction/permission) is resolved","Align the configured read schema with the actual file schema; enable schema-evolution-tolerant settings if supported","Check HDFS/storage health and permission for the job's user"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// Before job: check split files exist and are readable\nfor (String path : expectedFilePaths) {\n    if (!fileSystem.exists(new org.apache.hadoop.fs.Path(path))) {\n        throw new IllegalStateException(\"Missing input file: \" + path);\n    }\n}","typeGuard":null,"tryCatchPattern":"try {\n    reader.pollNext(output);\n} catch (FileConnectorException e) {\n    if (e.getSeaTunnelErrorCode() == FileConnectorErrorCode.FILE_READ_FAILED) {\n        // log e.getCause(); retry with backoff or fail over after fixing file/schema issue\n    }\n}","preventionTips":["Avoid rewrites/compactions of Hive partitions while the job runs","Align configured schema with actual file schema","Verify storage permissions for the job user","Enable engine-level restart/retry strategy for transient IO failures"],"tags":["hive","file-read","io","split"],"backgroundTag":"file-read-failed","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"}