You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@gobblin.apache.org by GitBox <gi...@apache.org> on 2022/10/21 20:08:16 UTC

[GitHub] [gobblin] ZihanLi58 commented on a diff in pull request #3586: [GOBBLIN-1728] Fix YarnService incorrect container allocation behavior

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?



-- 
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: dev-unsubscribe@gobblin.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org