Parquet import of wide-string files (websight-v01) runs out of heap at -Xmx8g
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- java
- 领域
- cli, data-engineering
调研方向
Start from ParquetImporter and ImportOptions#withChunkSize to see how rows are batched before they reach hardwood, then read the stack trace's PageDecoder.parseDataPage and ColumnWorker.decode in hardwood. Reproducing needs the 29 GB websight-v01 file, so first measure the heap at a smaller chunk size. Done means a bounded-heap import succeeds at a stated -Xmx, with the chunk-size or CLI option documented.
由索引模型根据 Issue 内容生成。
描述
vortex import of Raincloud's websight-v01 (29 GB Parquet, 822,987 rows, ~35 KB of HTML per row) runs out of heap with -Xmx8g, 15% of the way through:
java -Xmx8g --enable-native-access=ALL-UNNAMED -jar vortex-cli-0.19.1-SNAPSHOT-all.jar import websight-v01.parquet out.vortex
[====> ] 15% 131,072 / 822,987 rows
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOfRange(Arrays.java:3849)
at dev.hardwood.internal.encoding.PlainDecoder.readByteArray(PlainDecoder.java:285)
at dev.hardwood.internal.encoding.PlainDecoder.readByteArrays(PlainDecoder.java:217)
at dev.hardwood.internal.reader.PageDecoder.decodeTypedValues(PageDecoder.java:485)
at dev.hardwood.internal.reader.PageDecoder.parseDataPage(PageDecoder.java:335)
at dev.hardwood.internal.reader.ColumnWorker.decode(ColumnWorker.java:508)
The same import with -Xmx48g succeeds (822,987 rows, 77 s, 30.9 GB output), so this is a memory-footprint problem, not a correctness one. The failure is in hardwood's page decode (one byte[] per value, held for the whole page), reached through ParquetImporter.
Unknown, to measure:
- how much of the heap is hardwood's decoded pages vs the importer's own chunk buffers (default
ImportOptionschunk size is 65,536 rows, which is ~2.3 GB of strings for this file before encoding); - the smallest
-Xmxthat works, and whether a smaller chunk size (ImportOptions#withChunkSize) lowers it. The CLI has no flag for the chunk size today. - whether hardwood decodes columns in parallel and so multiplies the footprint (the file has three columns:
imagestruct of binary + path,text,split).
Hits any wide-string Parquet: found while rerunning the #643 slugs (websight-v01, open-food-facts; the latter imported fine with -Xmx48g). Not an -Xmx default problem on a large machine (the default heap is a quarter of RAM), but a laptop with 16 GB would hit it.
Possible directions: size the chunk by bytes as well as rows, so a 35 KB-per-row file uses fewer rows per chunk; expose the chunk size on the CLI; document the heap a large import needs.
- 主要语言
- Java
- 星标
- 3
- 派生
- 2
- 平均合并
- 9 小时 51 分钟
- 30 天内合并 PR
- 127
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
dfa1/vortex-java 的其他 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 66/100
dfa1/vortex-java#636 ·
维护者通常 1 天内回复
-
bug
难度 3/5 1-2 天 新手友好度 70/100
dfa1/vortex-java#655 ·
维护者通常 1 天内回复
-
perf
难度 4/5 3-5 天 新手友好度 30/100
dfa1/vortex-java#651 ·
维护者通常 1 天内回复
-
Writer: string columns written as per-chunk dicts where Rust uses its dict layout (up to 2x larger)未关闭perf
难度 4/5 3-5 天 新手友好度 30/100
dfa1/vortex-java#650 ·
维护者通常 1 天内回复
-
perf
难度 4/5 3-5 天 新手友好度 28/100
dfa1/vortex-java#649 ·
维护者通常 1 天内回复
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 70/100
Dans-Plugins/Medieval-Roleplay-Engine#396 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 6 天内回复
-
type: dependency-upgrade
难度 1/5 1 小时以内 新手友好度 70/100
spring-projects/spring-session#4156 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
quarkiverse/quarkus-langchain4j#3127 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
HotswapProjects/HotswapAgent#688 ·