rmatharu commented on a change in pull request #1021: Adding writing of
container.metadata file, and moving exception writing logic to
DiagnosticsManager
URL: https://github.com/apache/samza/pull/1021#discussion_r284371301
##########
File path:
samza-core/src/main/java/org/apache/samza/clustermanager/ContainerProcessManager.java
##########
@@ -135,23 +169,9 @@ public ContainerProcessManager(Config config,
SamzaApplicationState state, Metri
log.info("Finished container process manager initialization.");
}
- //for testing
- ContainerProcessManager(Config config, SamzaApplicationState state,
MetricsRegistryMap registry,
- AbstractContainerAllocator allocator, ClusterResourceManager manager) {
- this.state = state;
- this.clusterManagerConfig = new ClusterManagerConfig(config);
- this.jobConfig = new JobConfig(config);
- this.hostAffinityEnabled = clusterManagerConfig.getHostAffinityEnabled();
- this.clusterResourceManager = manager;
- this.metrics = new ContainerProcessManagerMetrics(config, state, registry);
- this.containerAllocator = allocator;
- this.allocatorThread = new Thread(this.containerAllocator, "Container
Allocator Thread");
- this.standbyContainerManager = Optional.empty();
- }
-
//package private, used only in tests
ContainerProcessManager(Config config, SamzaApplicationState state,
MetricsRegistryMap registry,
- ClusterResourceManager resourceManager) {
+ ClusterResourceManager resourceManager,
Optional<AbstractContainerAllocator> allocator) {
Review comment:
Because we have tests that pass in their own allocator, and other tests that
want the CPM to create the allocator, and we had 3 different constructors for
these tests.
----------------------------------------------------------------
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