Sanil15 commented on a change in pull request #1152: SAMZA-2319: Simplify 
Container Allocation logic
URL: https://github.com/apache/samza/pull/1152#discussion_r327383268
 
 

 ##########
 File path: 
samza-core/src/main/java/org/apache/samza/clustermanager/AbstractContainerAllocator.java
 ##########
 @@ -121,18 +146,101 @@ public void run() {
 
         Thread.sleep(allocatorSleepIntervalMs);
       } catch (InterruptedException e) {
-        log.warn("Got InterruptedException in AllocatorThread.", e);
+        LOG.warn("Got InterruptedException in AllocatorThread.", e);
         Thread.currentThread().interrupt();
       } catch (Exception e) {
-        log.error("Got unknown Exception in AllocatorThread.", e);
+        LOG.error("Got unknown Exception in AllocatorThread.", e);
       }
     }
   }
 
   /**
    * Assigns resources received from the cluster manager to processors.
+   *
+   * During the run() method, the thread sleeps for allocatorSleepIntervalMs 
ms. It then invokes assignResourceRequests,
+   * and tries to allocate any unsatisfied request that is still in the 
request queue {@link ResourceRequestState})
+   * with allocated resources.
+   * When {@code hostAffinityEnabled} is disabled, all allocated resources are 
buffered in the list keyed by "ANY_HOST".
+   * When {@code hostAffinityEnabled} is enabled, all allocated resources are 
buffered in the list keyed by "preferredHost
 
 Review comment:
   Sure made some edits, 
   
   Also "in case a resourceRequest with this hostName was never made, it is 
keyed under ANY." is this the surplus resource case?

----------------------------------------------------------------
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]


With regards,
Apache Git Services

Reply via email to