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


##########
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:
   I think this will be the most clean statement for later development. The 
actually existing HBase + HadoopFS providers are exceptional because the're not 
externalized. The problem w/ them is that the provider/receiver is always on 
classpath but HadoopFS/HBase dependency is optional.
   * The temporary solution is to catch no class found exception within the 
provider
   * The long term solution is to externalize both of them
   
   I've added comments in the respective files 
[here](https://github.com/apache/flink/pull/21604/files#r1062455662) and 
[here](https://github.com/apache/flink/pull/21604/files#r1062455873).



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