kannan created FLINK-11346:
------------------------------
Summary: Could not enable basic authentication with elastic search connector
Key: FLINK-11346
URL:
https://issues.apache.org/jira/browse/FLINK-11346 Project: Flink
Issue Type: Bug
Components: ElasticSearch Connector
Reporter: kannan
Hello Team,
I am trying to add elasticsearch as sink and my current elasticsearch has enabled SSL and Basic authentication.
I could not connect to elasticsearch with basic authentication.
===========
code:
val credentialsProvider = new BasicCredentialsProvider
credentialsProvider.setCredentials(AuthScope.ANY, new UsernamePasswordCredentials("user", "password"))
esSinkBuilder.setRestClientFactory(
restClientBuilder -> {
restClientBuilder.setHttpClientConfigCallback(new RestClientBuilder.HttpClientConfigCallback()
{ override def customizeHttpClient(httpClientBuilder: HttpAsyncClientBuilder) = httpClientBuilder .setDefaultCredentialsProvider(credentialsProvider) }
)
}
)
===========
Error Log:
Error:(70, 7) not found: value restClientBuilder
restClientBuilder -> {
Application version used
scala - 2.11
flink - 1.7
elasticsearch - 6.5
elasticsearch connector version - 2.11
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)