apache / apache/arrow-java

Trying to use for Android but keep getting No DefaultAllocationManager found on classpath

未关闭
#801 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
Type: bug
主要语言
Java
星标
94
派生
152
平均合并
3 天 16 小时
30 天内合并 PR
11

描述

### Describe the bug, including details regarding any error messages, version, and platform.

I have all the dependencies in place, code compiles just fine but when I run it and attempt to parse from an arrow stream like this (or using any of the parsers like from a file)

val df = DataFrame.readArrowFeather(channel.toInputStream(null))

I always get

Caused by: java.lang.RuntimeException: No DefaultAllocationManager found on classpath. Can't allocate Arrow buffers. Please consider adding arrow-memory-netty or arrow-memory-unsafe as a dependency.

Same for
val rootAllocator = RootAllocator()
val fileInputStream = FileInputStream(File(filepath))
val arrowReader = ArrowStreamReader(fileInputStream, rootAllocator)

Asking Gradle for my arrow dependencies I see

| +--- org.jetbrains.kotlinx:dataframe-arrow:1.0.0-dev-7570
| | +--- org.apache.arrow:arrow-vector:18.1.0
| | | +--- org.apache.arrow:arrow-format:18.1.0
| | | +--- org.apache.arrow:arrow-memory-core:18.1.0
| | +--- org.apache.arrow:arrow-format:18.1.0 (*)
| | +--- org.apache.arrow:arrow-memory-unsafe:18.1.0
| | | \--- org.apache.arrow:arrow-memory-core:18.1.0 (*)
+--- org.jetbrains.kotlinx:dataframe-arrow:1.0.0-dev-7570 (*)
+--- org.apache.arrow:arrow-memory-unsafe:18.1.0 (*)

This happens even if I don't use org.jetbrains.kotlinx.dataframe and just call the Apache Arrow parser directly as seen in second code example above.

I have tried adding both arrow-memory-unsage and arrow-memory-netty with the same result. I have been beating my head against a wall for the last few days. Is Android supported with this library? The data from the server comes to me in arrow-stream format so I need to be able to parse it to shows charts.

I have been able to parse the data just fine with Python and the web team is parsing it as well. I need to do this for Native Android and Native iOS.

### Component(s)

Integration

贡献指南

打开贡献指南

调研方向

首先使用列出的 arrow-vector、arrow-memory-core、arrow-memory-unsafe 和 arrow-memory-netty 依赖,在 Android 上通过 DataFrame.readArrowFeather、RootAllocator 和 ArrowStreamReader 重现故障。跟踪 DefaultAllocationManager 在运行时未找到的原因,并验证是否支持 Android。当 Arrow 流和文件解析能够在 Android 上运行且不再出现 allocation-manager 错误时,即视为完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
android, java, kotlin
领域
mobile-dev
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。