public class Job extends Object
Constructor and Description |
---|
Job(String jobId)
Initialize a new Job.
|
Modifier and Type | Method and Description |
---|---|
void |
addLink(String sourceElem,
String destElem,
String streamId,
int partitioningScheme)
Adds a link connecting two stream processors/sources.
|
void |
addStreamProcessor(String name,
Class processorClass,
int parallelism)
Adds a new stream processing element to the job.
|
void |
addStreamSource(String name,
Class sourceClass,
int parallelism)
Adds a new stream source to the job.
|
void |
deploy()
Deploy the current job in the Granules runtime.
|
public Job(String jobId)
jobId
- Identifier for the job which should be unique for a given Granules runtime.public void addStreamSource(String name, Class sourceClass, int parallelism) throws StreamingGraphConfigurationException
name
- Identifier of the stream source.sourceClass
- Class object of the Stream Source implementation.parallelism
- Number of instancesStreamingGraphConfigurationException
- In case of duplicate identifier.public void addStreamProcessor(String name, Class processorClass, int parallelism) throws StreamingGraphConfigurationException
name
- Identifier of the processing element.processorClass
- Class object of the stream Processor implementation.parallelism
- Number of instances to runStreamingGraphConfigurationException
- In case of duplicate identifierpublic void addLink(String sourceElem, String destElem, String streamId, int partitioningScheme) throws StreamingGraphConfigurationException
sourceElem
- Source element which can be either a StreamSource
or a
StreamProcessor
destElem
- Destination element which should be a StreamProcessor.StreamingGraphConfigurationException
- Configuration error in the streaming graphpublic void deploy() throws StreamingGraphConfigurationException
StreamingGraphConfigurationException
- Error the definition of the streaming graph.Copyright © 2015. All rights reserved.