[
https://issues.apache.org/jira/browse/HADOOP-17239?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17189282#comment-17189282
]
Steve Loughran commented on HADOOP-17239:
-----------------------------------------
you should be returning them in getAdditionalTokenIssuers(), as that allows
recursion into other DT providers (e,g KMS services)
> ViewFs#getDelegationTokens should include fallback fs tokens as well.
> ---------------------------------------------------------------------
>
> Key: HADOOP-17239
> URL: https://issues.apache.org/jira/browse/HADOOP-17239
> Project: Hadoop Common
> Issue Type: Bug
> Components: viewfs
> Reporter: Uma Maheswara Rao G
> Priority: Major
>
>
> getDelegationTokens API is using getMountPoints API and return tokens by
> iterating over.
> But getMountPoints will not include fallbackfs. So, it will miss the tokens
> from fallback fs.
> {code:java}
> @Override
> public List<Token<?>> getDelegationTokens(String renewer) throws IOException {
> List<InodeTree.MountPoint<AbstractFileSystem>> mountPoints =
> fsState.getMountPoints();
> int initialListSize = 0;
> for (InodeTree.MountPoint<AbstractFileSystem> im : mountPoints) {
> initialListSize += im.target.targetDirLinkList.length;
> }
> List<Token<?>> result = new ArrayList<Token<?>>(initialListSize);
> for ( int i = 0; i < mountPoints.size(); ++i ) {
> List<Token<?>> tokens =
> mountPoints.get(i).target.targetFileSystem.getDelegationTokens(renewer);
> if (tokens != null) {
> result.addAll(tokens);
> }
> }
> return result;
> }
> {code}
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]