Package com.teracloud.streams.topology.context
package com.teracloud.streams.topology.context
Context for executing Streams Java topologies.
Submission/Execution
There are four (primary) mechanisms to submit or execute a Java topology:StreamsContext.Type.DISTRIBUTED- The topology is compiled into a Streams application bundle and submitted to a Streams instance.StreamsContext.Type.BUNDLE- The topology is compiled into a Streams application bundle which can then be submitted to a Streams instance.StreamsContext.Type.STANDALONE- The topology is compiled into a Streams application standalone bundle and executed as a separate child process of the Java virtual machine.StreamsContext.Type.EMBEDDED- The topology is executed using the Java Streams runtime, embedded within the Java virtual machine.
StreamsContext
see StreamsContext.Type.
SPL Compilation and Integration
When a Streams application bundle is produced, then the SPL compilersc is used to produce the bundle (sab file).
The toolkit path for compilation is:
- The generated application toolkit containing the generated SPL code for the topology.
- The com.teracloud.streams.topology toolkit (its location is auto-discovered).
- Toolkits added by
SPL.addToolkit(TopologyElement, File). - The value of the environment variable
STREAMS_SPLPATHif it is set. - The toolkits from the Streams product:
$STREAMS_INSTALL/toolkits.
-
ClassDescriptionProperties that can be specified when submitting the topology to a context.Job properties specific to distributed contexts.Placement directives for a topology element when executing in a distributed runtime.Result properties.A
StreamsContextprovides the ability to turn aTopologyinto an executable.Types of theStreams contextthat aTopologycan be executed against.Factory for creatingStreamsContextinstances.