public interface LogicalGraph extends OperatorComposable, PropertyValued
A LogicalGraph
requires an EngineConfig
describing the execution environment and options for
execution. These settings effect how the graph is executed (distributed vs. pseudo-distributed) and
the degree of parallelism.
A LogicalGraph
is created using the factory methods found in LogicalGraphFactory
.
Modifier and Type | Method and Description |
---|---|
void |
addCompilationListener(GraphCompilationListener listener)
Adds a listener to listen for compilation events.
|
LogicalGraphInstance |
compile()
Creates an executable instance of the logical graph.
|
LogicalGraphInstance |
compile(EngineConfig config)
Creates an executable instance of the logical graph.
|
String |
getName()
Returns the name of the graph.
|
void |
removeCompilationListener(GraphCompilationListener listener)
Removes a listener that was added via
addCompilationListener(GraphCompilationListener) . |
LogicalGraphInstance |
run()
Creates an instance of the logical graph and executes it
synchronously.
|
LogicalGraphInstance |
run(EngineConfig config)
Creates an instance of the logical graph and executes it
synchronously.
|
void |
setName(String name)
Sets the name of the graph.
|
LogicalGraphInstanceView |
validate()
Performs validation but does not return an executable graph.
|
LogicalGraphInstanceView |
validate(EngineConfig config)
Performs validation but does not return an executable graph.
|
add, add, add, connect
getProperty, getProperty, setProperty, setProperty
LogicalGraphInstanceView validate()
MetadataCalculationContext#getCompilationLevel()
will
be set to CompilationLevel#VALIDATE
so that operators can avoid certain expensive operations.LogicalGraphInstanceView validate(EngineConfig config)
MetadataCalculationContext#getCompilationLevel()
will
be set to CompilationLevel#VALIDATE
so that operators can avoid certain expensive operations.config
- the engine config to use when validating the graph. This may be needed for validation
in some cases since it may determine user credentials, etc.LogicalGraphInstance compile()
DROperatorException
- if errors occur while compiling the graph.LogicalGraphInstance compile(EngineConfig config)
config
- the engine configuration with which to compile and execute the graphDROperatorException
- if errors occur while compiling the graph.LogicalGraphInstance run()
Invoking run()
is equivalent to calling compile()
, then
calling run()
on the returned LogicalGraphInstance
.
DROperatorException
- if errors occur while running or compiling the graphLogicalGraphInstance run(EngineConfig config)
Invoking run()
is equivalent to calling compile()
, then
calling run()
on the returned LogicalGraphInstance
.
config
- the engine configuration with which to compile and execute the graphDROperatorException
- if errors occur while running or compiling the graphString getName()
LogicalGraphFactory.newLogicalGraph(String)
.void setName(String name)
name
- the name of the graphvoid addCompilationListener(GraphCompilationListener listener)
compile()
. Any listeners that were registered
at the point in time that the graph way compiled will be registered for the
lifetime of the compilation/execution of that graph.listener
- the listenervoid removeCompilationListener(GraphCompilationListener listener)
addCompilationListener(GraphCompilationListener)
.listener
- the listenerCopyright © 2020 Actian Corporation. All rights reserved.