presto-main/src/main/java/io/prestosql/execution/TaskStateMachine.java/TaskStateMachine/finished
class TaskStateMachine:    public void finished()
    {
        transitionToDoneState(TaskState.FINISHED);
    }