Package com.impetus.labs.korus.addons.constructs.pipeline

Examples of com.impetus.labs.korus.addons.constructs.pipeline.Pipeline


    long initialTime, finalTime;
    initialTime = System.currentTimeMillis();

    // Create the object of the pipeline.
    Pipeline pipeline = new Pipeline("pipeline test");

    // Create objects Tasks which extend PipelineTasks
    ReadTask task1 = new ReadTask();
    TransformTask task2 = new TransformTask();
    WriteTask task3 = new WriteTask();

    // Add these tasks to the pipeline
    pipeline.add("readTask", task1);
    pipeline.add("transformTask", task2);
    pipeline.add("writeTask", task3);

    // Join these tasks in order to know the order of execution of the tasks
    pipeline.join(task1, task2);
    pipeline.join(task2, task3);

    // Execute the Pipeline
    pipeline.execute();

    // To wait till execution lasts. Skip this line pipeline.cleanUp()
    // if you do not want to
    // wait for the execution of pipeline to finish.
    pipeline.getResult();

    finalTime = System.currentTimeMillis();
    System.out.println("Time Taken by ParallelRTW: "
        + (finalTime - initialTime));

    // shutdown when task is over
    pipeline.cleanUp();

  }
View Full Code Here

TOP

Related Classes of com.impetus.labs.korus.addons.constructs.pipeline.Pipeline

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.