[
https://issues.apache.org/jira/browse/YARN-11479?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17720783#comment-17720783
]
ASF GitHub Bot commented on YARN-11479:
---------------------------------------
slfan1989 commented on code in PR #5631:
URL: https://github.com/apache/hadoop/pull/5631#discussion_r1188140338
##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/federation/store/impl/ZookeeperFederationStateStore.java:
##########
@@ -379,14 +388,27 @@ public GetApplicationHomeSubClusterResponse
getApplicationHomeSubCluster(
long start = clock.getTime();
FederationApplicationHomeSubClusterStoreInputValidator.validate(request);
ApplicationId appId = request.getApplicationId();
- SubClusterId homeSubCluster = getApp(appId);
- if (homeSubCluster == null) {
+ ApplicationHomeSubCluster appHomeSubCluster = getApp(appId);
+ if (appHomeSubCluster == null) {
String errMsg = "Application " + appId + " does not exist";
FederationStateStoreUtils.logAndThrowStoreException(LOG, errMsg);
}
+
+ // Whether the returned result contains context
+ ApplicationSubmissionContext submissionContext =
+ appHomeSubCluster.getApplicationSubmissionContext();
+ boolean containsAppSubmissionContext =
request.getContainsAppSubmissionContext();
Review Comment:
Thanks for your question!
> Why do we need the contains?
`ApplicationSubmissionContext` contains a lot of information. For
performance reasons, if it is not necessary, we will not return this part of
the data. The currently known use of this data is described in YARN-8898 Fix
FederationInterceptor#allocate to set application priority in allocateResponse.
So by default, we do not return this data unless it is stated in the request
that this data is required.
> Wouldn't it just return null?
By default, we return null.
> [Federation] ZookeeperFederationStateStore Support Store ApplicationSubmitData
> ------------------------------------------------------------------------------
>
> Key: YARN-11479
> URL: https://issues.apache.org/jira/browse/YARN-11479
> Project: Hadoop YARN
> Issue Type: Improvement
> Components: federation
> Affects Versions: 3.4.0
> Reporter: Shilun Fan
> Assignee: Shilun Fan
> Priority: Major
> Labels: pull-request-available
>
> Before completing YARN-8898, we need to store ApplicationSubmitData in
> FederationStateStore first, this jira will store ApplicationSubmitData in
> ZookeeperFederationStateStore.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]