public ClusterControllerService(final CCConfig config, final ICCApplication application) throws Exception { this.ccConfig = config; this.configManager = ccConfig.getConfigManager(); if (application == null) { throw new IllegalArgumentException("ICCApplication cannot be null"); } this.application = application; File jobLogFolder = new File(ccConfig.getRootDir(), "logs/jobs"); jobLog = new LogFile(jobLogFolder); final INetworkSecurityConfig securityConfig = getNetworkSecurityConfig(); networkSecurityManager = new NetworkSecurityManager(securityConfig); // WorkQueue is in charge of heartbeat as well as other events. workQueue = new WorkQueue("ClusterController", Thread.MAX_PRIORITY); this.timer = new Timer(true); final ClusterTopology topology = computeClusterTopology(ccConfig); ccContext = new ClusterControllerContext(topology); sweeper = new DeadNodeSweeper(); resultDirectoryService = new ResultDirectoryService(ccConfig.getResultTTL(), ccConfig.getResultSweepThreshold()); deploymentRunMap = new HashMap<>(); stateDumpRunMap = new HashMap<>(); threadDumpRunMap = Collections.synchronizedMap(new HashMap<>()); // Node manager is in charge of cluster membership management. nodeManager = new NodeManager(this, ccConfig, resourceManager, application.getGatekeeper()); ccId = ccConfig.getCcId(); jobIdFactory = new JobIdFactory(ccId); deployedJobSpecIdFactory = new DeployedJobSpecIdFactory(); }
(HyracksClientInterfaceFunctions.DeployJobSpecFunction) fn; ccs.getWorkQueue().schedule(new DeployJobSpecWork(ccs, djf.getACGGFBytes(), deployedJobSpecIdFactory.create(), false, new IPCResponder<>(handle, mid))); break; case REDEPLOY_JOB: