apache / apache/parquet-java

Benchmark the assembly of thrift objects, and possibly create a more efficient ReplayingTProtocol

Ouverte
#1,391 2 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Component: Java Component: Parquet Priority: Minor Type: enhancement
Langage dominant
Java
Étoiles
3.1k
Forks
1.6k
Merge moyen
3 j 12 h
PR mergées (30 j)
33

Description

The current implementation of parquet thrift creates an instance of TProtocol for each value of each record and builds a stack of these events, which are then replayed back to the TBase.

I'd be curious to benchmark this, and if it's slow, try building a "ReplayingTProtocol" that instead of having a stack of TProtocol instances, contains a primitive array of each type. As events are fed into this replaying TProtocol, it would just add these primitives to its buffers, and then the TBase would drain them. This would effectively let us stream the values into the TBase without making an object allocation for each value.

The buffers could be set to a certain size, and if they fill up (which they sholdn't in most cases), the TBase could begin draining the protocol until it is empty again, at which point the TProtocol can block the TBase from draining further while the parque record assembly feeds it more events.

This is all moot if it turns out not to be bottleneck though :)

**Reporter**: [Alex Levenson](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=alexlevenson) / @isnotinvain

**Note**: *This issue was originally created as [PARQUET-33](https://issues.apache.org/jira/browse/PARQUET-33). Please see the [migration documentation](https://issues.apache.org/jira/browse/PARQUET-2502) for further details.*

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Piste de recherche

Commencez par localiser le chemin actuel d’assemblage des enregistrements parquet thrift qui crée un TProtocol par valeur et mesurez-le avant de concevoir des changements. Comparez les allocations et le débit avec la relecture existante de event-stack ; le travail est terminé lorsque le benchmark permet de décider clairement si un ReplayingTProtocol est justifié, avec le périmètre et les tests documentés.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
java
Domaine
performance
Type d'issue
Refactorisation
Difficulté
5/5
Temps estimé
Plus d'une semaine
Activité
À l'abandon
Clarté
À clarifier
Accessibilité débutants
18/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.