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

 ##########
 File path: 
samza-core/src/main/java/org/apache/samza/clustermanager/AbstractContainerAllocator.java
 ##########
 @@ -35,20 +35,35 @@
 
 /**
  * {@link AbstractContainerAllocator} makes requests for physical resources to 
the resource manager and also runs
- * a processor on an allocated physical resource. Sub-classes should override 
the assignResourceRequests()
- * method to assign resource requests according to some strategy.
+ * a processor on an allocated physical resource.
  *
- * See {@link ContainerAllocator} and {@link HostAwareContainerAllocator} for 
two such strategies
+ * In case of host-affinity enabled, each request ({@link 
SamzaResourceRequest} encapsulates the identifier of the processor
 
 Review comment:
   Some javadoc nitpicks:
   a. Each ({@link SamzaResourceRequest} contains a processorId which 
identifies the processor the request is for.(regardless of host affinity 
enabled or disabled).
   b. This allocator runs a thread which periodically matches outstanding 
resource requests with allocated resources. Its period is controlled using the 
allocatorSleepIntervalMs parameter.
   c. In case of host-affinity enabled, the resource-request's preferredHost 
param is set to the host the processor was last seen on. In case of 
host-affinity disabled, the resource-request's prefferredHost param is set to 
ANY_HOST enum.
   d. If a resource has not been obtained after CONTAINER_REQUEST_TIMEOUT 
milliseconds of the request being made, the resource is declared expired. There 
are different fallback requests made in the event of an expired requests, based 
on configs?
   
   e. Meta point: The javadoc should always exactly what the code does; not the 
intention, an idea, or motivation behind the class. 

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