presto-main/src/main/java/io/prestosql/execution/SqlTaskManager.java/SqlTaskManager/addStateChangeListener
class SqlTaskManager:    @Override
    public void addStateChangeListener(TaskId taskId, StateChangeListener<TaskState> stateChangeListener)
    {
        requireNonNull(taskId, "taskId is null");
        tasks.getUnchecked(taskId).addStateChangeListener(stateChangeListener);
    }