slfan1989 opened a new pull request, #5732:
URL: https://github.com/apache/hadoop/pull/5732
<!--
Thanks for sending a pull request!
1. If this is your first time, please read our contributor guidelines:
https://cwiki.apache.org/confluence/display/HADOOP/How+To+Contribute
2. Make sure your PR title starts with JIRA issue id, e.g.,
'HADOOP-17799. Your PR title ...'.
-->
### Description of PR
JIRA: Fix FederationInterceptor#allocate to set application priority in
allocateResponse
In YARN-8898, we store the `ApplicationSubmissionContext` of a Job in the
`FederationStateStore`, and this field can be `null`. However, in NodeManager's
TestFederationInterceptor, the Application is submitted through a mock, which
causes there to be no relationship between the `Application` and
`HomeSubcluster` stored in the `MemoryFederationStateStore`. This does not
affect the execution of the unit test, but the following information will be
printed in the log.
```
2023-06-10 16:08:42,501 ERROR [pool-18-thread-1]
utils.FederationStateStoreFacade
(FederationStateStoreFacade.java:getApplicationSubmissionContext(1006)) -
getApplicationSubmissionContext error, applicationId = application_123456_0001.
org.apache.hadoop.yarn.server.federation.store.exception.FederationStateStoreException:
Application application_123456_0001 does not exist.
at
org.apache.hadoop.yarn.server.federation.store.utils.FederationStateStoreUtils.logAndThrowStoreException(FederationStateStoreUtils.java:172)
at
org.apache.hadoop.yarn.server.federation.store.impl.MemoryFederationStateStore.getApplicationHomeSubCluster(MemoryFederationStateStore.java:294)
at
org.apache.hadoop.yarn.server.federation.utils.FederationStateStoreFacade.getApplicationSubmissionContext(FederationStateStoreFacade.java:1001)
at
org.apache.hadoop.yarn.server.nodemanager.amrmproxy.FederationInterceptor$2.run(FederationInterceptor.java:1283)
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
```
We should avoid such information. In `TestFederationInterceptor#setup`, we
initialize the relationship between `Application` and `HomeSubcluster` to avoid
this issue.
### How was this patch tested?
Junit Test.
### For code changes:
- [ ] Does the title or this PR starts with the corresponding JIRA issue id
(e.g. 'HADOOP-17799. Your PR title ...')?
- [ ] Object storage: have the integration tests been executed and the
endpoint declared according to the connector-specific documentation?
- [ ] If adding new dependencies to the code, are these dependencies
licensed in a way that is compatible for inclusion under [ASF
2.0](http://www.apache.org/legal/resolved.html#category-a)?
- [ ] If applicable, have you updated the `LICENSE`, `LICENSE-binary`,
`NOTICE-binary` files?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]