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 java.lang.Object |
getUserContext()
Gets the user-defined context.
|
void |
setStartingOffset(SystemStreamPartition ssp,
java.lang.String offset)
Set the starting offset for the given
SystemStreamPartition . |
default void |
setUserContext(java.lang.Object context)
Sets the user-defined context.
|
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 void setUserContext(java.lang.Object context)
context
- the user-defined context to setdefault java.lang.Object getUserContext()