{"record":{"id":"e69c1013df596795","repo":"apache/seatunnel","slug":"common-error-code-14-e69c10","errorCode":"COMMON_ERROR_CODE-14","errorMessage":"Create parquet reader for this file [%s] failed","messagePattern":"Create parquet reader for this file \\[(.+?)\\] failed","errorType":"exception","errorClass":"FileConnectorException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/reader/ParquetReadStrategy.java","lineNumber":761,"sourceCode":"        return getSeaTunnelRowTypeInfoWithUserConfigRowType(path, null);\n    }\n\n    @Override\n    public SeaTunnelRowType getSeaTunnelRowTypeInfoWithUserConfigRowType(\n            String path, SeaTunnelRowType configRowType) throws FileConnectorException {\n        ParquetMetadata metadata;\n        try (ParquetFileReader reader =\n                hadoopFileSystemProxy.doWithHadoopAuth(\n                        ((configuration, userGroupInformation) -> {\n                            HadoopInputFile hadoopInputFile =\n                                    HadoopInputFile.fromPath(new Path(path), configuration);\n                            return ParquetFileReader.open(hadoopInputFile);\n                        }))) {\n            metadata = reader.getFooter();\n        } catch (IOException e) {\n            String errorMsg =\n                    String.format(\"Create parquet reader for this file [%s] failed\", path);\n            throw new FileConnectorException(\n                    CommonErrorCodeDeprecated.READER_OPERATION_FAILED, errorMsg, e);\n        }\n\n        FileMetaData fileMetaData = metadata.getFileMetaData();\n        MessageType originalSchema = fileMetaData.getSchema();\n        if (readColumns.isEmpty()) {\n            for (int i = 0; i < originalSchema.getFieldCount(); i++) {\n                readColumns.add(originalSchema.getFieldName(i));\n            }\n        }\n        String[] fields = new String[readColumns.size()];\n        SeaTunnelDataType<?>[] types = new SeaTunnelDataType[readColumns.size()];\n        buildColumnsWithErrorCheck(\n                TablePath.DEFAULT,\n                IntStream.range(0, readColumns.size()).iterator(),\n                i -> {\n                    fields[i] = readColumns.get(i);\n                    Type type = originalSchema.getType(fields[i]);","sourceCodeStart":743,"sourceCodeEnd":779,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/reader/ParquetReadStrategy.java#L743-L779","documentation":"ParquetReadStrategy opens the file via ParquetFileReader.open inside doWithHadoopAuth to read the footer; any IOException while creating the reader is wrapped as READER_OPERATION_FAILED with the file path, chaining the original cause. This means the parquet reader could not be constructed at all — typically I/O, auth, or file-access problems, not schema issues.","triggerScenarios":"readWithAvro calls hadoopFileSystemProxy.doWithHadoopAuth to open HadoopInputFile and ParquetFileReader.open throws IOException (missing file, HDFS/DFS access failure, permission error, Kerberos/auth failure, corrupt footer).","commonSituations":"File deleted/moved between listing and reading; HDFS NameNode unreachable; missing Kerberos credentials or wrong fs.defaultFS; S3/OSS credentials invalid; truncated parquet file.","solutions":["Check the chained cause `e` for the root IOException; confirm the file exists and is reachable (`hdfs dfs -ls` / `aws s3 ls`).","Verify Hadoop auth configuration (kerberos principal/keytab, or storage credentials) used by doWithHadoopAuth.","Validate the file isn't truncated/corrupt (footer readable via parquet-tools).","Re-run after fixing storage/network access; if transient (HDFS flapping), retry the read."],"exampleFix":"// before: no auth config\nFaT = { source = { file = { path = \"hdfs://nn/data/x.parquet\" } } }\n\n// after: provide kerberos config\nFaT = { source = { file = { path = \"hdfs://nn/data/x.parquet\" }, hadoop_security_kerberos_principal = \"user@REALM\", hadoop_security_kerberos_keytab_path = \"/etc/keytabs/user.keytab\" } }","handlingStrategy":"try-catch","validationCode":"// Pre-flight: confirm the path is readable through Hadoop before submitting the job\norg.apache.hadoop.conf.Configuration conf = new org.apache.hadoop.conf.Configuration();\norg.apache.hadoop.fs.Path p = new org.apache.hadoop.fs.Path(path);\norg.apache.hadoop.fs.FileSystem fs = p.getFileSystem(conf);\nif (!fs.exists(p) || !fs.open(p).read(new byte[4]) .equals(4)) {\n    throw new IllegalStateException(\"Cannot read parquet file: \" + path);\n}","typeGuard":null,"tryCatchPattern":"try {\n    rows = parquetSource.read();\n} catch (FileConnectorException e) {\n    if (e.getMessage().startsWith(\"Create parquet reader for this file\")) {\n        Throwable root = ExceptionUtils.getRootCause(e);\n        // inspect root (IOException: missing file, auth, hdfs) and retry if transient\n    } else throw e;\n}","preventionTips":["Always inspect the chained root cause for the real IOException","Verify Kerberos/keytab or storage credentials before running","Check file existence and stability (not being overwritten) before reads","Retry on transient storage/network errors with backoff"],"tags":["parquet","io","hadoop","file-read"],"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"}