[Java] How to use RootAllocator in a low memory setting?
- Ngôn ngữ chính
- Java
- Star
- 94
- Fork
- 152
- Merge trung bình
- 3 ngày 16 giờ
- Pull request đã merge (30 ngày)
- 11
Mô tả
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.*
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu với ví dụ RootAllocator sử dụng -Xmx64m và theo dõi quá trình khởi tạo qua BaseAllocator.createEmpty, RootAllocator và AllocationManager. Tái hiện ExceptionInInitializerError, sau đó xác định hành vi hoặc hướng dẫn nào cần thiết cho cấu hình bộ nhớ thấp này và xác minh bằng các kiểm thử allocator liên quan.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- java
- Lĩnh vực
- performance
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100