public void fail(Throwable cause) {
        synchronized (this) {
            if (this.externalFailure != null)
                return;
            log.error("{} Connector has failed", this, cause);
            this.externalFailure = cause;
            notify();
        }
    }
Fail the connector.
@param cause the cause of the failure; if null, the connector will not be failed
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/WorkerConnector.java