@Override
    public void verifyClientConnection(RestHighLevelClient client) throws IOException {
        if (LOGGER.isInfoEnabled()) {
            LOGGER.info("Pinging Elasticsearch cluster via hosts {} ...", httpHosts);
        }

        if (!client.ping(RequestOptions.DEFAULT)) {
            throw new RuntimeException("There are no reachable Elasticsearch nodes!");
        }

        if (LOGGER.isInfoEnabled()) {
            LOGGER.info("Elasticsearch RestHighLevelClient is connected to {}", httpHosts.toString());
        }
    }
The factory to configure the rest client.
inlong-sort/sort-flink/sort-flink-v1.13/sort-connectors/elasticsearch-7/src/main/java/org/apache/inlong/sort/elasticsearch7/Elasticsearch7ApiCallBridge.java