private int impactRank() {
        if (onlyFailed && !includeTasks) { //restarts only failed connector so least impactful
            return 0;
        } else if (onlyFailed && includeTasks) { //restarts only failed connector and tasks
            return 1;
        } else if (!onlyFailed && !includeTasks) { //restart connector in any state but no tasks
            return 2;
        }
        //onlyFailed==false&&includeTasks  restarts both connector and tasks in any state so highest impact
        return 3;
    }
Determine whether the task instance with the given status is to be restarted.

@param status the task status; may not be null
@return true if the task is to be restarted, or false otherwise
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/RestartRequest.java