Building DataFlow Applications in Java : Composing an Application : Creating a Logical Graph
 
Share this page                  
Creating a Logical Graph
To compose a DataFlow application, you must create a LogicalGraph. The graph is allowed to add operators during composition. To create a graph, invoke any of the available methods in the LogicalGraphFactory. In the previous example in Java, the following line provides creating the logical graph.
// Create an empty logical graph LogicalGraph graph =
LogicalGraphFactory.newLogicalGraph("SimpleApp ");
An application name can be optionally provided to the created LogicalGraph. By default, the name is app. The name is available in the logs in profiling views and serialized versions of applications.
After a LogicalGraph is created, you can add operators to it and use the graph to connect ports to the operators.