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"); }
public void start() { metrics.start(); log.info("Starting Container Process Manager"); clusterResourceManager.start(); log.info("Starting the Samza task manager"); final int containerCount = jobConfig.getContainerCount(); state.containerCount.set(containerCount); state.neededContainers.set(containerCount); // Request initial set of containers Map<String, String> containerToHostMapping = state.jobModelManager.jobModel().getAllContainerLocality(); containerAllocator.requestResources(containerToHostMapping); // Start container allocator thread log.info("Starting the container allocator thread"); allocatorThread.start(); }
public void stop() { log.info("Invoked stop of the Samza container process manager"); // Shutdown allocator thread containerAllocator.stop(); try { allocatorThread.join(); log.info("Stopped container allocator"); } catch (InterruptedException ie) { log.error("Allocator Thread join() threw an interrupted exception", ie); Thread.currentThread().interrupt(); } if (metrics != null) { try { metrics.stop(); log.info("Stopped metrics reporters"); } catch (Throwable e) { log.error("Exception while stopping metrics {}", e); } } try { clusterResourceManager.stop(state.status); log.info("Stopped cluster resource manager"); } catch (Throwable e) { log.error("Exception while stopping cluster resource manager {}", e); } log.info("Finished stop of Container process manager"); }
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"); }
public void start() { metrics.start(); log.info("Starting Container Process Manager"); clusterResourceManager.start(); log.info("Starting the Samza task manager"); final int containerCount = jobConfig.getContainerCount(); state.containerCount.set(containerCount); state.neededContainers.set(containerCount); // Request initial set of containers Map<String, String> containerToHostMapping = state.jobModelManager.jobModel().getAllContainerLocality(); containerAllocator.requestResources(containerToHostMapping); // Start container allocator thread log.info("Starting the container allocator thread"); allocatorThread.start(); }
public void stop() { log.info("Invoked stop of the Samza container process manager"); // Shutdown allocator thread containerAllocator.stop(); try { allocatorThread.join(); log.info("Stopped container allocator"); } catch (InterruptedException ie) { log.error("Allocator Thread join() threw an interrupted exception", ie); Thread.currentThread().interrupt(); } if (metrics != null) { try { metrics.stop(); log.info("Stopped metrics reporters"); } catch (Throwable e) { log.error("Exception while stopping metrics {}", e); } } try { clusterResourceManager.stop(state.status); log.info("Stopped cluster resource manager"); } catch (Throwable e) { log.error("Exception while stopping cluster resource manager {}", e); } log.info("Finished stop of Container process manager"); }
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"); }
public void start() { metrics.start(); log.info("Starting Container Process Manager"); clusterResourceManager.start(); log.info("Starting the Samza task manager"); final int containerCount = jobConfig.getContainerCount(); state.containerCount.set(containerCount); state.neededContainers.set(containerCount); // Request initial set of containers Map<String, String> containerToHostMapping = state.jobModelManager.jobModel().getAllContainerLocality(); containerAllocator.requestResources(containerToHostMapping); // Start container allocator thread log.info("Starting the container allocator thread"); allocatorThread.start(); }
public void stop() { log.info("Invoked stop of the Samza container process manager"); // Shutdown allocator thread containerAllocator.stop(); try { allocatorThread.join(); log.info("Stopped container allocator"); } catch (InterruptedException ie) { log.error("Allocator Thread join() threw an interrupted exception", ie); Thread.currentThread().interrupt(); } if (metrics != null) { try { metrics.stop(); log.info("Stopped metrics reporters"); } catch (Throwable e) { log.error("Exception while stopping metrics {}", e); } } try { clusterResourceManager.stop(state.status); log.info("Stopped cluster resource manager"); } catch (Throwable e) { log.error("Exception while stopping cluster resource manager {}", e); } log.info("Finished stop of Container process manager"); }
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"); }
public void start() { metrics.start(); log.info("Starting Container Process Manager"); clusterResourceManager.start(); log.info("Starting the Samza task manager"); final int containerCount = jobConfig.getContainerCount(); state.containerCount.set(containerCount); state.neededContainers.set(containerCount); // Request initial set of containers Map<String, String> containerToHostMapping = state.jobModelManager.jobModel().getAllContainerLocality(); containerAllocator.requestResources(containerToHostMapping); // Start container allocator thread log.info("Starting the container allocator thread"); allocatorThread.start(); }
public void stop() { log.info("Invoked stop of the Samza container process manager"); // Shutdown allocator thread containerAllocator.stop(); try { allocatorThread.join(); log.info("Stopped container allocator"); } catch (InterruptedException ie) { log.error("Allocator Thread join() threw an interrupted exception", ie); Thread.currentThread().interrupt(); } if (metrics != null) { try { metrics.stop(); log.info("Stopped metrics reporters"); } catch (Throwable e) { log.error("Exception while stopping metrics {}", e); } } try { clusterResourceManager.stop(state.status); log.info("Stopped cluster resource manager"); } catch (Throwable e) { log.error("Exception while stopping cluster resource manager {}", e); } log.info("Finished stop of Container process manager"); }
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"); }
public void start() { metrics.start(); log.info("Starting Container Process Manager"); clusterResourceManager.start(); log.info("Starting the Samza task manager"); final int containerCount = jobConfig.getContainerCount(); state.containerCount.set(containerCount); state.neededContainers.set(containerCount); // Request initial set of containers Map<String, String> containerToHostMapping = state.jobModelManager.jobModel().getAllContainerLocality(); containerAllocator.requestResources(containerToHostMapping); // Start container allocator thread log.info("Starting the container allocator thread"); allocatorThread.start(); }
public void stop() { log.info("Invoked stop of the Samza container process manager"); // Shutdown allocator thread containerAllocator.stop(); try { allocatorThread.join(); log.info("Stopped container allocator"); } catch (InterruptedException ie) { log.error("Allocator Thread join() threw an interrupted exception", ie); Thread.currentThread().interrupt(); } if (metrics != null) { try { metrics.stop(); log.info("Stopped metrics reporters"); } catch (Throwable e) { log.error("Exception while stopping metrics {}", e); } } try { clusterResourceManager.stop(state.status); log.info("Stopped cluster resource manager"); } catch (Throwable e) { log.error("Exception while stopping cluster resource manager {}", e); } log.info("Finished stop of Container process manager"); }
ContainerProcessManager(Config config, SamzaApplicationState state, MetricsRegistryMap registry, ClusterResourceManager resourceManager) { JobModelManager jobModelManager = state.jobModelManager; this.state = state; this.clusterManagerConfig = new ClusterManagerConfig(config); this.jobConfig = new JobConfig(config); this.hostAffinityEnabled = clusterManagerConfig.getHostAffinityEnabled(); this.clusterResourceManager = resourceManager; this.metrics = new ContainerProcessManagerMetrics(config, state, registry); if (this.hostAffinityEnabled) { this.containerAllocator = new HostAwareContainerAllocator(clusterResourceManager, clusterManagerConfig.getContainerRequestTimeout(), config, state); } else { this.containerAllocator = new ContainerAllocator(clusterResourceManager, config, state); } this.allocatorThread = new Thread(this.containerAllocator, "Container Allocator Thread"); log.info("finished initialization of samza task manager"); }
ContainerProcessManager(Config config, SamzaApplicationState state, MetricsRegistryMap registry, ClusterResourceManager resourceManager) { JobModelManager jobModelManager = state.jobModelManager; this.state = state; this.clusterManagerConfig = new ClusterManagerConfig(config); this.jobConfig = new JobConfig(config); this.hostAffinityEnabled = clusterManagerConfig.getHostAffinityEnabled(); this.clusterResourceManager = resourceManager; this.metrics = new ContainerProcessManagerMetrics(config, state, registry); if (this.hostAffinityEnabled) { this.containerAllocator = new HostAwareContainerAllocator(clusterResourceManager, clusterManagerConfig.getContainerRequestTimeout(), config, state); } else { this.containerAllocator = new ContainerAllocator(clusterResourceManager, config, state); } this.allocatorThread = new Thread(this.containerAllocator, "Container Allocator Thread"); log.info("finished initialization of samza task manager"); }
ContainerProcessManager(Config config, SamzaApplicationState state, MetricsRegistryMap registry, ClusterResourceManager resourceManager) { JobModelManager jobModelManager = state.jobModelManager; this.state = state; this.clusterManagerConfig = new ClusterManagerConfig(config); this.jobConfig = new JobConfig(config); this.hostAffinityEnabled = clusterManagerConfig.getHostAffinityEnabled(); this.clusterResourceManager = resourceManager; this.metrics = new ContainerProcessManagerMetrics(config, state, registry); if (this.hostAffinityEnabled) { this.containerAllocator = new HostAwareContainerAllocator(clusterResourceManager, clusterManagerConfig.getContainerRequestTimeout(), config, state); } else { this.containerAllocator = new ContainerAllocator(clusterResourceManager, config, state); } this.allocatorThread = new Thread(this.containerAllocator, "Container Allocator Thread"); log.info("finished initialization of samza task manager"); }
ContainerProcessManager(Config config, SamzaApplicationState state, MetricsRegistryMap registry, ClusterResourceManager resourceManager) { JobModelManager jobModelManager = state.jobModelManager; this.state = state; this.clusterManagerConfig = new ClusterManagerConfig(config); this.jobConfig = new JobConfig(config); this.hostAffinityEnabled = clusterManagerConfig.getHostAffinityEnabled(); this.clusterResourceManager = resourceManager; this.metrics = new ContainerProcessManagerMetrics(config, state, registry); if (this.hostAffinityEnabled) { this.containerAllocator = new HostAwareContainerAllocator(clusterResourceManager, clusterManagerConfig.getContainerRequestTimeout(), config, state); } else { this.containerAllocator = new ContainerAllocator(clusterResourceManager, config, state); } this.allocatorThread = new Thread(this.containerAllocator, "Container Allocator Thread"); log.info("finished initialization of samza task manager"); }
ContainerProcessManager(Config config, SamzaApplicationState state, MetricsRegistryMap registry, ClusterResourceManager resourceManager) { JobModelManager jobModelManager = state.jobModelManager; this.state = state; this.clusterManagerConfig = new ClusterManagerConfig(config); this.jobConfig = new JobConfig(config); this.hostAffinityEnabled = clusterManagerConfig.getHostAffinityEnabled(); this.clusterResourceManager = resourceManager; this.metrics = new ContainerProcessManagerMetrics(config, state, registry); if (this.hostAffinityEnabled) { this.containerAllocator = new HostAwareContainerAllocator(clusterResourceManager, clusterManagerConfig.getContainerRequestTimeout(), config, state); } else { this.containerAllocator = new ContainerAllocator(clusterResourceManager, config, state); } this.allocatorThread = new Thread(this.containerAllocator, "Container Allocator Thread"); log.info("finished initialization of samza task manager"); }