Pure Java NIO LocalInputFile Implementation
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Đọc parquet-common/src/main/java/org/apache/parquet/io/LocalInputFile.java và so sánh với phần triển khai NioInputFile được liên kết trong issue. Kiểm tra cách LocalOutputFile sử dụng Java NIO, sau đó làm rõ liệu việc hoàn thành có nghĩa là cập nhật LocalInputFile hay thêm một phần triển khai riêng hoạt động với các nhà cung cấp FileSystem thay thế.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the enhancement requested
Hi there!
In an effort to reduce our coupling to Hadoop, and slim down our shaded Jar sizes, we transitioned all our Parquet reading / writing to using the non-Hadoop public interfaces. We leveraged Java NIO interfaces for reading / writing I/O, as detailed in this blog post here: https://blakesmith.me/2024/10/05/how-to-use-parquet-java-without-hadoop.html
The problem we hit: The current LocalInputFile implementation falls back to Path#toFile and RandomAccessFile calls for I/O operations. Once we plug in other java.nio.file.FileSystem implementations (Such as using AWS' Java NIO SPI implementation), the LocalInputFile implementation doesn't work anymore.
We've created our own implementation of LocalInputFile called NioInputFile, that implements the interface, but exclusively using Java NIO operations, instead of falling back to older Java file APIs. You can see the code in the above linked blog post, and also in this gist here: https://gist.github.com/blakesmith/5c08a2504c08c96f9fb62658ec6c9b28
A few questions, before I start sending patches:
- Is this alternative implementation something that folks are interested in incorporating upstream into Parquet itself?
- If so, would we prefer to update
LocalInputFile, or addNioInputFileas another implementation ofLocalInputFile? Note that in our case, we're doing buffered I/O to S3 with this implementation, so it's not technically a "local" file, either way, just one that talks to the Java NIO abstractions.
Of note is that LocalOutputFile is working just fine with Java NIO operations, even when we're doing remote S3 I/O.
Thanks you so much! Parquet has been transformative for us, and we're excited to help drive more adoption however we can.
Component(s)
Core
- Ngôn ngữ chính
- Java
- Star
- 3.1k
- Fork
- 1.6k
- Merge trung bình
- 6 ngày 16 giờ
- Pull request đã merge (30 ngày)
- 36
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
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của apache/parquet-java
-
Type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
apache/parquet-java#3792 ·
-
Make PageReader AutoCloseable Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
apache/parquet-java#3767 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
apache/parquet-java#3695 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
apache/parquet-java#3667 ·
-
Type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
apache/parquet-java#3574 · 1 bình luận ·
Tất cả issue của apache/parquet-java
Issue tương tự
-
documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
inu-appcenter/memorIN-backend#288 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
frontend maui-pilot pilot-ask question
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
executions.Query — startDate and timeRange filters are sent with inverted comparison operators Đang mởarea/plugin
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
kestra-io/plugin-kestra#190 ·