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


##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/clientrm/DefaultClientRequestInterceptor.java:
##########
@@ -107,25 +109,25 @@
  */
 public class DefaultClientRequestInterceptor
     extends AbstractClientRequestInterceptor {
+  private static final Logger LOG =
+      LoggerFactory.getLogger(DefaultClientRequestInterceptor.class);
   private ApplicationClientProtocol clientRMProxy;
 
   @Override
   public void init(String userName) {
     super.init(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);
-            }
-          });
+      final Configuration conf = this.getConf();
+      clientRMProxy = user.doAs(
+          (PrivilegedExceptionAction<ApplicationClientProtocol>) () ->
+               ClientRMProxy.createRMProxy(conf, 
ApplicationClientProtocol.class));
     } catch (Exception e) {
-      throw new YarnRuntimeException(
-          "Unable to create the interface to reach the YarnRM", e);
+      String message = "Error while creating Router RMClient Service";

Review Comment:
   StringBuilder?



-- 
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-unsubscr...@hadoop.apache.org

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


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

Reply via email to