[
https://issues.apache.org/jira/browse/FLINK-30929?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17684761#comment-17684761
]
Martijn Visser commented on FLINK-30929:
----------------------------------------
[~kennywgx] Please validate that this is still the case with a supported
version of Flink, especially given that in Flink 1.15 the Elasticsearch
connectors have been ported to new interfaces
https://nightlies.apache.org/flink/flink-docs-release-1.15/release-notes/flink-1.15/#port-elasticsearch-sink-to-new-unified-sink-api-flip-143
> Add helpful message when ElasticsearchSink.Builder.build() throws an
> IllegalArgumentException.
> ----------------------------------------------------------------------------------------------
>
> Key: FLINK-30929
> URL: https://issues.apache.org/jira/browse/FLINK-30929
> Project: Flink
> Issue Type: Improvement
> Components: Connectors / ElasticSearch
> Affects Versions: 1.13.6
> Reporter: Kenny Wu
> Priority: Major
> Attachments: image-2023-02-06-21-28-37-835.png
>
>
> When I test flink-connector-elasticsearch on my project. And *I got an
> IllegalArgumentException with nothing helpful message.*
> *Here's the exception message:*
>
> {code:java}
> Exception in thread "main" java.lang.IllegalArgumentException
> at
> org.apache.flink.util.Preconditions.checkArgument(Preconditions.java:122)
> at
> org.apache.flink.streaming.connectors.elasticsearch7.Elasticsearch7ApiCallBridge.<init>(Elasticsearch7ApiCallBridge.java:61)
> at
> org.apache.flink.streaming.connectors.elasticsearch7.ElasticsearchSink.<init>(ElasticsearchSink.java:74)
> ... {code}
>
> *I could not see which exactly the argument was illegal.*
> After I read the code in (Elasticsearch7ApiCallBridge.java:61), I realized
> that proberbly the ES hosts was empty. And finally fixed it.
> !image-2023-02-06-21-28-37-835.png!
> I think helpful message should be printed when such an important argument is
> illegal and fails to build the connector.
> And I'd love to improve it. thanks
>
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)