hive
hive copied to clipboard
HIVE-23745: Avoid copying userpayload in task communicator
What changes were proposed in this pull request?
Copy of user payload take a few milliseconds sometimes. This delay adds up for all tasks of a single vertex in LlapTaskCommunicator as it processes tasks one by one. User payload never changes in this codepath. Copy used to be made because of limitations of Protobuf library. Protobuf added a UnsafeByteOperations class that avoid copying of ByteBuffers in 3.1 version. This can be resolved now since Protobuf has been upgraded.
Why are the changes needed?
To reduce query startup latency by removing unneeded copying of ByteBuffers.
Does this PR introduce any user-facing change?
No
How was this patch tested?
Unit and integration tests
Thanks, @abstractdog!








