-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Added support to write parquet files to S3 #5914
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quick first past.
extensions/parquet/base/src/main/java/io/deephaven/parquet/base/ParquetFileWriter.java
Outdated
Show resolved
Hide resolved
extensions/parquet/base/src/main/java/io/deephaven/parquet/base/ParquetFileWriter.java
Outdated
Show resolved
Hide resolved
...ns/parquet/table/src/main/java/io/deephaven/parquet/table/ParquetMetadataFileWriterImpl.java
Show resolved
Hide resolved
...ns/parquet/table/src/main/java/io/deephaven/parquet/table/ParquetMetadataFileWriterImpl.java
Show resolved
Hide resolved
...ns/parquet/table/src/main/java/io/deephaven/parquet/table/ParquetMetadataFileWriterImpl.java
Show resolved
Hide resolved
private CompletableFuture<UploadPartResponse> future; | ||
|
||
OutgoingRequest(final int partSize) { | ||
buffer = ByteBuffer.allocate(partSize); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could think about taking these from a pool.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since these buffers are longer lived and we allocate a fixed maximum number of buffers to be used in a circular manner, I didn't use a pool here. But I am open to the idea.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do think it would be a good idea. Maybe better in a follow-on PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extensions/s3/src/main/java/io/deephaven/extensions/s3/S3OutputStream.java
Outdated
Show resolved
Hide resolved
extensions/s3/src/main/java/io/deephaven/extensions/s3/S3OutputStream.java
Outdated
Show resolved
Hide resolved
extensions/s3/src/main/java/io/deephaven/extensions/s3/S3OutputStream.java
Outdated
Show resolved
Hide resolved
extensions/s3/src/main/java/io/deephaven/extensions/s3/S3SeekableChannelProvider.java
Outdated
Show resolved
Hide resolved
extensions/s3/src/main/java/io/deephaven/extensions/s3/S3Instructions.java
Outdated
Show resolved
Hide resolved
extensions/s3/src/main/java/io/deephaven/extensions/s3/S3OutputStream.java
Outdated
Show resolved
Hide resolved
...ns/parquet/table/src/main/java/io/deephaven/parquet/table/ParquetMetadataFileWriterImpl.java
Show resolved
Hide resolved
...ns/parquet/table/src/main/java/io/deephaven/parquet/table/ParquetMetadataFileWriterImpl.java
Show resolved
Hide resolved
extensions/parquet/base/src/main/java/io/deephaven/parquet/base/ParquetFileWriter.java
Outdated
Show resolved
Hide resolved
private CompletableFuture<UploadPartResponse> future; | ||
|
||
OutgoingRequest(final int partSize) { | ||
buffer = ByteBuffer.allocate(partSize); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since these buffers are longer lived and we allocate a fixed maximum number of buffers to be used in a circular manner, I didn't use a pool here. But I am open to the idea.
extensions/s3/src/main/java/io/deephaven/extensions/s3/S3OutputStream.java
Outdated
Show resolved
Hide resolved
extensions/s3/src/main/java/io/deephaven/extensions/s3/S3SeekableChannelProvider.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Python LGTM
Util/channel/src/main/java/io/deephaven/util/channel/SeekableChannelsProvider.java
Outdated
Show resolved
Hide resolved
Util/channel/src/main/java/io/deephaven/util/channel/SeekableChannelsProvider.java
Outdated
Show resolved
Hide resolved
extensions/parquet/base/src/main/java/io/deephaven/parquet/base/ParquetFileWriter.java
Outdated
Show resolved
Hide resolved
private CompletableFuture<UploadPartResponse> future; | ||
|
||
OutgoingRequest(final int partSize) { | ||
buffer = ByteBuffer.allocate(partSize); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do think it would be a good idea. Maybe better in a follow-on PR.
extensions/s3/src/main/java/io/deephaven/extensions/s3/S3Instructions.java
Outdated
Show resolved
Hide resolved
extensions/s3/src/main/java/io/deephaven/extensions/s3/S3OutputStream.java
Outdated
Show resolved
Hide resolved
extensions/s3/src/main/java/io/deephaven/extensions/s3/S3OutputStream.java
Outdated
Show resolved
Hide resolved
extensions/s3/src/main/java/io/deephaven/extensions/s3/S3OutputStream.java
Outdated
Show resolved
Hide resolved
extensions/s3/src/main/java/io/deephaven/extensions/s3/S3OutputStream.java
Outdated
Show resolved
Hide resolved
extensions/s3/src/main/java/io/deephaven/extensions/s3/S3OutputStream.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Py LGTM
Util/channel/src/main/java/io/deephaven/util/channel/LocalFSChannelProvider.java
Outdated
Show resolved
Hide resolved
Util/channel/src/main/java/io/deephaven/util/channel/CompletableOutputStream.java
Outdated
Show resolved
Hide resolved
Util/channel/src/main/java/io/deephaven/util/channel/CompletableOutputStream.java
Outdated
Show resolved
Hide resolved
Util/channel/src/main/java/io/deephaven/util/channel/CompletableOutputStream.java
Outdated
Show resolved
Hide resolved
Util/channel/src/main/java/io/deephaven/util/channel/CompletableOutputStream.java
Outdated
Show resolved
Hide resolved
...ckedfile/src/main/java/io/deephaven/extensions/trackedfile/CompletableLocalOutputStream.java
Outdated
Show resolved
Hide resolved
...ckedfile/src/main/java/io/deephaven/extensions/trackedfile/CompletableLocalOutputStream.java
Outdated
Show resolved
Hide resolved
...ckedfile/src/main/java/io/deephaven/extensions/trackedfile/CompletableLocalOutputStream.java
Outdated
Show resolved
Hide resolved
...ckedfile/src/main/java/io/deephaven/extensions/trackedfile/CompletableLocalOutputStream.java
Outdated
Show resolved
Hide resolved
...ckedfile/src/main/java/io/deephaven/extensions/trackedfile/CompletableLocalOutputStream.java
Outdated
Show resolved
Hide resolved
Util/channel/src/main/java/io/deephaven/util/channel/CompletableOutputStream.java
Outdated
Show resolved
Hide resolved
extensions/s3/src/main/java/io/deephaven/extensions/s3/S3CompletableOutputStream.java
Outdated
Show resolved
Hide resolved
extensions/s3/src/main/java/io/deephaven/extensions/s3/S3CompletableOutputStream.java
Outdated
Show resolved
Hide resolved
Util/channel/src/main/java/io/deephaven/util/channel/CompletableOutputStream.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was a shallower-than-normal review for purpose of expediency. I can dig in further to specific areas if we think there is value.
extensions/s3/src/main/java/io/deephaven/extensions/s3/S3CompletableOutputStream.java
Show resolved
Hide resolved
extensions/s3/src/main/java/io/deephaven/extensions/s3/S3CompletableOutputStream.java
Show resolved
Hide resolved
extensions/s3/src/main/java/io/deephaven/extensions/s3/S3CompletableOutputStream.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: did not review.
Labels indicate documentation is required. Issues for documentation have been opened: Community: deephaven/deephaven-docs-community#294 |
Added a new
OutputStream
to write to S3 and moved all parquet writing code from using SeekableByteChannels to OutputStreams.