public interface TaskContext
StreamTask
, particularly during
initialization in an InitableTask
.Modifier and Type | Method and Description |
---|---|
MetricsRegistry |
getMetricsRegistry() |
SamzaContainerContext |
getSamzaContainerContext() |
java.lang.Object |
getStore(java.lang.String name) |
java.util.Set<SystemStreamPartition> |
getSystemStreamPartitions() |
TaskName |
getTaskName() |
default <T> T |
getUserDefinedContext()
Method to allow user to return customized context
|
void |
setStartingOffset(SystemStreamPartition ssp,
java.lang.String offset)
Set the starting offset for the given
SystemStreamPartition . |
MetricsRegistry getMetricsRegistry()
java.util.Set<SystemStreamPartition> getSystemStreamPartitions()
java.lang.Object getStore(java.lang.String name)
TaskName getTaskName()
SamzaContainerContext getSamzaContainerContext()
void setStartingOffset(SystemStreamPartition ssp, java.lang.String offset)
SystemStreamPartition
. Offsets
can only be set for a SystemStreamPartition
assigned to this task
(as returned by getSystemStreamPartitions()
); trying to set the offset for any other partition
will have no effect.
NOTE: this feature is experimental, and the API may change in a future release.ssp
- SystemStreamPartition
whose offset should be setoffset
- to set for the given SystemStreamPartition
default <T> T getUserDefinedContext()
T
- the type of user-defined task context