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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to