private void verifyClientConnection()

in flink-connector-opensearch/src/main/java/org/apache/flink/streaming/connectors/opensearch/OpensearchSink.java [437:449]


    private void verifyClientConnection(RestHighLevelClient client) throws IOException {
        if (LOG.isInfoEnabled()) {
            LOG.info("Pinging Opensearch cluster via hosts {} ...", httpHosts);
        }

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

        if (LOG.isInfoEnabled()) {
            LOG.info("Opensearch RestHighLevelClient is connected to {}", httpHosts.toString());
        }
    }