[ 
https://issues.apache.org/jira/browse/HDFS-17650?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17894567#comment-17894567
 ] 

ASF GitHub Bot commented on HDFS-17650:
---------------------------------------

KeeProMise commented on code in PR #7139:
URL: https://github.com/apache/hadoop/pull/7139#discussion_r1824401831


##########
hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/protocolPB/AsyncRpcProtocolPBUtil.java:
##########
@@ -96,6 +102,38 @@ public static <T, R> R asyncIpcClient(
     return asyncReturn(clazz);
   }
 
+  public static <T> void asyncRouterServer(ServerReq<T> req, ServerRes<T> res) 
{
+    final ProtobufRpcEngineCallback2 callback =
+        ProtobufRpcEngine2.Server.registerForDeferredResponse2();
+
+    CompletableFuture<Object> completableFuture =
+        CompletableFuture.completedFuture(null);
+    completableFuture.thenCompose(o -> {

Review Comment:
   It's better to add some comments



##########
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/protocolPB/RefreshUserMappingsProtocolServerSideTranslatorPB.java:
##########
@@ -32,12 +32,12 @@
 public class RefreshUserMappingsProtocolServerSideTranslatorPB implements 
RefreshUserMappingsProtocolPB {
 
   private final RefreshUserMappingsProtocol impl;
-  
-  private final static RefreshUserToGroupsMappingsResponseProto 
+
+  protected final static RefreshUserToGroupsMappingsResponseProto 
   VOID_REFRESH_USER_GROUPS_MAPPING_RESPONSE =
       RefreshUserToGroupsMappingsResponseProto.newBuilder().build();
 
-  private final static RefreshSuperUserGroupsConfigurationResponseProto
+  protected final static RefreshSuperUserGroupsConfigurationResponseProto
   VOID_REFRESH_SUPERUSER_GROUPS_CONFIGURATION_RESPONSE = 

Review Comment:
   Hi, @hfutatzhanghb thanks for your contribution! It is recommended not to 
modify common because the pipeline will run for a long time. There are only 2 
variables here, you can copy them directly to 
RouterRefreshUserMappingsProtocolServerSideTranslatorPB





>  [ARR] The router server-side rpc protocol PB supports asynchrony.
> ------------------------------------------------------------------
>
>                 Key: HDFS-17650
>                 URL: https://issues.apache.org/jira/browse/HDFS-17650
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>            Reporter: farmmamba
>            Assignee: farmmamba
>            Priority: Major
>              Labels: pull-request-available
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to