@InterfaceStability.Evolving public interface TaskApplicationDescriptor extends ApplicationDescriptor<TaskApplicationDescriptor>
TaskApplicationDescriptor
contains the description of inputs, outputs, state, configuration and the
processing logic for a Samza Low Level API TaskApplication
.
Use the TaskApplicationDescriptor
obtained from SamzaApplication.describe(S)
to add the InputDescriptor
s, OutputDescriptor
s and TableDescriptor
s for streams and
tables to be used in the task implementation.
Use withTaskFactory(org.apache.samza.task.TaskFactory)
to set the factory for the StreamTask
or
AsyncStreamTask
implementation that contains the processing logic for the TaskApplication
.
Modifier and Type | Method and Description |
---|---|
TaskApplicationDescriptor |
withInputStream(InputDescriptor isd)
Adds the input stream to the application.
|
TaskApplicationDescriptor |
withOutputStream(OutputDescriptor osd)
Adds the output stream to the application.
|
TaskApplicationDescriptor |
withTable(TableDescriptor table)
Adds the
TableDescriptor used in the application |
TaskApplicationDescriptor |
withTaskFactory(TaskFactory factory)
Sets the
StreamTaskFactory or AsyncStreamTaskFactory for the StreamTask or
AsyncStreamTask implementation that contains the processing logic for the TaskApplication . |
getConfig, withApplicationContainerContextFactory, withApplicationTaskContextFactory, withDefaultSystem, withMetricsReporterFactories, withProcessorLifecycleListenerFactory
TaskApplicationDescriptor withTaskFactory(TaskFactory factory)
StreamTaskFactory
or AsyncStreamTaskFactory
for the StreamTask
or
AsyncStreamTask
implementation that contains the processing logic for the TaskApplication
.
The provided taskFactory
instance must be Serializable
.
factory
- the TaskFactory
for the Low Level API Task implementationTaskApplicationDescriptor
TaskApplicationDescriptor withInputStream(InputDescriptor isd)
isd
- the InputDescriptor
TaskApplicationDescriptor
TaskApplicationDescriptor withOutputStream(OutputDescriptor osd)
osd
- the OutputDescriptor
of the output streamTaskApplicationDescriptor
TaskApplicationDescriptor withTable(TableDescriptor table)
TableDescriptor
used in the applicationtable
- TableDescriptor
TaskApplicationDescriptor