@Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        RestartRequest that = (RestartRequest) o;
        return onlyFailed == that.onlyFailed && includeTasks == that.includeTasks && Objects.equals(connectorName, that.connectorName);
    }
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