Github user tzulitai commented on a diff in the pull request: https://github.com/apache/flink/pull/3934#discussion_r117451847 --- Diff: flink-connectors/flink-connector-elasticsearch-base/src/main/java/org/apache/flink/streaming/connectors/elasticsearch/ElasticsearchApiCallBridge.java --- @@ -40,12 +43,27 @@ /** * Creates an Elasticsearch {@link Client}. * + * In comparison to {@link initClient}, this method creates a default {@link Client}. + * * @param clientConfig The configuration to use when constructing the client. * @return The created client. */ Client createClient(Map<String, String> clientConfig); /** + * Initializes an Elasticsearch {@link Client}. + * + * A {@link Settings} object is created, which is passed to {@link mapper} in order to allow the creation of a + * {@link TransportClient}. {@link createClient} creates and initializes a default client for cases where the + * implementation doesn't matter. + * + * @param clientConfig The configuration to use when constructing the client. + * @param mapper Receives a {@link Settings} object that can be used to create a {@link TransportClient}. + * @return The initialized client that has been created by {@link mapper}. + */ + Client initClient(Map<String, String> clientConfig, Function<Settings, TransportClient> mapper); --- End diff -- I wonder if a `TransportClientFactory` would be more intuitive here? That would also solve the Java 8 problem.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---