[Java] How to use RootAllocator in a low memory setting?
- 主要语言
- 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