From d84cf09763adaaff87c64b795258d81f046ff7b6 Mon Sep 17 00:00:00 2001 From: rickyma Date: Wed, 21 Feb 2024 23:01:18 +0800 Subject: [PATCH] Use rss.rpc.server.type to judge whether Netty is enabled or not --- .../org/apache/uniffle/server/buffer/ShuffleBufferManager.java | 3 ++- .../apache/uniffle/server/netty/ShuffleServerNettyHandler.java | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/server/src/main/java/org/apache/uniffle/server/buffer/ShuffleBufferManager.java b/server/src/main/java/org/apache/uniffle/server/buffer/ShuffleBufferManager.java index 4514669f25..8636706362 100644 --- a/server/src/main/java/org/apache/uniffle/server/buffer/ShuffleBufferManager.java +++ b/server/src/main/java/org/apache/uniffle/server/buffer/ShuffleBufferManager.java @@ -39,6 +39,7 @@ import org.apache.uniffle.common.ShuffleDataResult; import org.apache.uniffle.common.ShufflePartitionedData; +import org.apache.uniffle.common.rpc.ServerType; import org.apache.uniffle.common.rpc.StatusCode; import org.apache.uniffle.common.util.Constants; import org.apache.uniffle.common.util.JavaUtils; @@ -83,7 +84,7 @@ public class ShuffleBufferManager { protected Map> shuffleSizeMap = JavaUtils.newConcurrentMap(); public ShuffleBufferManager(ShuffleServerConf conf, ShuffleFlushManager shuffleFlushManager) { - this.nettyServerEnabled = conf.get(ShuffleServerConf.NETTY_SERVER_PORT) >= 0; + this.nettyServerEnabled = conf.get(ShuffleServerConf.RPC_SERVER_TYPE) == ServerType.GRPC_NETTY; long heapSize = Runtime.getRuntime().maxMemory(); this.capacity = conf.getSizeAsBytes(ShuffleServerConf.SERVER_BUFFER_CAPACITY); if (this.capacity < 0) { diff --git a/server/src/main/java/org/apache/uniffle/server/netty/ShuffleServerNettyHandler.java b/server/src/main/java/org/apache/uniffle/server/netty/ShuffleServerNettyHandler.java index 0162011157..ac8973ecc8 100644 --- a/server/src/main/java/org/apache/uniffle/server/netty/ShuffleServerNettyHandler.java +++ b/server/src/main/java/org/apache/uniffle/server/netty/ShuffleServerNettyHandler.java @@ -137,7 +137,7 @@ public void handleSendShuffleDataRequest(TransportClient client, SendShuffleData + appId + "], shuffleId[" + shuffleId - + "], probably due to the pre-allocated buffer has expired. " + + "], probably because the pre-allocated buffer has expired. " + "Please increase the expiration time using " + ShuffleServerConf.SERVER_PRE_ALLOCATION_EXPIRED.key() + " in ShuffleServer's configuration";