should not use seek() for skipping very small column chunks. better to read and ignore data.
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 45/100
- Type d'issue
- Fonctionnalité
- Clarté
- Plutôt claire
- Activité
- À l'abandon
- Stack technique
- hadoop, java
- Domaine
- data-engineering
Piste de recherche
Commencez dans org.apache.parquet.hadoop.ParquetFileReader#internalReadRowGroup et suivez la façon dont ConsecutivePartList est construit avant readAllPartsVectoredOrNormal. Utilisez Hadoop FileSystem#minSeekForVectorReads comme seuil pour évaluer les petits écarts, puis vérifiez que les blocs de colonnes sélectionnés sont toujours chargés tandis que les petits écarts sont lus dans les plages environnantes au lieu de provoquer des déplacements séparés.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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
- Langage dominant
- Java
- Étoiles
- 3.1k
- Forks
- 1.6k
- Merge moyen
- 6 j 44 min
- PR mergées (30 j)
- 35
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de apache/parquet-java
-
Type: bug
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
apache/parquet-java#3792 ·
-
Make PageReader AutoCloseable Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
apache/parquet-java#3767 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
apache/parquet-java#3695 · 1 commentaire ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
apache/parquet-java#3667 ·
-
Type: bug
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
apache/parquet-java#3574 · 1 commentaire ·
Toutes les issues de apache/parquet-java
Issues similaires
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
objectionary/jeo-maven-plugin#1811 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
hiero-ledger/hiero-block-node#3693 ·
-
area/dependencies kind/cve severity/critical source/scan-dependencies status/triage
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
-
bug good first issue
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
-
proposal
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
beemdevelopment/Aegis#1840 ·