yunqingmoswu commented on code in PR #7558:
URL: https://github.com/apache/inlong/pull/7558#discussion_r1133607256
##########
inlong-sort/sort-connectors/elasticsearch-7/src/main/java/org/apache/inlong/sort/elasticsearch7/table/Elasticsearch7Configuration.java:
##########
@@ -68,4 +69,38 @@ private static HttpHost validateAndParseHostsString(String
host) {
e);
}
}
+
+ public List<HttpHost> getHosts() {
+ return config.get(HOSTS_OPTION).stream()
+ .map(Elasticsearch7Configuration::validateAndParseHostsString)
+ .collect(Collectors.toList());
+ }
+
+ @SuppressWarnings("unchecked")
+ public ActionRequestFailureHandler<DocWriteRequest<?>> getFailureHandler()
{
+ final ActionRequestFailureHandler<DocWriteRequest<?>> failureHandler;
+ String value = config.get(FAILURE_HANDLER_OPTION);
+ switch (value.toUpperCase()) {
+ case "FAIL":
Review Comment:
It is same as the origin handle in flink's elasticsearch connector.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]