gaborgsomogyi commented on code in PR #19825:
URL: https://github.com/apache/flink/pull/19825#discussion_r894259363
##########
flink-runtime/src/main/java/org/apache/flink/runtime/security/token/KerberosDelegationTokenManager.java:
##########
@@ -173,27 +274,95 @@ void startTGTRenewal() throws IOException {
LOG.warn("Error while
renewing TGT", e);
}
}),
- tgtRenewalPeriod,
+ 0,
tgtRenewalPeriod,
TimeUnit.MILLISECONDS);
- LOG.debug("TGT renewal task started and reoccur in {} ms",
tgtRenewalPeriod);
+ LOG.info("TGT renewal task started and reoccur in {} ms",
tgtRenewalPeriod);
} else {
- LOG.debug("TGT renewal task not started");
+ LOG.info("TGT renewal task not started");
}
}
+ @VisibleForTesting
void stopTGTRenewal() {
if (tgtRenewalFuture != null) {
tgtRenewalFuture.cancel(true);
tgtRenewalFuture = null;
}
}
+ @VisibleForTesting
+ void startTokensUpdate() {
+ try {
+ LOG.info("Starting tokens update task");
Review Comment:
This is an internal function and not intended to use from the outside.
In `start` function there is a check:
```
if (!kerberosRenewalPossibleProvider.isRenewalPossible()) {
LOG.info("Renewal is NOT possible, skipping to start renewal
task");
return;
}
```
What started to bother me though is that
`kerberosRenewalPossibleProvider.isRenewalPossible` contains more or less the
same code just like `kerberosLoginProvider.isLoginPossible`.
I think debug messages must be added to
`kerberosLoginProvider.isLoginPossible` and `kerberosRenewalPossibleProvider`
can be deleted as-is. WDYT?
--
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]