XComp commented on code in PR #21604:
URL: https://github.com/apache/flink/pull/21604#discussion_r1062636835


##########
flink-runtime/src/main/java/org/apache/flink/runtime/security/token/DefaultDelegationTokenManager.java:
##########
@@ -118,10 +133,13 @@ private Map<String, DelegationTokenProvider> 
loadProviders() {
                             provider.serviceName());
                 }
             } catch (Exception | NoClassDefFoundError e) {
-                LOG.warn(
+                // The intentional general rule is that if a provider's init 
method throws exception
+                // then stop the workload
+                LOG.error(
                         "Failed to initialize delegation token provider {}",
                         provider.serviceName(),
                         e);
+                throw new RuntimeException(e);

Review Comment:
   Shouldn't we do either logging or throwing the exception and if we decide to 
throw the exception, adding the log message as the error message might be 
useful. :thinking: `FlinkRuntimeException` might be useful since it indicates 
that the exception was actually initiated by Flink code. ...just as an idea.



##########
flink-runtime/src/main/java/org/apache/flink/runtime/security/token/DefaultDelegationTokenManager.java:
##########
@@ -58,6 +59,13 @@
 @Internal
 public class DefaultDelegationTokenManager implements DelegationTokenManager {
 
+    private static final String PROVIDER_RECEIVER_INCONSISTENCY_ERROR =
+            " There is an inconsistency between loaded delegation token 
providers and receivers. "

Review Comment:
   ```suggestion
               "There is an inconsistency between loaded delegation token 
providers and receivers. "
   ```



-- 
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: issues-unsubscr...@flink.apache.org

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

Reply via email to