Connecting the Dots
On this page, we will learn how to connect all the pieces we wrote before in this tutorial.
Going back to the Beginning
Let's open up our original HelloWorldPronghorn.java file that contains our main(). If you remember, it looked something like this:
package com.ociweb;
import com.ociweb.pronghorn.pipe.Pipe;
import com.ociweb.pronghorn.stage.scheduling.GraphManager;
import com.ociweb.pronghorn.stage.scheduling.StageScheduler;
public class HelloWorldPronghorn {
public static void main(String[] args) {
//todo: code here
}
}
First, let's create two new methods named populateGraph
and start
:
private static void populateGraph(GraphManager gm) {
}
private static void start(GraphManager gm) {
}
populateGraph
takes aGraphManager
and will be responsible for adding stages and pipes.start
also takes aGraphManager
and will be responsible for starting the scheduler and enabling telemetry if needed.