[ 
https://issues.apache.org/jira/browse/FLINK-11346?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16744091#comment-16744091
 ] 

Dawid Wysakowicz commented on FLINK-11346:
------------------------------------------

You should post those kind of question to user mailing list: 
https://flink.apache.org/community.html#mailing-lists

Isn't the problem that you should use `restClientBuilder => ` rather than 
`restClientBuilder ->` as you are writing in scala? 

I will close this ticket, please reach out to mailing list if you need more 
help.

> 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
>            Priority: Blocker
>
> 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)

Reply via email to