rickyma commented on code in PR #2098:
URL:
https://github.com/apache/incubator-uniffle/pull/2098#discussion_r1743970411
##########
common/src/main/java/org/apache/uniffle/common/util/GrpcNettyUtils.java:
##########
@@ -64,4 +68,13 @@ public static PooledByteBufAllocator
createPooledByteBufAllocatorWithSmallCacheO
return createPooledByteBufAllocator(
preferDirect, true, numCores, pageSize, maxOrder, smallCacheSize, -1);
}
+
+ public static synchronized ByteBufAllocator getSharedPooledByteBufAllocator(
+ int pageSize, int maxOrder, int smallCacheSize) {
+ if (allocator == null) {
+ allocator =
+ GrpcNettyUtils.createPooledByteBufAllocator(true, 0, pageSize,
maxOrder, smallCacheSize);
Review Comment:
Just call `createPooledByteBufAllocator` directly, no need to call
`GrpcNettyUtils.createPooledByteBufAllocator`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]