rmatharu commented on a change in pull request #1152: SAMZA-2319: [1/2]
Simplify Container Allocation logic
URL: https://github.com/apache/samza/pull/1152#discussion_r328402835
##########
File path:
samza-core/src/main/java/org/apache/samza/clustermanager/AbstractContainerAllocator.java
##########
@@ -35,20 +36,51 @@
/**
* {@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
+ * <ul>
+ * <li>
+ * In case of host-affinity enabled, each request ({@link
SamzaResourceRequest} contains a processorId which
+ * identifies the processor the request is for and a "preferredHost" which
is determined by the locality mappings
+ * in the coordinator stream
+ * </li>
+ * <li>
+ * This thread periodically periodically matches outstanding resource
requests with allocated resources.
+ * Its period is controlled using the {@code allocatorSleepIntervalMs}
parameter
+ * </li>
+ * <li>
+ * In case of host-affinity is enabled, the resource-request's
preferredHost param is set to the host the processor
+ * was last seen on
+ * </li>
+ * <li>
+ * In case of host-affinity us disabled, the resource-request's
preferredHost param is set to {@link ResourceRequestState#ANY_HOST}
Review comment:
If host-affinity is disabled
----------------------------------------------------------------
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