This is an automated email from the ASF dual-hosted git repository.

roryqi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-uniffle.git


The following commit(s) were added to refs/heads/master by this push:
     new b36d46102 [MINOR] improvement(client): Override getClientInfo method 
in ShuffleServerGrpcNettyClient and remove unused getDesc method (#1559)
b36d46102 is described below

commit b36d46102b79cdf72b43d8bee9a0d1ea6603729b
Author: RickyMa <[email protected]>
AuthorDate: Thu Mar 7 10:03:55 2024 +0800

    [MINOR] improvement(client): Override getClientInfo method in 
ShuffleServerGrpcNettyClient and remove unused getDesc method (#1559)
    
    ### What changes were proposed in this pull request?
    
    Override the `getClientInfo` method in `ShuffleServerGrpcNettyClient` and 
remove the unused `getDesc` method.
    
    ### Why are the changes needed?
    
    The code is cleaner, and the returned value of `getClientInfo` is more 
accurate.
    
    ### Does this PR introduce _any_ user-facing change?
    
    No.
    
    ### How was this patch tested?
    
    Existing UTs.
---
 .../org/apache/uniffle/client/api/ShuffleServerClient.java    |  2 --
 .../uniffle/client/impl/grpc/ShuffleServerGrpcClient.java     |  5 -----
 .../client/impl/grpc/ShuffleServerGrpcNettyClient.java        | 11 +++++++++++
 3 files changed, 11 insertions(+), 7 deletions(-)

diff --git 
a/internal-client/src/main/java/org/apache/uniffle/client/api/ShuffleServerClient.java
 
b/internal-client/src/main/java/org/apache/uniffle/client/api/ShuffleServerClient.java
index 8be3d67cb..60297ea08 100644
--- 
a/internal-client/src/main/java/org/apache/uniffle/client/api/ShuffleServerClient.java
+++ 
b/internal-client/src/main/java/org/apache/uniffle/client/api/ShuffleServerClient.java
@@ -74,8 +74,6 @@ public interface ShuffleServerClient {
   RssGetInMemoryShuffleDataResponse getInMemoryShuffleData(
       RssGetInMemoryShuffleDataRequest request);
 
-  String getDesc();
-
   void close();
 
   String getClientInfo();
diff --git 
a/internal-client/src/main/java/org/apache/uniffle/client/impl/grpc/ShuffleServerGrpcClient.java
 
b/internal-client/src/main/java/org/apache/uniffle/client/impl/grpc/ShuffleServerGrpcClient.java
index 1dee0ee26..95f092f42 100644
--- 
a/internal-client/src/main/java/org/apache/uniffle/client/impl/grpc/ShuffleServerGrpcClient.java
+++ 
b/internal-client/src/main/java/org/apache/uniffle/client/impl/grpc/ShuffleServerGrpcClient.java
@@ -152,11 +152,6 @@ public class ShuffleServerGrpcClient extends GrpcClient 
implements ShuffleServer
     return blockingStub.withDeadlineAfter(rpcTimeout, TimeUnit.MILLISECONDS);
   }
 
-  @Override
-  public String getDesc() {
-    return "Shuffle server grpc client ref " + host + ":" + port;
-  }
-
   private ShuffleRegisterResponse doRegisterShuffle(
       String appId,
       int shuffleId,
diff --git 
a/internal-client/src/main/java/org/apache/uniffle/client/impl/grpc/ShuffleServerGrpcNettyClient.java
 
b/internal-client/src/main/java/org/apache/uniffle/client/impl/grpc/ShuffleServerGrpcNettyClient.java
index 2097b89f1..fc8aa0272 100644
--- 
a/internal-client/src/main/java/org/apache/uniffle/client/impl/grpc/ShuffleServerGrpcNettyClient.java
+++ 
b/internal-client/src/main/java/org/apache/uniffle/client/impl/grpc/ShuffleServerGrpcNettyClient.java
@@ -85,6 +85,17 @@ public class ShuffleServerGrpcNettyClient extends 
ShuffleServerGrpcClient {
     this.clientFactory = new TransportClientFactory(transportContext);
   }
 
+  @Override
+  public String getClientInfo() {
+    return "ShuffleServerGrpcNettyClient for host["
+        + host
+        + "], port["
+        + port
+        + "], nettyPort["
+        + nettyPort
+        + "]";
+  }
+
   @Override
   public RssSendShuffleDataResponse sendShuffleData(RssSendShuffleDataRequest 
request) {
     Map<Integer, Map<Integer, List<ShuffleBlockInfo>>> shuffleIdToBlocks =

Reply via email to