Source:
<code>private void deployUnallocatedJobModules() throws Exception { List<ModuleDeploymentRequestsPath> requestedModulesPaths = getAllModuleDeploymentRequests(); CuratorFramework client = getClient(); boolean delay = true; for (ChildData data : jobDeployments.getCurrentData()) { String jobName = ZooKeeperUtils.stripPathConverter.convert(data); Job job = DeploymentLoader.loadJob(client, jobName, this.jobFactory); if (job != null) { List<ModuleDeploymentRequestsPath> requestedModules = ModuleDeploymentRequestsPath.getModulesForDeploymentUnit( requestedModulesPaths, jobName); Set<String> previouslyDeployed = new HashSet<String>(); try { for (String deployedModule : client.getChildren().forPath(Paths.build(data.getPath(), Paths.MODULES))) { previouslyDeployed.add(Paths.stripPath(new JobDeploymentsPath(Paths.build(data.getPath(), Paths.MODULES, deployedModule)).getModuleInstanceAsString())); } } <START> catch (KeeperException.NoNodeException e) { <END> } for (ModuleDeploymentRequestsPath path : requestedModules) { ModuleDescriptor moduleDescriptor = job.getJobModuleDescriptor(); if (shouldDeploy(moduleDescriptor, path, previouslyDeployed)) { if (delay) { Thread.sleep(3000); delay = false; } RuntimeModuleDeploymentProperties moduleDeploymentProperties = new RuntimeModuleDeploymentProperties(); moduleDeploymentProperties.putAll(ZooKeeperUtils.bytesToMap( moduleDeploymentRequests.getCurrentData(path.build()).getData())); redeployModule(new ModuleDeployment(job, moduleDescriptor, moduleDeploymentProperties), true); } } } } }</code><technical_language>I ignore NoNodeException Stream/JobDeploymentListeners created modules node stream/job deployments path DeploymentSupervisor initiates time deployments for stream/job</technical_language>

Target:
private void deployUnallocatedJobModules() throws Exception { List<ModuleDeploymentRequestsPath> requestedModulesPaths = getAllModuleDeploymentRequests(); CuratorFramework client = getClient(); boolean delay = true; for (ChildData data : jobDeployments.getCurrentData()) { String jobName = ZooKeeperUtils.stripPathConverter.convert(data); Job job = DeploymentLoader.loadJob(client, jobName, this.jobFactory); if (job != null) { List<ModuleDeploymentRequestsPath> requestedModules = ModuleDeploymentRequestsPath.getModulesForDeploymentUnit( requestedModulesPaths, jobName); Set<String> previouslyDeployed = new HashSet<String>(); for (String deployedModule : client.getChildren().forPath(Paths.build(data.getPath(), Paths.MODULES))) { previouslyDeployed.add(Paths.stripPath(new JobDeploymentsPath(Paths.build(data.getPath(), Paths.MODULES, deployedModule)).getModuleInstanceAsString())); } for (ModuleDeploymentRequestsPath path : requestedModules) { ModuleDescriptor moduleDescriptor = job.getJobModuleDescriptor(); if (shouldDeploy(moduleDescriptor, path, previouslyDeployed)) { if (delay) { Thread.sleep(3000); delay = false; } RuntimeModuleDeploymentProperties moduleDeploymentProperties = new RuntimeModuleDeploymentProperties(); moduleDeploymentProperties.putAll(ZooKeeperUtils.bytesToMap( moduleDeploymentRequests.getCurrentData(path.build()).getData())); redeployModule(new ModuleDeployment(job, moduleDescriptor, moduleDeploymentProperties), true); } } } } }