Files opened by ParquetFileWriter’s appendFile method should to be closed correctly
- Ngôn ngữ chính
- Java
- Star
- 3.1k
- Fork
- 1.6k
- Merge trung bình
- 3 ngày 12 giờ
- Pull request đã merge (30 ngày)
- 33
Mô tả
I try to use the `appendFile` method of `ParquetFileWriter` to merge some smaller Parquet files into one large parquet file. After I finished the merge, I tried deleting the smaller files, but couldn't actually delete them.
After reading the ParquetFileWriter source code, I found that the file he opened was not closed in the end method, which seemed unreasonable.
When testing on `Windows`, it was found that these implicitly opened files cannot be deleted or renamed. This seems to be related to Windows file handles. But it's worked fine on macOS.
Anyway, I will submit a patch to ensure that files opened through the appendFile function are closed correctly.
**Reporter**: [Deng An](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=packyan)
#### PRs and other links:
- [GitHub Pull Request #1351](https://github.com/apache/parquet-java/pull/1351)
- [GitHub Pull Request #1351](https://github.com/apache/parquet-mr/pull/1351)
**Note**: *This issue was originally created as [PARQUET-2477](https://issues.apache.org/jira/browse/PARQUET-2477). Please see the [migration documentation](https://issues.apache.org/jira/browse/PARQUET-2502) for further details.*
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Hướng nghiên cứu
Bắt đầu với ParquetFileWriter.appendFile và phương thức end của nó, như được xác định trong issue. Tái hiện merge trên Windows và xác minh rằng các tệp Parquet nhỏ hơn có thể được xóa hoặc đổi tên sau khi hoàn tất; pull request được liên kết cho biết công việc đã được tiến hành.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- java
- Lĩnh vực
- backend
- Loại issue
- Lỗi
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức phù hợp với người mới
- 25/100