mbalassi commented on code in PR #22420:
URL: https://github.com/apache/flink/pull/22420#discussion_r1170863184
##########
flink-runtime/src/main/java/org/apache/flink/runtime/security/token/DefaultDelegationTokenManager.java:
##########
@@ -203,6 +211,21 @@ static void checkProviderAndReceiverConsistency(
LOG.info("Provider and receiver instances are consistent");
}
+ @VisibleForTesting
+ static void checkSamePrefixedProviders(
+ Map<String, DelegationTokenProvider> providers, List<String>
warnings) {
+ Set<String> providerPrefixes = new HashSet<>();
+ for (String name : providers.keySet()) {
+ String[] split = name.split("-");
+ if (!providerPrefixes.add(split[0])) {
+ String msg =
+ String.format(
+ "Multiple providers loaded with the same
prefix: %s", split[0]);
Review Comment:
Let us add a bit more context to this, I like this message as the beginning
but let us also add:
`Please consider using only one of the following providers: <list of
clashing providerNames>, the current configuration might lead to unintended
consequences.`
We should also add some content to the flink docs about these unintended
consequences. :)
--
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]