should not use seek() for skipping very small column chunks. better to read and ignore data.
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 45/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- hadoop, java
- Área
- data-engineering
Línea de trabajo
Comience en org.apache.parquet.hadoop.ParquetFileReader#internalReadRowGroup y rastree cómo se construye ConsecutivePartList antes de readAllPartsVectoredOrNormal. Use Hadoop FileSystem#minSeekForVectorReads como umbral para evaluar las brechas pequeñas y, a continuación, verifique que los fragmentos de columna seleccionados sigan cargándose mientras las brechas pequeñas se leen dentro de los rangos circundantes, en lugar de provocar búsquedas separadas.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Describe the enhancement requested
When reading some column chunks but not all, parquet is building a list of "ConsecutivePartList", then trying to call the Hadoop api for vectorized reader of FSDataInputStream#readVectored(List ...)
Unfortunatly, many implementations of "FSDataInputStream" do not override the readVectored() method, which trigger many distinct calls to read.
For example on hadoop-azure, the Azure Datalake Storage is much slower at establishing a new Https connection (using infamous calls HttpURLConnection for jdk 1.0, then doing TLS hand-shake), that to get only few more megas of data on an existing socket !!
The case with small wholes to avoid reading is very frequent when having columns in parquet files that are not read, and are highly compressed because of RLE encoding. Typically, a very sparse column with only few values, or even always null within a page. Such a column could be encoded in only few hundred of bytes by parquet, so it is NOT a problem of reading 100 bytes more.
Parquet should at least honor the following method from hadoop class FileSystem, that says that a seek of less than 4096 bytes is NOT reasonable.
/**
* What is the smallest reasonable seek?
* @return the minimum number of bytes
*/
default int minSeekForVectorReads() {
return 4 * 1024;
}
The logic for building this List for a list of column chunks is here:
org.apache.parquet.hadoop.ParquetFileReader#internalReadRowGroup
private ColumnChunkPageReadStore internalReadRowGroup(int blockIndex) throws IOException {
...
for (ColumnChunkMetaData mc : block.getColumns()) {
...
// first part or not consecutive => new list
if (currentParts == null || currentParts.endPos() != startingPos) { // <===== SHOULD honor minSeekForVectorReads()
currentParts = new ConsecutivePartList(startingPos);
allParts.add(currentParts);
}
currentParts.addChunk(new ChunkDescriptor(columnDescriptor, mc, startingPos, mc.getTotalSize()));
}
}
// actually read all the chunks
ChunkListBuilder builder = new ChunkListBuilder(block.getRowCount());
readAllPartsVectoredOrNormal(allParts, builder);
rowGroup.setReleaser(builder.releaser);
for (Chunk chunk : builder.build()) {
readChunkPages(chunk, block, rowGroup);
}
return rowGroup;
}
maybe a possible implementation could be to add fictive "ConsecutivePartList" that are to be ignored while receiving the data, but that would avoid having some wholes in the ranges to read.
Component(s)
No response
- Lenguaje dominante
- Java
- Estrellas
- 3.1k
- Forks
- 1.6k
- Merge medio
- 6 d 16 h
- PR fusionados (30 d)
- 36
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de apache/parquet-java
-
Type: bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
apache/parquet-java#3792 ·
-
Make PageReader AutoCloseable Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
apache/parquet-java#3767 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
apache/parquet-java#3695 · 1 comentario ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
apache/parquet-java#3667 ·
-
Type: bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
apache/parquet-java#3574 · 1 comentario ·
Todos los issues de apache/parquet-java
Issues similares
-
area-deployment area-integrations triage:bot-seen
Dificultad 2/5 Medio día Aptitud para principiantes 86/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
apache/flink-agents#1156 ·
-
[source-shopify] FAILED bulk operation without partialDataUrl is silently treated as successful Abiertoarea/connectors autoteam community connectors/source/shopify needs-triage team/use type/bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100