public ElasticsearchSink<T> build() {
            if (dirtySinkHelper.getDirtySink() != null) {
                failureHandler = new DirtySinkFailureHandler();
            }
            return new ElasticsearchSink<>(
                    bulkRequestsConfig,
                    httpHosts,
                    elasticsearchSinkFunction,
                    failureHandler,
                    restClientFactory,
                    inlongMetric,
                    dirtySinkHelper,
                    auditHostAndPorts,
                    multipleSink);
        }
Creates the Elasticsearch sink.
Use {@link DirtySinkFailureHandler} when need sink dirty data

@return the created Elasticsearch sink.
inlong-sort/sort-flink/sort-flink-v1.13/sort-connectors/elasticsearch-6/src/main/java/org/apache/inlong/sort/elasticsearch6/ElasticsearchSink.java