apache / apache/arrow-java

NativeDatasetFactory parameter allocator and memory pool relationship

Aberta
#168 3 comentários 0 reações 0 responsáveis Ver no GitHub
Linguagem predominante
Java
Estrelas
94
Forks
152
Merge médio
3d 16h
PRs com merge (30d)
11

Descrição

### 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

Guia de contribuição

Abrir o guia de contribuição

Direção de pesquisa

Comece pelo construtor de NativeDatasetFactory mostrado na issue e rastreie como BufferAllocator e NativeMemoryPool são usados. Esclareça a relação entre eles na documentação da API Java, incluindo o que os contributors podem verificar a partir do caminho de alocação nativa; considera-se concluído quando a questão sobre o uso estiver respondida claramente.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
java
Domínio
documentation
Tipo de issue
Documentação
Dificuldade
2/5
Tempo estimado
1-3 horas
Status de atividade
Estagnada
Clareza
Precisa de esclarecimento
Facilidade para iniciantes
25/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.