[ 
https://issues.apache.org/jira/browse/GOBBLIN-1728?focusedWorklogId=819260&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-819260
 ]

ASF GitHub Bot logged work on GOBBLIN-1728:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 21/Oct/22 20:08
            Start Date: 21/Oct/22 20:08
    Worklog Time Spent: 10m 
      Work Description: ZihanLi58 commented on code in PR #3586:
URL: https://github.com/apache/gobblin/pull/3586#discussion_r1002141059


##########
gobblin-yarn/src/main/java/org/apache/gobblin/yarn/YarnService.java:
##########
@@ -394,8 +397,8 @@ protected void shutDown() throws IOException {
       if (!this.containerMap.isEmpty()) {
         synchronized (this.allContainersStopped) {
           try {
-            // Wait 5 minutes for the containers to stop

Review Comment:
   Keep this comment?



##########
gobblin-yarn/src/main/java/org/apache/gobblin/yarn/YarnService.java:
##########
@@ -789,11 +815,17 @@ private ImmutableMap.Builder<String, String> 
buildContainerStatusEventMetadata(C
 
   /**
    * Get the number of matching container requests for the specified resource 
memory and cores.
+   * Due to YARN-1902, this API is not 100% accurate. However, {@link 
AMRMClientCallbackHandler#onContainersAllocated(List)}
+   * contains logic for best effort clean up of duplicate requests, and in 
practice is pretty accurate.
    */
   private int getMatchingRequestsCount(Resource resource) {
     int priorityNum = resourcePriorityMap.getOrDefault(resource.toString(), 0);
     Priority priority = Priority.newInstance(priorityNum);
-    return getAmrmClientAsync().getMatchingRequests(priority, 
ResourceRequest.ANY, resource).size();
+    List<? extends Collection> outstandingRequests = 
getAmrmClientAsync().getMatchingRequests(priority, ResourceRequest.ANY, 
resource);

Review Comment:
   Can we add this context that "API returns a list of collections, where each 
collection is the requests partitioned by the node ID" into comment?





Issue Time Tracking
-------------------

    Worklog Id:     (was: 819260)
    Time Spent: 4.5h  (was: 4h 20m)

> Yarn Service requests too many containers due to improper calculation
> ---------------------------------------------------------------------
>
>                 Key: GOBBLIN-1728
>                 URL: https://issues.apache.org/jira/browse/GOBBLIN-1728
>             Project: Apache Gobblin
>          Issue Type: New Feature
>            Reporter: Matthew Ho
>            Priority: Major
>          Time Spent: 4.5h
>  Remaining Estimate: 0h
>
> Yarn Service is responsible for calculating the number of instances based on 
> the helix tasks. Yarn service tracks the number of instances by asking Yarn 
> for the number of resource requests and the number of allocated containers.
>  
> It uses this count to determine if it should ask for more containers or 
> shrink the number of containers. This calculation is currently done 
> improperly and we continue to request containers when we have enough 
> requested.



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

Reply via email to