KarmaGYZ opened a new pull request #12715: URL: https://github.com/apache/flink/pull/12715
…arch connector Co-authored-by: zhisheng17 <[email protected]> ## What is the purpose of the change Support username and password options for new Elasticsearch connector. Note that this PR tries to align the behavior with #11822 , so I add @zhisheng17 as co-auther. ## Brief change log - Add `username` and `password` option to new ES DynamicTableSink. - If both `username` and `password` configured, add a `UsernamePasswordCredentials` to `RestClientBuilder`. ## Verifying this change This change added tests and can be verified as follows: - Elasticsearch7DynamicSinkTest#testAuthConfig - Elasticsearch7DynamicSinkFactoryTest#validateWrongCredential - Elasticsearch6DynamicSinkTest#testAuthConfig - Elasticsearch6DynamicSinkFactoryTest#validateWrongCredential As the authentication logic we used is documented in [ES official doc](https://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/_basic_authentication.html). I think Flink does not need to check it in an e2e test or integration test. However, I'll manually test it and record in this PR ## Does this pull request potentially affect one of the following parts: - Dependencies (does it add or upgrade a dependency): no - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: no - The serializers: no - The runtime per-record code paths (performance sensitive): no - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn/Mesos, ZooKeeper: no - The S3 file system connector: no ## Documentation - Does this pull request introduce a new feature? yes - If yes, how is the feature documented? docs ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected]
