apache / apache/parquet-java

Parquet writer classes don't close underlying output stream in case of errors.

オープン
#2,727 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
Component: Java Component: Parquet Priority: Major Type: bug
主要言語
Java
スター
3.1k
フォーク
1.6k
平均マージ
3日 12時間
マージ済み PR(30日)
33

説明

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.*

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

org.apache.parquet.hadoop.ParquetWriter.Builder#build() と org.apache.parquet.hadoop.ParquetWriter#close() から始め、添付された TestExample.java を確認して失敗ケースを調べてください。org.apache.parquet.io.OutputFile ストリームがどのように作成されるかを追跡し、writer の作成時または close の実行時にエラーが発生した場合に閉じられるかどうかを判断してください。完了の条件は、報告されている両方の失敗経路で基盤となるストリームが閉じられ、それらのケースをカバーするテストがあることです。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
java
領域
data-engineering
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
48/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。