apache / apache/arrow-java

NativeDatasetFactory parameter allocator and memory pool relationship

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

描述

### Describe the usage question you have. Please include as many useful details as possible.

@zhztheplayer
```
/**
* Constructor.
*
* @param allocator a context allocator associated with this factory. Any buffer that will be created natively will
* be then bound to this allocator.
* @param memoryPool the native memory pool associated with this factory. Any buffer created natively should request
* for memory spaces from this memory pool. This is a mapped instance of c++ arrow::MemoryPool.
* @param datasetFactoryId an ID, at the same time the native pointer of the underlying native instance of this
* factory. Make sure in c++ side the pointer is pointing to the shared pointer wrapping
* the actual instance so we could successfully decrease the reference count once
* {@link #close} is called.
* @see #close()
*/
public NativeDatasetFactory(BufferAllocator allocator, NativeMemoryPool memoryPool, long datasetFactoryId) {
this.allocator = allocator;
this.memoryPool = memoryPool;
this.datasetFactoryId = datasetFactoryId;
}
```

what's the relationship between allocator and memoryPool, does allocator allocate buffers from the memory pool or there is no such restrictions?

thanks

### Component(s)

Java

贡献指南

打开贡献指南

调研方向

从 issue 中所示的 NativeDatasetFactory 构造函数开始,跟踪 BufferAllocator 和 NativeMemoryPool 的使用方式。在 Java API 文档中明确它们之间的关系,包括 contributors 可以从 native 分配路径中验证的内容;当使用问题得到清晰回答时,即视为完成。

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

评估

技术栈
java
领域
documentation
Issue 类型
文档
难度
2/5
预计耗时
1-3 小时
活跃度
停滞
描述清晰度
需要澄清
新手友好度
25/100

把新 issue 发到你的邮箱

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