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

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

                Author: ASF GitHub Bot
            Created on: 12/Jun/20 00:36
            Start Date: 12/Jun/20 00:36
    Worklog Time Spent: 10m 
      Work Description: autumnust commented on a change in pull request #3039:
URL: https://github.com/apache/incubator-gobblin/pull/3039#discussion_r439142383



##########
File path: gobblin-yarn/src/main/java/org/apache/gobblin/yarn/YarnService.java
##########
@@ -192,7 +190,7 @@
   // A queue of unused Helix instance names. An unused Helix instance name 
gets put

Review comment:
       Can you fix the comment here? 

##########
File path: gobblin-yarn/src/main/java/org/apache/gobblin/yarn/YarnService.java
##########
@@ -699,7 +700,8 @@ protected void handleContainerCompletion(ContainerStatus 
containerStatus) {
 
       // Add the Helix instance name of the completed container to the queue 
of unused

Review comment:
       Same for the comment here

##########
File path: gobblin-yarn/src/main/java/org/apache/gobblin/yarn/YarnService.java
##########
@@ -753,8 +755,19 @@ public void onContainersAllocated(List<Container> 
containers) {
 
         LOGGER.info(String.format("Container %s has been allocated", 
container.getId()));
 
-        String instanceName = unusedHelixInstanceNames.poll();
-        while (Strings.isNullOrEmpty(instanceName) || 
HelixUtils.isInstanceLive(helixManager, instanceName)) {
+        //Iterate over the (thread-safe) set of unused instances to find the 
first instance that is not currently live.
+        //Once we find a candidate instance, it is removed from the set.
+        String instanceName = null;
+        for (Iterator<String> iterator = unusedHelixInstanceNames.iterator(); 
iterator.hasNext(); ) {

Review comment:
       for loop doesn't seem to fit here but it seems more intuitive to use 
while ? 




----------------------------------------------------------------
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:
us...@infra.apache.org


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

    Worklog Id:     (was: 444654)
    Time Spent: 20m  (was: 10m)

> Reuse Helix instance names when containers are released by Gobblin 
> Application Master
> -------------------------------------------------------------------------------------
>
>                 Key: GOBBLIN-1191
>                 URL: https://issues.apache.org/jira/browse/GOBBLIN-1191
>             Project: Apache Gobblin
>          Issue Type: Improvement
>          Components: gobblin-yarn
>    Affects Versions: 0.15.0
>            Reporter: Sudarshan Vasudevan
>            Assignee: Abhishek Tiwari
>            Priority: Major
>             Fix For: 0.15.0
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> Currently, when containers are released by Gobblin Application Master, the 
> Helix instance names are not released back to the pool of unused instance 
> names. The effect of this is that the number of unique Helix instances keeps 
> growing over time. Since Helix creates one znode per instance, this can 
> result in the number of znodes to grow unboundedly. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to