You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "goiri (via GitHub)" <gi...@apache.org> on 2023/06/21 16:06:48 UTC

[GitHub] [hadoop] goiri commented on a diff in pull request #5752: YARN-11515. [Federation] Improve DefaultRequestInterceptor#init Code.

goiri commented on code in PR #5752:
URL: https://github.com/apache/hadoop/pull/5752#discussion_r1237252214


##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/clientrm/DefaultClientRequestInterceptor.java:
##########
@@ -116,16 +120,15 @@ public void init(String userName) {
     final Configuration conf = this.getConf();
     try {
       clientRMProxy =
-          user.doAs(new PrivilegedExceptionAction<ApplicationClientProtocol>() {
-            @Override
-            public ApplicationClientProtocol run() throws Exception {
-              return ClientRMProxy.createRMProxy(conf,
-                  ApplicationClientProtocol.class);
-            }
-          });
+          user.doAs((PrivilegedExceptionAction<ApplicationClientProtocol>) () ->

Review Comment:
   The readability of the same in DefaultRMAdminRequestInterceptor is better.
   I would split the line with the doAs from the lambda.



-- 
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: common-issues-unsubscribe@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org