@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 InputDescriptors, OutputDescriptors and TableDescriptors 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, withProcessorLifecycleListenerFactoryTaskApplicationDescriptor 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 implementationTaskApplicationDescriptorTaskApplicationDescriptor withInputStream(InputDescriptor isd)
isd - the InputDescriptorTaskApplicationDescriptorTaskApplicationDescriptor withOutputStream(OutputDescriptor osd)
osd - the OutputDescriptor of the output streamTaskApplicationDescriptorTaskApplicationDescriptor withTable(TableDescriptor table)
TableDescriptor used in the applicationtable - TableDescriptorTaskApplicationDescriptor