@InterfaceStability.Evolving public interface SamzaApplication<S extends ApplicationDescriptor>
SamzaApplication
describes the inputs, outputs, state, configuration and the logic for processing data from
one or more streaming sources.
This is the base SamzaApplication
. Implement a StreamApplication
to describe the processing logic
using Samza's High Level API in terms of MessageStream
operators, or a TaskApplication
to describe it
using Samza's Low Level API in terms of per-message processing logic.
A SamzaApplication
implementation must have a no-argument constructor, which will be used by the framework to
create new instances and call describe(ApplicationDescriptor)
.
Per container context may be managed using ApplicationContainerContext
and set using
ApplicationDescriptor.withApplicationContainerContextFactory(org.apache.samza.context.ApplicationContainerContextFactory<?>)
. Similarly, per task context may be managed
using ApplicationTaskContext
and set using ApplicationDescriptor.withApplicationTaskContextFactory(org.apache.samza.context.ApplicationTaskContextFactory<?>)
.
Modifier and Type | Method and Description |
---|---|
void |
describe(S appDescriptor)
Describes the inputs, outputs, state, configuration and processing logic using the provided
appDescriptor . |
void describe(S appDescriptor)
appDescriptor
.appDescriptor
- the ApplicationDescriptor
to use for describing the application.