Uma Maheswara Rao G created HADOOP-17239:
--------------------------------------------
Summary: 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
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]