-
Notifications
You must be signed in to change notification settings - Fork 68
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
Enhance DataWriter to save memory during kudo serialization. #2891
Enhance DataWriter to save memory during kudo serialization. #2891
Conversation
Signed-off-by: Renjie Liu <[email protected]>
Signed-off-by: liurenjie1024 <[email protected]>
build |
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.
LGTM
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.
The changes look fine. I think that there are probably simpler ways to do this, but with the current code where we need to maintain compatibility with the JCUDF Serialization for the time being I think this is okay. It would be nice to have a follow on issue to come back and clean things up when we drop support for jcudf serialization.
Sorry, could you be more specific on this? I'm not sure which part should be clean up. |
Close #2890
reserve
method in DataWriter so that kudo data writer could reserve memory before actual writing happens. This helps avoiding unnecessay allocation and copy.OpenByteArrayOutputStream
and its corresponding data writer.OpenByteArrayOutputStream
could be used in customized shuffle manager to save memory.ByteArrayOutputStreamWriter
which helps saving memory copy without introducing any changes to shuffle manager.