You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2023/01/17 08:23:00 UTC

[GitHub] [beam] EgbertW commented on a diff in pull request #25024: Add withDefaultHeaders to connection configuration for ElasticsearchIO

EgbertW commented on code in PR #25024:
URL: https://github.com/apache/beam/pull/25024#discussion_r1071892453


##########
sdks/java/io/elasticsearch/src/main/java/org/apache/beam/sdk/io/elasticsearch/ElasticsearchIO.java:
##########
@@ -514,6 +521,8 @@ public ConnectionConfiguration withApiKey(String apiKey) {
 
     /**
      * If Elasticsearch authentication is enabled, provide a bearer token.
+     * Be aware that you can only use one of {@Code withApiToken()}, {@code withBearerToken()} and
+     * {@code withDefaultHeaders} at the same time, as they will override eachother.

Review Comment:
   There is but I didn't add it because the same issue was already lurking with just `withApiKey` and `withBearerToken`. I added checks to all three methods now to check that only one is used at a time - see my last update.



-- 
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.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org