apache / apache/arrow-java

[Java] How to use RootAllocator in a low memory setting?

未關閉
#282 3 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
Type: bug
主要語言
Java
星號
94
分支
152
平均合併
3 天 16 小時
30 天內合併 PR
11

描述

When I run this simple code with JVM setting: "-Xmx64m"
```java

package com.snowflake;
import org.apache.arrow.memory.RootAllocator;

public class TestArrow
{
public static void main(String args[]) throws Exception
{
new RootAllocator(Integer.MAX_VALUE);
}
}
```
and got the following error
```java

Picked up JAVA_TOOL_OPTIONS: -Djavax.net.ssl.trustStore=/etc/pki/ca-trust/extracted/java/cacerts
Exception in thread "main" java.lang.ExceptionInInitializerError
at org.apache.arrow.memory.BaseAllocator.createEmpty(BaseAllocator.java:263)
at org.apache.arrow.memory.BaseAllocator.(BaseAllocator.java:89)
at org.apache.arrow.memory.RootAllocator.(RootAllocator.java:34)
at org.apache.arrow.memory.RootAllocator.(RootAllocator.java:30)
at com.snowflake.TestArrow.main(TestArrow.java:13)

Caused by: java.lang.NullPointerException
at io.netty.buffer.PooledByteBufAllocatorL$InnerAllocator.(PooledByteBufAllocatorL.java:145)
at io.netty.buffer.PooledByteBufAllocatorL.(PooledByteBufAllocatorL.java:49)
at org.apache.arrow.memory.AllocationManager.(AllocationManager.java:61) ... 5 more
Process finished with exit code 1
```
So how to use RootAllocator in such low memory case?

**Reporter**: [Andong Zhan](https://issues.apache.org/jira/browse/ARROW-6500)

**Note**: *This issue was originally created as [ARROW-6500](https://issues.apache.org/jira/browse/ARROW-6500). Please see the [migration documentation](https://github.com/apache/arrow/issues/14542) for further details.*

貢獻指南

開啟貢獻指南

研究方向

從使用 -Xmx64m 的 RootAllocator 範例開始,追蹤經過 BaseAllocator.createEmpty、RootAllocator 和 AllocationManager 的初始化流程。重現 ExceptionInInitializerError,然後確定此低記憶體設定需要哪些行為或指引,並使用相關的 allocator 測試進行驗證。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
java
領域
performance
Issue 類型
缺陷
難度
4/5
預估耗時
3-5 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。