{"record":{"id":"8a4d2c70dbd9ef31","repo":"prestodb/presto","slug":"hudi-cannot-open-split","errorCode":"HUDI_CANNOT_OPEN_SPLIT","errorMessage":"Error opening Hudi split ${path} (offset=${start}, length=${length}): ${e.getMessage()}","messagePattern":"Error opening Hudi split (.+?) \\(offset=(.+?), length=(.+?)\\): (.+?)","errorType":"error_code","errorClass":"PrestoException","httpStatus":null,"severity":"error","filePath":"presto-hudi/src/main/java/com/facebook/presto/hudi/HudiParquetPageSources.java","lineNumber":205,"sourceCode":"                    internalFields.add(constructField(prestoType, messageColumnIO.getChild(parquetField.getName())));\n                }\n            }\n\n            return new ParquetPageSource(parquetReader, prestoTypes.build(), internalFields.build(), namesBuilder.build(), new RuntimeStats());\n        }\n        catch (Exception e) {\n            try {\n                if (dataSource != null) {\n                    dataSource.close();\n                }\n            }\n            catch (IOException ignored) {\n            }\n            if (e instanceof PrestoException) {\n                throw (PrestoException) e;\n            }\n            String message = format(\"Error opening Hudi split %s (offset=%s, length=%s): %s\", path, start, length, e.getMessage());\n            throw new PrestoException(HUDI_CANNOT_OPEN_SPLIT, message, e);\n        }\n    }\n\n    private static TupleDomain<ColumnDescriptor> getParquetTupleDomain(Map<List<String>, RichColumnDescriptor> descriptorsByPath, TupleDomain<HudiColumnHandle> effectivePredicate)\n    {\n        if (effectivePredicate.isNone()) {\n            return TupleDomain.none();\n        }\n\n        ImmutableMap.Builder<ColumnDescriptor, Domain> predicate = ImmutableMap.builder();\n        effectivePredicate.getDomains().get().forEach((columnHandle, domain) -> {\n            String baseType = columnHandle.getHiveType().getTypeSignature().getBase();\n            // skip looking up predicates for complex types as Parquet only stores stats for primitives\n            if (!baseType.equals(StandardTypes.MAP) && !baseType.equals(StandardTypes.ARRAY) && !baseType.equals(StandardTypes.ROW)) {\n                RichColumnDescriptor descriptor = descriptorsByPath.get(ImmutableList.of(columnHandle.getName()));\n                if (descriptor != null) {\n                    predicate.put(descriptor, domain);\n                }","sourceCodeStart":187,"sourceCodeEnd":223,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-hudi/src/main/java/com/facebook/presto/hudi/HudiParquetPageSources.java#L187-L223","documentation":"The Parquet page source could not be opened for a Hudi split. If the failure is not already a PrestoException, createParquetPageSource wraps it in HUDI_CANNOT_OPEN_SPLIT with the file path, split offset, and length so the exact file and byte range are identified.","triggerScenarios":"IOException/RuntimeException while opening a Parquet base file for a split: file not found (missing or cleaned file), HDFS read failure, permission denied, or a corrupt/short Parquet footer.","commonSituations":"Hudi cleaning/compaction deleted a file still referenced by an old split, missing HDFS permissions for the Presto user, NameNode/network problems, truncated files from failed writes.","solutions":["Read the chained cause: verify the file at the reported path exists and is readable by the Presto user","If the file was deleted by cleaning/compaction, rewind to a consistent snapshot or re-trigger the query; align Hudi clean retention with query duration","Fix HDFS permissions/quota or cluster connectivity problems","Validate the Parquet file (footer readable, not truncated); restore or rewrite corrupted files from a good commit"],"exampleFix":"// ensure clean retention covers long queries (Hudi writer config)\n// before\nhoodie.cleaner.commits.retained=10\n// after\nhoodie.cleaner.commits.retained=100","handlingStrategy":"retry","validationCode":"// Pre-flight: ensure the split's file exists and is readable before opening\nPath path = split.getPath();\nFileSystem fs = path.getFileSystem(conf);\nif (!fs.exists(path)) {\n    throw new IllegalStateException(\"File for split missing: \" + path);\n}\nif (!fs.open(path).getPos() >= 0) { /* readable */ }","typeGuard":null,"tryCatchPattern":"try {\n    return parquetPageSource(split);\n} catch (PrestoException e) {\n    if (isHudiErrorCode(e, \"HUDI_CANNOT_OPEN_SPLIT\") && isTransient(e.getCause())) {\n        return withRetry(3, backoff(), () -> parquetPageSource(split));\n    }\n    throw e;\n}","preventionTips":["Set Hudi cleaner retention well above max query duration","Grant the Presto service user read access to table data paths","Monitor HDFS for under-replicated/missing files the scheduler may reference","Validate file integrity after failed/aborted writer commits"],"tags":["presto","hudi","parquet","split","io","file-open"],"backgroundTag":"cannot-open-split","analyzedSha":"55bb57d202de3b926896fa966c2c4a44c779634e","analyzedAt":"2026-09-04T12:50:26.162Z","contentChangedAt":"2026-09-04T12:50:26.162Z","schemaVersion":2},"datasetVersion":"2026-09-11T21:17:09.523Z"}