liuml07 commented on a change in pull request #2249:
URL: https://github.com/apache/hadoop/pull/2249#discussion_r477613166
##########
File path:
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/UserGroupInformation.java
##########
@@ -1232,7 +1232,29 @@ public void reloginFromKeytab() throws IOException {
reloginFromKeytab(false);
}
+ /**
+ * Force re-Login a user in from a keytab file irrespective of the last login
+ * time. Loads a user identity from a keytab file and logs them in. They
+ * become the currently logged-in user. This method assumes that
+ * {@link #loginUserFromKeytab(String, String)} had happened already. The
+ * Subject field of this UserGroupInformation object is updated to have the
+ * new credentials.
+ *
+ * @throws IOException
+ * @throws KerberosAuthException on a failure
+ */
+ @InterfaceAudience.Public
+ @InterfaceStability.Evolving
+ public void forceReloginFromKeytab() throws IOException {
+ reloginFromKeytab(false, true);
+ }
+
private void reloginFromKeytab(boolean checkTGT) throws IOException {
+ reloginFromKeytab(checkTGT, false);
+ }
+
+ private void reloginFromKeytab(boolean checkTGT, boolean ignoreTimeElapsed)
Review comment:
nit: add javadoc for this method, OR name `ignoreTimeElapsed` with
`ignoreLastLoginTime` to make it a bit clearer?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]