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

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

                Author: ASF GitHub Bot
            Created on: 08/May/19 20:18
            Start Date: 08/May/19 20:18
    Worklog Time Spent: 10m 
      Work Description: htran1 commented on pull request #2626: [GOBBLIN-762] 
Add automatic scaling for Gobblin on YARN
URL: https://github.com/apache/incubator-gobblin/pull/2626#discussion_r281849098
 
 

 ##########
 File path: gobblin-yarn/src/main/java/org/apache/gobblin/yarn/YarnService.java
 ##########
 @@ -229,6 +248,21 @@ public void 
handleContainerShutdownRequest(ContainerShutdownRequest containerShu
     }
   }
 
+  /**
+   * Request the Resource Manager to release the container
+   * @param containerReleaseRequest containers to release
+   */
+  @Subscribe
+  public void handleContainerReleaseRequest(ContainerReleaseRequest 
containerReleaseRequest) {
+    for (Container container : containerReleaseRequest.getContainers()) {
+      LOGGER.info(String.format("Releasing container %s running on %s", 
container.getId(), container.getNodeId()));
+
+      // record that this container was explicitly released so that a new one 
is not spawned to replace it
+      this.releasedContainerSet.add(container.getId());
 
 Review comment:
   Added some comments. Also changed the concurrent set to a `Cache` to address 
Kuai's concern of cleanup. That case should be rare, but the Cache will clean 
up after some time if it occurs. The aysnc container operations can interleave 
and the race conditions cannot be avoided since there is no global ordering or 
locking mechanism when interacting with YARN. The auto-scaler should be able to 
get to the desired steady state after several iterations. So if a container 
happens to die and get replaced as the autoscaler decides to release it then in 
a future iteration if the new container is unused then another release request 
will be issued.
 
----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


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

    Worklog Id:     (was: 239456)
    Time Spent: 2h 50m  (was: 2h 40m)

> Add automatic scaling for Gobblin on YARN
> -----------------------------------------
>
>                 Key: GOBBLIN-762
>                 URL: https://issues.apache.org/jira/browse/GOBBLIN-762
>             Project: Apache Gobblin
>          Issue Type: Task
>            Reporter: Hung Tran
>            Priority: Major
>          Time Spent: 2h 50m
>  Remaining Estimate: 0h
>
> Gobblin on YARN needs a way to scale up and down the containers based on the 
> workload.
> Added `YarnAutoScalingManager` which can be started by the 
> `GobblinApplicationMaster` by setting the 
> `gobblin.yarn.app.master.serviceClasses` configuration. This class runs a 
> scheduled task with a default interval of 60 seconds to detect the number of 
> required partitions for the workflows submitted to Helix. It will request the 
> `YarnService` to scale to a computed number of containers. If the requested 
> number of containers is higher than the YarnService has previously requested 
> then it will request more containers. If the requested count is less than the 
> current number of allocated containers then it will free any unused 
> containers.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to