[
https://issues.apache.org/jira/browse/YARN-10885?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17575947#comment-17575947
]
ASF GitHub Bot commented on YARN-10885:
---------------------------------------
slfan1989 commented on code in PR #4701:
URL: https://github.com/apache/hadoop/pull/4701#discussion_r938980459
##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/test/java/org/apache/hadoop/yarn/server/federation/utils/TestFederationStateStoreFacade.java:
##########
@@ -206,4 +206,19 @@ public void testAddApplicationHomeSubCluster() throws
YarnException {
Assert.assertEquals(subClusterId1, result);
}
+ @Test
+ public void testGetApplicationHomeSubClusterCache() throws YarnException {
+ ApplicationId appId = ApplicationId.newInstance(clusterTs, numApps + 1);
+ SubClusterId subClusterId1 = SubClusterId.newInstance("Home1");
+
+ ApplicationHomeSubCluster appHomeSubCluster =
+ ApplicationHomeSubCluster.newInstance(appId, subClusterId1);
+ SubClusterId subClusterIdAdd =
+ facade.addApplicationHomeSubCluster(appHomeSubCluster);
+
+ SubClusterId subClusterIdCache =
facade.getApplicationHomeSubCluster(appId);
+ Assert.assertEquals(subClusterIdCache, subClusterIdAdd);
Review Comment:
I refactored the test for getting objects from Cache. If the test case
enables Cache mode, the comparison will be as follows:
Whether the object obtained directly from the Cache and the object obtained
from the Facade are the same.
> Make FederationStateStoreFacade#getApplicationHomeSubCluster use JCache
> -----------------------------------------------------------------------
>
> Key: YARN-10885
> URL: https://issues.apache.org/jira/browse/YARN-10885
> Project: Hadoop YARN
> Issue Type: Improvement
> Reporter: chaosju
> Assignee: fanshilun
> Priority: Major
> Labels: pull-request-available
> Time Spent: 2h 20m
> Remaining Estimate: 0h
>
> Yarn Client getApplicationReport function may produce lots of zookeeper ops,
> Its import to use the JCache that cache the mapping of application and
> subcluster id.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]