[ https://issues.apache.org/jira/browse/YARN-11515?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17735802#comment-17735802 ]
ASF GitHub Bot commented on YARN-11515: --------------------------------------- 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. > [Federation] Improve DefaultRequestInterceptor#init Code > -------------------------------------------------------- > > Key: YARN-11515 > URL: https://issues.apache.org/jira/browse/YARN-11515 > Project: Hadoop YARN > Issue Type: Improvement > Components: federation, router > Affects Versions: 3.4.0 > Reporter: Shilun Fan > Assignee: Shilun Fan > Priority: Minor > Labels: pull-request-available > > If we do not enable Federation mode, the YARN Router can also act as a proxy > for the YARN ResourceManager. In this case, we can achieve this functionality > by configuring the DefaultRequestInterceptor. While reading the code, I > found that the Init code could be improved. -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: yarn-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org