Provide a ByteBuffer based write path
- Lenguaje dominante
- Java
- Estrellas
- 3.1k
- Forks
- 1.6k
- Merge medio
- 3 d 12 h
- PR fusionados (30 d)
- 33
Descripción
Similar to the effort to use a ByteBuffer in the read path, we should provide a path to use a ByteBuffer in the write path.
The proposed idea is to provide an allocator in the writer that is passed down to CapacityByteArrayOutputStream and is used to allocate a ByteBuffer instead of the byte array that it currently uses.
I've attached a patch based on the 1.5 release that does that. There are two implementations of the allocator - one for Heap memory and one for Direct memory. In addition, the allocator interface allows for a 'release' method so that reference counted memory allocators like Netty's ByteBuf can be used to provide an allocator.
**Reporter**: [Parth Chandra](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=parthc) / @parthchandra
#### Related issues:
- [Move off of Parquet fork](https://issues.apache.org/jira/browse/DRILL-1410) (is depended upon by)
**Note**: *This issue was originally created as [PARQUET-78](https://issues.apache.org/jira/browse/PARQUET-78). Please see the [migration documentation](https://issues.apache.org/jira/browse/PARQUET-2502) for further details.*
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Línea de trabajo
Empiece comparando la ruta de lectura existente basada en ByteBuffer con el writer y el CapacityByteArrayOutputStream mencionados en el issue. Siga cómo el allocator propuesto proporcionaría buffers heap o direct y cómo se gestionaría su liberación; después, verifique que la ruta de escritura admita ambas implementaciones del allocator y memoria con conteo de referencias.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- java
- Área
- data-engineering
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 45/100