You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2023/01/05 16:02:50 UTC

[GitHub] [flink] XComp commented on a diff in pull request #21604: [FLINK-30425][runtime][security] Generalize token receive side

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-unsubscribe@flink.apache.org

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