[Java] How to use RootAllocator in a low memory setting?
- Vorherrschende Sprache
- Java
- Sterne
- 94
- Forks
- 152
- Ø Merge
- 3 T. 16 Std.
- Gemergte PRs (30 T.)
- 11
Beschreibung
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.*
Beitragsleitfaden
Rechercherichtung
Beginne mit dem RootAllocator-Beispiel unter Verwendung von -Xmx64m und verfolge die Initialisierung durch BaseAllocator.createEmpty, RootAllocator und AllocationManager. Reproduziere den ExceptionInInitializerError und bestimme anschließend, welches Verhalten oder welche Anleitung für diese speicherarme Konfiguration erforderlich ist, und verifiziere dies mit den relevanten Allocator-Tests.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- java
- Bereich
- performance
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100