incubator-uniffle
incubator-uniffle copied to clipboard
[Bug] Optimized FileSegmentManagedBuffer.nioByteBuffer to avoid multiple read file
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
Search before asking
- [X] I have searched in the issues and found no similar issues.
Describe the bug
FileSegmentManagedBuffer#nioByteBuffer read file directly without cache at now.
ShuffleDataResult getData()
may read file twice when buffer instanceof FileSegmentManagedBuffer, it‘s not Consistent with NettyManagedBuffer
.
if (buffer.nioByteBuffer().hasArray()) {
return buffer.nioByteBuffer().array();
}
expect: FileSegmentManagedBuffer#nioByteBuffer should add a buffer to hold read file result to avoid multiple read file
Affects Version(s)
master
- [X] Yes I am willing to submit a PR!