Parquet writer classes don't close underlying output stream in case of errors.
- 主要语言
- Java
- 星标
- 3.1k
- 派生
- 1.6k
- 平均合并
- 3 天 12 小时
- 30 天内合并 PR
- 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 或关闭 writer 时遇到错误的情况下该流是否会被关闭。完成意味着底层流在报告的两条失败路径中都会被关闭,并且有测试覆盖这些情况。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- java
- 领域
- data-engineering
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 48/100