/** * Creates a DAG (directed acyclic graph) of tasks to execute in order to perform the cluster job. * * @return Task dag for the cluster operation. */ TaskDag createTaskDag() { long start = System.currentTimeMillis(); TaskDag taskDag = new TaskDag(); List<ProvisionerAction> actionOrder = actions.getActionOrder().get(clusterAction); for (Node node : nodeMap.values()) { if (!shouldPlanNode(node.getId())) { continue; } for (Service service : node.getServices()) { if (!shouldPlanService(service.getName())) { continue; } addDependencies(taskDag, actionOrder, service, node); } } long dur = System.currentTimeMillis() - start; LOG.debug("took {} ms to create action plan.", dur); return taskDag; }
List<ProvisionerAction> taskOrder = actions.getActionOrder().get(task.getClusterAction()); if (taskOrder == null) { throw new IllegalStateException("Not able to get task order for action " + task.getClusterAction());
try { List<ProvisionerAction> actionOrder = actions.getActionOrder().get(clusterAction); if (actionOrder == null) { LOG.error("Cluster action {} does not have any provisioner actions defined", clusterAction);