-
Notifications
You must be signed in to change notification settings - Fork 2.2k
[Bug] [connectors-v2] The Hadoop Source/Sink fails with Unable to find valid Kerberos Ticket. #7809
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
[Bug] [connectors-v2] The Hadoop Source/Sink fails with Unable to find valid Kerberos Ticket. #7809
Conversation
…d valid Kerberos Ticket.
|
Issue: #7805 |
|
Thanks @shashwatsai ! |
arshadmohammad
left a comment
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.
LGTM +1
|
@Hisoka-X , please review. |
| } catch (IOException e) { | ||
| throw e; | ||
| } catch (SeaTunnelRuntimeException e) { | ||
| throw new SeaTunnelRuntimeException(e.getSeaTunnelErrorCode(), e.getParams()); |
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.
| } catch (IOException e) { | |
| throw e; | |
| } catch (SeaTunnelRuntimeException e) { | |
| throw new SeaTunnelRuntimeException(e.getSeaTunnelErrorCode(), e.getParams()); | |
| } catch (IOException | SeaTunnelRuntimeException e) { | |
| throw e; |
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.
incorporated.
| try { | ||
| return userGroupInformation.doAs(action); | ||
| } catch (InterruptedException e) { | ||
| Thread.currentThread().interrupt(); |
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.
does this necessary?
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.
After catching the InterruptedException, thread's interrupt status is cleared, so we need to re-interrupt the thread, for the task threads to continue. CC: @Hisoka-X
| fileSystem.setWriteChecksum(false); | ||
| } | ||
|
|
||
| private <T> T execute(PrivilegedExceptionAction<T> action) throws IOException { |
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.
Please add some comments about why we need execute method to run action?
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.
Thanks, added the necessary comments.
Hisoka-X
left a comment
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.
LGTM. Thanks @shashwatsai!
liugddx
left a comment
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.
LGTM
…d valid Kerberos Ticket. (apache#7809)
…d valid Kerberos Ticket. (apache#7809)




Purpose of this pull request
The Hadoop Source/Sink fails with Unable to find valid Kerberos Ticket. In HadoopFileSystemProxy, the UserGroupInformation Object is tightly bound to the security context of the initiating thread. If we try to run the privileged actions that require the subject's security context, it fails with the error,
We can attach Security Context of the Specified Subject to the thread Performing Action by using UserGroupInformation#doAs, it attaches the subject's security context for time being till the action is running.
This issue can be reproduced,
Example:
Does this PR introduce any user-facing change?
No
How was this patch tested?
Check list
New License Guide
release-note.