-
Notifications
You must be signed in to change notification settings - Fork 25.5k
Description
The Task.Status
returned by the Task.getStatus()
method is overridden and used by persistent tasks to keep their internal state (usually composed of one or more counters for task's progression and a task's specific state). This usage differs from the original purpose of Task.getStatus() which is to provide a quick update of the status of potentially very volatile tasks. The persistent task internal state is also shown in the Task API but I think it should only report progression/stats about the tasks here, while the Cluster State API shows the internal state of persistent tasks as it does today.
We could decorelate AllocatedPersistentTask.getStatus() from Task.Status by introducing a new PersistentTask.State interface and rename AllocatedPersistentTask.getStatus() to something like lastCommitedState().
@martijnvg @bleskes @imotov @polyfractal I'd be happy to have your opinion