This check is used when we add a task to pending lists. If the task has any preferred location available (executor / host / rack), we won't add it to pendingTasksWithNoPrefs. Do you mean check for executor and host is redundant?