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


##########
flink-runtime/src/main/java/org/apache/flink/runtime/minicluster/MiniCluster.java:
##########
@@ -424,12 +424,21 @@ public void start() throws Exception {
 
                 heartbeatServices = 
HeartbeatServices.fromConfiguration(configuration);
 
-                delegationTokenManager =
-                        
configuration.getBoolean(SecurityOptions.KERBEROS_FETCH_DELEGATION_TOKEN)
-                                        && 
HadoopDependency.isHadoopCommonOnClasspath(
-                                                getClass().getClassLoader())
-                                ? new 
KerberosDelegationTokenManager(configuration)
-                                : new NoOpDelegationTokenManager();
+                if 
(configuration.getBoolean(SecurityOptions.KERBEROS_FETCH_DELEGATION_TOKEN)) {
+                    if 
(HadoopDependency.isHadoopCommonOnClasspath(getClass().getClassLoader())) {
+                        delegationTokenManager =
+                                new KerberosDelegationTokenManager(
+                                        configuration,
+                                        
commonRpcService.getScheduledExecutor(),
+                                        ioExecutor);
+                    } else {
+                        LOG.info(
+                                "Cannot use kerberos delegation token manager 
because Hadoop cannot be found in the Classpath.");
+                        delegationTokenManager = new 
NoOpDelegationTokenManager();
+                    }
+                } else {
+                    delegationTokenManager = new NoOpDelegationTokenManager();
+                }

Review Comment:
   `KerberosDelegationTokenManagerFactory` added.



##########
flink-runtime/src/main/java/org/apache/flink/runtime/security/token/KerberosDelegationTokenManager.java:
##########
@@ -45,10 +56,28 @@ public class KerberosDelegationTokenManager implements 
DelegationTokenManager {
 
     private final Configuration configuration;
 
+    private final SecurityConfiguration securityConfiguration;
+
+    private final KerberosRenewalPossibleProvider 
kerberosRenewalPossibleProvider;
+
     @VisibleForTesting final Map<String, DelegationTokenProvider> 
delegationTokenProviders;
 
-    public KerberosDelegationTokenManager(Configuration configuration) {
+    private final ScheduledExecutor scheduledExecutor;
+
+    private final ExecutorService executorService;
+
+    private ScheduledFuture<?> tgtRenewalFuture;

Review Comment:
   Fixed.



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