Sanil15 commented on a change in pull request #1376:
URL: https://github.com/apache/samza/pull/1376#discussion_r436994854
##########
File path:
samza-core/src/main/java/org/apache/samza/clustermanager/container/placement/ContainerPlacementRequestAllocator.java
##########
@@ -50,14 +51,33 @@
* RunId of the app
*/
private final String appRunId;
-
+ /**
+ * Sleep time for container placement handler thread
+ */
+ private final int clusterManagerContainerPlacementHandlerSleepMs;
public ContainerPlacementRequestAllocator(ContainerPlacementMetadataStore
containerPlacementMetadataStore, ContainerProcessManager manager,
ApplicationConfig config) {
Preconditions.checkNotNull(containerPlacementMetadataStore,
"containerPlacementMetadataStore cannot be null");
Preconditions.checkNotNull(manager, "ContainerProcessManager cannot be
null");
this.containerProcessManager = manager;
this.containerPlacementMetadataStore = containerPlacementMetadataStore;
this.isRunning = true;
this.appRunId = config.getRunId();
+ this.clusterManagerContainerPlacementHandlerSleepMs =
DEFAULT_CLUSTER_MANAGER_CONTAINER_PLACEMENT_HANDLER_SLEEP_MS;
+ }
+
+ @VisibleForTesting
+ /**
+ * Should only get used for testing, cannot make it package private because
end to end integeration test
+ * need package private methods which live in org.apache.samza.clustermanager
+ */
+ public ContainerPlacementRequestAllocator(ContainerPlacementMetadataStore
containerPlacementMetadataStore, ContainerProcessManager manager,
ApplicationConfig config, int clusterManagerContainerPlacementHandlerSleepMs) {
Review comment:
Did not wanna introduce new config for this
----------------------------------------------------------------
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]