Parquet writer classes don't close underlying output stream in case of errors.
- Lingua principale
- Java
- Stelle
- 3.1k
- Fork
- 1.6k
- Merge medio
- 3g 12h
- PR unite (30g)
- 33
Descrizione
org.apache.parquet.io.OutputFile interface does not implement Closeable.
In my opinion it implies that created streams are fully managed by parquet-mr classes.
Unfortunately opened stream will not be closed in case of IO or other failure.
There are two places I can find for this problem:
- During writer creation (org.apache.parquet.hadoop.ParquetWriter.Builder#build()) - created stream should be closed if writer creation fails.
- During writer close(org.apache.parquet.hadoop.ParquetWriter#close) - underlying stream should be closed regardless of any faced failures.
Although I didn't examine ParquetReaded that much.
**Reporter**: [Andrei Lopukhov](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=alopukhov)
#### Original Issue Attachments:
- [TestExample.java](https://issues.apache.org/jira/secure/attachment/13053139/TestExample.java)
**Note**: *This issue was originally created as [PARQUET-2216](https://issues.apache.org/jira/browse/PARQUET-2216). Please see the [migration documentation](https://issues.apache.org/jira/browse/PARQUET-2502) for further details.*
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Inizia da org.apache.parquet.hadoop.ParquetWriter.Builder#build() e org.apache.parquet.hadoop.ParquetWriter#close(), quindi esamina il TestExample.java allegato per i casi di errore. Traccia come viene creato lo stream org.apache.parquet.io.OutputFile e determina se viene chiuso quando si verifica un errore durante la creazione del writer o durante la chiusura. Il lavoro è completato quando lo stream sottostante viene chiuso in entrambi i percorsi di errore segnalati, con test che coprono questi casi.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- java
- Ambito
- data-engineering
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 48/100