New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HADOOP-17159. Make UGI support forceful relogin from keytab ignoring the last login time (branch-2.10) #2245
Conversation
💔 -1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
@liuml07 Please review the change for branch-2.10 |
@sguggilam Could you update this PR for p.s. I have updated this PR's description to include relevant information, and linked this PR to the JIRA. |
*/ | ||
@InterfaceAudience.Public | ||
@InterfaceStability.Evolving | ||
public synchronized void reloginFromKeytab(boolean ignoreTimeElapsed) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm thinking of the same problem of the same method signature when potential Hadoop 2 code calling reloginFromKeytab(false)
upgrades to Hadoop 3. Because of the same method name and a bool parameter, users most likely will not notice the parameter value is for different meanings: in Hadoop 2 here, the bool parameter is for ignoreTimeElapsed
where in Hadoop 3 it is actually for checkTGT
.
So is it better to:
- Make this new API
public synchronized void reloginFromKeytab(boolean ignoreTimeElapsed)
private - AND we also add the new API as in Hadoop 3:
public void forceReloginFromKeytab()
.
That way, the application code which forces login will have the same code between Hadoop 2 and 3. And the other new API reloginFromKeytab(boolean)
is private in UGI both in Hadoop 2 and 3.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@liuml07 Yes it makes sense to keep the code consistent for the callers to avoid such issues with a upgrade
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
Will commit after a clean QA.
🎊 +1 overall
This message was automatically generated. |
This is the PR for
branch-2.10
, backporting #2249