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
-
ai-driven-fuzzing bug claude Major
難度 2/5 1-3 小時 新手友好度 78/100
linagora/tmail-backend#2862 ·
維護者通常 1 天內回覆
-
ai-driven-fuzzing bug claude Minor
難度 2/5 1-3 小時 新手友好度 74/100
linagora/twake-calendar-side-service#1435 ·
維護者通常 1 天內回覆
-
good first issue
難度 2/5 1-3 小時 新手友好度 69/100
維護者通常 1 天內回覆
-
status:pending type:bug
難度 2/5 1-3 小時 新手友好度 78/100
EngineHub/WorldGuard#2329 ·
維護者通常 3 天內回覆
-
wrap-java: Optional convenience methods can fail to compile when a parameter shadows the method name未關閉
難度 2/5 1-3 小時 新手友好度 70/100
swiftlang/swift-java#945 ·
維護者通常 1 天內回覆