Index: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/clientrm/FederationClientInterceptor.java IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/clientrm/FederationClientInterceptor.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/clientrm/FederationClientInterceptor.java --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/clientrm/FederationClientInterceptor.java (revision 40a8b9a6a54181b58d1770dd779d637041a631ce) +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/clientrm/FederationClientInterceptor.java (revision c4fec3243c4083417e99753248bf20da2aedd39d) @@ -412,9 +412,11 @@ for (int i = 0; i < numSubmitRetries; ++i) { SubClusterId subClusterId = policyFacade.getHomeSubcluster( - request.getApplicationSubmissionContext(), blacklist); - LOG.info("submitApplication appId" + applicationId + " try #" + i - + " on SubCluster " + subClusterId); + request.getApplicationSubmissionContext(), blacklist); + if (LOG.isInfoEnabled()) { + LOG.info("submitApplication appId {} try #{} on SubCluster {}", + applicationId, i, subClusterId); + } ApplicationHomeSubCluster appHomeSubCluster = ApplicationHomeSubCluster.newInstance(applicationId, subClusterId); @@ -445,8 +447,8 @@ SubClusterId subClusterIdInStateStore = federationFacade.getApplicationHomeSubCluster(applicationId); if (subClusterId == subClusterIdInStateStore) { - LOG.info("Application " + applicationId - + " already submitted on SubCluster " + subClusterId); + LOG.info("Application {} already submitted on SubCluster {} ", + applicationId, subClusterId); } else { routerMetrics.incrAppsFailedSubmitted(); RouterAuditLogger.logFailure(user.getShortUserName(), @@ -464,14 +466,16 @@ try { response = clientRMProxy.submitApplication(request); } catch (Exception e) { - LOG.warn("Unable to submit the application " + applicationId - + "to SubCluster " + subClusterId.getId(), e); + LOG.warn("Unable to submit the application {} to SubCluster {} error = {}", + applicationId, subClusterId.getId(), e); } if (response != null) { - LOG.info("Application " - + request.getApplicationSubmissionContext().getApplicationName() - + " with appId " + applicationId + " submitted on " + subClusterId); + if (LOG.isInfoEnabled()) { + LOG.info("Application {} with appId {} submitted on {} ", + request.getApplicationSubmissionContext().getApplicationName(), + applicationId, subClusterId); + } long stopTime = clock.getTime(); routerMetrics.succeededAppsSubmitted(stopTime - startTime); RouterAuditLogger.logSuccess(user.getShortUserName(), Index: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/test/java/org/apache/hadoop/yarn/server/router/clientrm/TestFederationClientInterceptor.java IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/test/java/org/apache/hadoop/yarn/server/router/clientrm/TestFederationClientInterceptor.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/test/java/org/apache/hadoop/yarn/server/router/clientrm/TestFederationClientInterceptor.java --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/test/java/org/apache/hadoop/yarn/server/router/clientrm/TestFederationClientInterceptor.java (revision d921e5bc63af4b6a504ab88389792a62a444377a) +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/test/java/org/apache/hadoop/yarn/server/router/clientrm/TestFederationClientInterceptor.java (revision c4fec3243c4083417e99753248bf20da2aedd39d) @@ -167,7 +167,7 @@ */ @Test public void testSubmitApplication() - throws YarnException, IOException, InterruptedException { + throws YarnException, IOException { LOG.info("Test FederationClientInterceptor: Submit Application"); ApplicationId appId = ApplicationId.newInstance(System.currentTimeMillis(),