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 GitBox <gi...@apache.org> on 2022/11/08 17:12:52 UTC
[GitHub] [hadoop] goiri commented on a diff in pull request #4450: YARN-11183. Federation: Remove outdated ApplicationHomeSubCluster in …
goiri commented on code in PR #4450:
URL: https://github.com/apache/hadoop/pull/4450#discussion_r1016907496
##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/federation/store/impl/MemoryFederationStateStore.java:
##########
@@ -242,9 +242,12 @@ public GetApplicationsHomeSubClusterResponse getApplicationsHomeSubCluster(
GetApplicationsHomeSubClusterRequest request) throws YarnException {
List<ApplicationHomeSubCluster> result =
new ArrayList<ApplicationHomeSubCluster>();
+ SubClusterId subClusterId = request.getSubClusterId();
for (Entry<ApplicationId, SubClusterId> e : applications.entrySet()) {
- result
- .add(ApplicationHomeSubCluster.newInstance(e.getKey(), e.getValue()));
+ if (subClusterId == null || subClusterId.equals(e.getValue())) {
+ result.add(
+ ApplicationHomeSubCluster.newInstance(e.getKey(), e.getValue()));
Review Comment:
Can e.getValue() be null?
--
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