presto-main/src/main/java/io/prestosql/server/remotetask/TaskInfoFetcher.java/TaskInfoFetcher/isDone
class TaskInfoFetcher:    private static boolean isDone(TaskInfo taskInfo)
    {
        return taskInfo.getTaskStatus().getState().isDone();
    }