Skip to content

Commit c996ef6

Browse files
author
slfan1989
committed
YARN-11212. Fix CheckStyle.
1 parent f151b88 commit c996ef6

File tree

1 file changed

+10
-13
lines changed
  • hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/webapp

1 file changed

+10
-13
lines changed

hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/webapp/FederationInterceptorREST.java

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ public Response createNewApplication(HttpServletRequest hsr)
282282
.entity(e.getLocalizedMessage()).build();
283283
}
284284

285-
List<SubClusterId> blacklist = new ArrayList<SubClusterId>();
285+
List<SubClusterId> blacklist = new ArrayList<>();
286286

287287
for (int i = 0; i < numSubmitRetries; ++i) {
288288

@@ -295,7 +295,7 @@ public Response createNewApplication(HttpServletRequest hsr)
295295
.entity(e.getLocalizedMessage()).build();
296296
}
297297

298-
LOG.debug("getNewApplication try #{} on SubCluster {}", i, subClusterId);
298+
LOG.debug("getNewApplication try #{} on SubCluster {}.", i, subClusterId);
299299

300300
DefaultRequestInterceptorREST interceptor =
301301
getOrCreateInterceptorForSubCluster(subClusterId,
@@ -304,7 +304,7 @@ public Response createNewApplication(HttpServletRequest hsr)
304304
try {
305305
response = interceptor.createNewApplication(hsr);
306306
} catch (Exception e) {
307-
LOG.warn("Unable to create a new ApplicationId in SubCluster {}",
307+
LOG.warn("Unable to create a new ApplicationId in SubCluster {}.",
308308
subClusterId.getId(), e);
309309
}
310310

@@ -424,7 +424,7 @@ public Response submitApplication(ApplicationSubmissionContextInfo newApp,
424424
.build();
425425
}
426426

427-
List<SubClusterId> blacklist = new ArrayList<SubClusterId>();
427+
List<SubClusterId> blacklist = new ArrayList<>();
428428

429429
for (int i = 0; i < numSubmitRetries; ++i) {
430430

@@ -441,7 +441,7 @@ public Response submitApplication(ApplicationSubmissionContextInfo newApp,
441441
.entity(e.getLocalizedMessage())
442442
.build();
443443
}
444-
LOG.info("submitApplication appId {} try #{} on SubCluster {}",
444+
LOG.info("submitApplication appId {} try #{} on SubCluster {}.",
445445
applicationId, i, subClusterId);
446446

447447
ApplicationHomeSubCluster appHomeSubCluster =
@@ -482,7 +482,7 @@ public Response submitApplication(ApplicationSubmissionContextInfo newApp,
482482
.build();
483483
}
484484
if (subClusterId == subClusterIdInStateStore) {
485-
LOG.info("Application {} already submitted on SubCluster {}",
485+
LOG.info("Application {} already submitted on SubCluster {}.",
486486
applicationId, subClusterId);
487487
} else {
488488
routerMetrics.incrAppsFailedSubmitted();
@@ -712,8 +712,7 @@ public AppsInfo call() {
712712

713713
if (rmApps == null) {
714714
routerMetrics.incrMultipleAppsFailedRetrieved();
715-
LOG.error("Subcluster {} failed to return appReport.",
716-
info.getSubClusterId());
715+
LOG.error("Subcluster {} failed to return appReport.", info.getSubClusterId());
717716
return null;
718717
}
719718
return rmApps;
@@ -873,8 +872,7 @@ private Map<SubClusterInfo, NodeInfo> getNode(
873872
subclusterId, subcluster.getRMWebServiceAddress());
874873
return interceptor.getNode(nodeId);
875874
} catch (Exception e) {
876-
LOG.error("Subcluster {} failed to return nodeInfo.",
877-
subclusterId);
875+
LOG.error("Subcluster {} failed to return nodeInfo.", subclusterId, e);
878876
return null;
879877
}
880878
});
@@ -958,7 +956,7 @@ public NodesInfo getNodes(String states) {
958956
try {
959957
subClustersActive = getActiveSubclusters();
960958
} catch (Exception e) {
961-
LOG.error("Cannot get nodes: {}", e.getMessage());
959+
LOG.error("Cannot get nodes: {}", e.getMessage(), e);
962960
return new NodesInfo();
963961
}
964962

@@ -977,8 +975,7 @@ public NodesInfo call() {
977975
NodesInfo nodesInfo = interceptor.getNodes(states);
978976
return nodesInfo;
979977
} catch (Exception e) {
980-
LOG.error("Subcluster {} failed to return nodesInfo.",
981-
info.getSubClusterId());
978+
LOG.error("Subcluster {} failed to return nodesInfo.", info.getSubClusterId(), e);
982979
return null;
983980
}
984981
}

0 commit comments

Comments
 (0)