Package azkaban.workflow.flow

Examples of azkaban.workflow.flow.FlowNode


   *
   * @param id
   * @param dependency
   */
  public void addDependencies(String id, List<String> dependency) {
    FlowNode node = flowItems.get(id);
    if (node == null) {
      node = new FlowNode(id);
      flowItems.put(id, node);
    }

    if (node.getDependencies() != null) {
      errorMessages.add("Job " + id + " has multiple dependency entries in this flow.");
    }
    HashSet<String> set = new HashSet<String>();
    set.addAll(dependency);
    node.setDependencies(set);
   
    // Go through the node's dependencies and add the node as a dependent.
    for (String dep: dependency) {
      if (dep.equals(id)) {
        errorMessages.add("Job " + id + " has defined itself as a dependency.");
        continue;
      }
     
      FlowNode parentNode = flowItems.get(dep);
      if (parentNode == null) {
        parentNode = new FlowNode(dep);
        flowItems.put(dep, parentNode);
      }
      parentNode.addDependent(id);
    }
  }
View Full Code Here


  public FlowNode getFlowNode(String alias) {
    return flowItems.get(alias);
  }
   
  public void setNodeProps(String id, Props prop) {
    FlowNode node = flowItems.get(id);
   
    if (node == null) {
      node = new FlowNode(id);
      flowItems.put(id, node);
    }
   
    node.setProps(prop);
  }
View Full Code Here

TOP

Related Classes of azkaban.workflow.flow.FlowNode

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.