Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Make ai.rapids.cudf.HostMemoryBuffer#copyFromStream public. #17179
Make ai.rapids.cudf.HostMemoryBuffer#copyFromStream public. #17179
Changes from 1 commit
5049de6
fecbdc1
403e302
093a066
eadea60
151c8a3
9ad5f54
648940c
b697b3f
c4ae34b
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
First off this is not closing the iterator. This is closing all of the values that the iterator holds. So at a minimum I would like it if we changed the name to
closeAll
, or something like that.Second an Iterator has no guarantee that you are looping over actual values. It can lazily generate values or things like that.
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.
Fixed, I have changed method name to
closeAll
.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 has the same problems as the Iterator API, but worse. An
Iterable
is typically aCollection
or something like that. If that collection is AutoClosable thenclose
is now ambiguous. Do we want to close the collection itself or do we want to close the things in that collection. This needs to be calledcloseAll
at least. I would also prefer it if we switched this toCollection
instead ofIterable
, unless there is a specific use case where we want an Iterable that is not a Collection.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.
Fixed, renamed to
closeAll
and useCollection
.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.
Please update the docs so that it is clear that an EOFException is thrown if the InputStream does not include enough bytes to do the copy. Also it would really be nice if we could include a message with the EOFException to indicate what happened.
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.
Fixed.