public class ArrivingContainerModuleRedeployer extends ModuleRedeployer
ModuleRedeployer
that deploys the unallocated stream/job modules upon a new container arrival.ModuleRedeployer.ModuleDeployment
Modifier and Type | Field and Description |
---|---|
protected org.apache.curator.framework.recipes.cache.PathChildrenCache |
jobDeployments
Cache of children under the job deployment path.
|
protected org.slf4j.Logger |
logger
Logger.
|
jobFactory, moduleDeploymentRequests, streamFactory
Constructor and Description |
---|
ArrivingContainerModuleRedeployer(ZooKeeperConnection zkConnection,
ContainerRepository containerRepository,
StreamFactory streamFactory,
JobFactory jobFactory,
org.apache.curator.framework.recipes.cache.PathChildrenCache streamDeployments,
org.apache.curator.framework.recipes.cache.PathChildrenCache jobDeployments,
org.apache.curator.framework.recipes.cache.PathChildrenCache moduleDeploymentRequests,
ContainerMatcher containerMatcher,
DeploymentUnitStateCalculator stateCalculator)
Constructs
ArrivingContainerModuleRedeployer |
Modifier and Type | Method and Description |
---|---|
protected void |
deployModules(Container container)
Handle the arrival of a container.
|
getAllModuleDeploymentRequests, getClient, instantiateContainerMatcher, logUnwantedRedeployment, redeployModule, updateDeploymentUnitState
protected final org.slf4j.Logger logger
protected final org.apache.curator.framework.recipes.cache.PathChildrenCache jobDeployments
public ArrivingContainerModuleRedeployer(ZooKeeperConnection zkConnection, ContainerRepository containerRepository, StreamFactory streamFactory, JobFactory jobFactory, org.apache.curator.framework.recipes.cache.PathChildrenCache streamDeployments, org.apache.curator.framework.recipes.cache.PathChildrenCache jobDeployments, org.apache.curator.framework.recipes.cache.PathChildrenCache moduleDeploymentRequests, ContainerMatcher containerMatcher, DeploymentUnitStateCalculator stateCalculator)
ArrivingContainerModuleRedeployer
zkConnection
- ZooKeeper connectioncontainerRepository
- the repository to find the containersstreamFactory
- factory to construct Stream
jobFactory
- factory to construct Job
streamDeployments
- cache of children for stream deployments pathjobDeployments
- cache of children for job deployments pathmoduleDeploymentRequests
- cache of children for requested module deployments pathcontainerMatcher
- matches modules to containersstateCalculator
- calculator for stream/job stateprotected void deployModules(Container container) throws java.lang.Exception
deployModules
in class ModuleRedeployer
container
- the arriving containerjava.lang.Exception