Package azkaban.flow

Examples of azkaban.flow.IndividualJobExecutableFlow


    private void traverseFlow(HashSet<String> disabledJobs, ExecutableFlow flow) {
      String name = flow.getName();
    System.out.println("at " + name);
      flow.reset();
      if (flow instanceof IndividualJobExecutableFlow && disabledJobs.contains(name)) {
        IndividualJobExecutableFlow individualJob = (IndividualJobExecutableFlow)flow;
        individualJob.setStatus(Status.IGNORED);
        System.out.println("ignore " + name);
      }
      else {
        if (flow instanceof ComposedExecutableFlow) {
            ExecutableFlow innerFlow = ((ComposedExecutableFlow) flow).getDepender();
View Full Code Here


public class IndividualJobEFSerializer implements Function<ExecutableFlow, Map<String, Object>>
{
    @Override
    public Map<String, Object> apply(ExecutableFlow executableFlow)
    {
        IndividualJobExecutableFlow flow = (IndividualJobExecutableFlow) executableFlow;
        Map<String, Object> retVal = new HashMap<String, Object>();

        // "Jobs" should really be first-class, serializable things so that they can be stored
        // along with their execution-specific properties, and stuff.  But, that's a more involved
        // change than I can make right now.
        // TODO MED: Fix the above.
        final String jobName = flow.getName();

        ImmutableMap.Builder<String, Object> jobInfoMapBuilder = ImmutableMap.builder();
       
        jobInfoMapBuilder.put("type", "jobManagerLoaded");
        jobInfoMapBuilder.put("name", jobName);
        jobInfoMapBuilder.put("status", flow.getStatus().toString());
        jobInfoMapBuilder.put("id", flow.getId());
        if (flow.getParentProps() != null) {
            jobInfoMapBuilder.put("overrideProps", flow.getParentProps().getMapByPrefix(""));
        }

        if (flow.getReturnProps() != null) {
            jobInfoMapBuilder.put("returnProps", flow.getReturnProps().getMapByPrefix(""));
        }

        if (flow.getStartTime() != null) {
            jobInfoMapBuilder.put("startTime", flow.getStartTime().toString());
        }

        if (flow.getEndTime() != null) {
            jobInfoMapBuilder.put("endTime", flow.getEndTime().toString());
        }

        retVal.put("jobs", ImmutableMap.<String, Object>of(jobName, jobInfoMapBuilder.build()));
        retVal.put("root", Arrays.asList(jobName));
        retVal.put("dependencies", Collections.<String, Object>emptyMap());
        retVal.put("id", flow.getId());

        return retVal;
    }
View Full Code Here

TOP

Related Classes of azkaban.flow.IndividualJobExecutableFlow

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.