TaskCoordinator (samza-api 1.9.0-SNAPSHOT API) JavaScript is disabled on your browser. Skip navigation links Overview Package Class Tree Deprecated Index Help Prev Class Next Class Frames No Frames All Classes Summary:  Nested |  Field |  Constr |  Method Detail:  Field |  Constr |  Method org.apache.samza.task Interface TaskCoordinator public interface TaskCoordinator TaskCoordinators are provided to the process methods of StreamTask implementations to allow the user code to request actions from the Samza framework, including committing the current checkpoints to configured org.apache.samza.checkpoint.CheckpointManager or shutting down the task or all tasks within a container. This interface may evolve over time. Nested Class Summary Nested Classes  Modifier and Type Interface and Description static class  TaskCoordinator.RequestScope A task can make requests to the Samza framework while processing messages, such as commit(RequestScope) and shutdown(RequestScope). Method Summary All Methods Instance Methods Abstract Methods  Modifier and Type Method and Description void commit(TaskCoordinator.RequestScope scope) Requests that Samza should write out a checkpoint, from which a task can restart after failure. void shutdown(TaskCoordinator.RequestScope scope) Requests that the container should be shut down. Method Detail commit void commit(TaskCoordinator.RequestScope scope) Requests that Samza should write out a checkpoint, from which a task can restart after failure. If CURRENT_TASK is given, a checkpoint is only written for the current task. If ALL_TASKS_IN_CONTAINER is given, a checkpoint is written for all tasks in the current container. Note that if you also have also configured your job to commit in regular intervals (using the task.commit.ms property), those time-based commits are not affected by calling this method. Any commits you request explicitly are in addition to timer-based commits. You can set task.commit.ms=-1 if you don't want commits to happen automatically. Parameters: scope - Which tasks are being asked to commit. shutdown void shutdown(TaskCoordinator.RequestScope scope) Requests that the container should be shut down. If CURRENT_TASK is given, that indicates a willingness of the current task to shut down. All tasks in the container (including the one that requested shutdown) will continue processing messages. Only when every task in the container has called shutdown(CURRENT_TASK), the container is shut down. Once a task has called shutdown(CURRENT_TASK), it cannot change its mind (i.e. it cannot revoke its willingness to shut down). If ALL_TASKS_IN_CONTAINER is given, the container will shut down immediately after it has finished processing the current message. Any buffers of pending writes are flushed, but no further messages will be processed in this container. Parameters: scope - The approach we should use for shutting down the container. Skip navigation links Overview Package Class Tree Deprecated Index Help Prev Class Next Class Frames No Frames All Classes Summary:  Nested |  Field |  Constr |  Method Detail:  Field |  Constr |  Method