[ 
https://issues.apache.org/jira/browse/YARN-11236?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17576087#comment-17576087
 ] 

ASF GitHub Bot commented on YARN-11236:
---------------------------------------

slfan1989 commented on code in PR #4711:
URL: https://github.com/apache/hadoop/pull/4711#discussion_r939449057


##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/federation/policies/router/AbstractRouterPolicy.java:
##########
@@ -98,7 +99,16 @@ protected Map<SubClusterId, SubClusterInfo> 
prefilterSubClusters(
 
     // if a reservation exists limit scope to the sub-cluster this
     // reservation is mapped to
-    // TODO: Implemented in YARN-11236
+    if (reservationId != null) {
+      // note this might throw YarnException if the reservation is
+      // unknown. This is to be expected, and should be handled by
+      // policy invoker.
+      SubClusterId resSubCluster = 
getPolicyContext().getFederationStateStoreFacade().

Review Comment:
   Thank you very much for your help reviewing the code, I will fix it.



##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/federation/policies/router/AbstractRouterPolicy.java:
##########
@@ -98,7 +99,16 @@ protected Map<SubClusterId, SubClusterInfo> 
prefilterSubClusters(
 
     // if a reservation exists limit scope to the sub-cluster this
     // reservation is mapped to
-    // TODO: Implemented in YARN-11236
+    if (reservationId != null) {
+      // note this might throw YarnException if the reservation is
+      // unknown. This is to be expected, and should be handled by
+      // policy invoker.
+      SubClusterId resSubCluster = 
getPolicyContext().getFederationStateStoreFacade().
+          getReservationHomeSubCluster(reservationId);
+
+      return Collections.singletonMap(resSubCluster, 
activeSubClusters.get(resSubCluster));

Review Comment:
    I will fix it.





> Implement FederationReservationHomeSubClusterStore With MemoryStore
> -------------------------------------------------------------------
>
>                 Key: YARN-11236
>                 URL: https://issues.apache.org/jira/browse/YARN-11236
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: federation
>    Affects Versions: 3.4.0
>            Reporter: fanshilun
>            Assignee: fanshilun
>            Priority: Major
>              Labels: pull-request-available
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to