@Override public List<Token<?>> getDelegationTokens(String renewer) throws IOException { return myFs.getDelegationTokens(renewer); } }
@Override // AbstractFileSystem public List<Token<?>> getDelegationTokens(String renewer) throws IOException { return myFs.getDelegationTokens(renewer); }
@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; }
/** * Get delegation tokens for the file systems accessed for a given * path. * @param p Path for which delegations tokens are requested. * @param renewer the account name that is allowed to renew the token. * @return List of delegation tokens. * @throws IOException */ @InterfaceAudience.LimitedPrivate( { "HDFS", "MapReduce" }) public List<Token<?>> getDelegationTokens( Path p, String renewer) throws IOException { Set<AbstractFileSystem> afsSet = resolveAbstractFileSystems(p); List<Token<?>> tokenList = new ArrayList<Token<?>>(); for (AbstractFileSystem afs : afsSet) { List<Token<?>> afsTokens = afs.getDelegationTokens(renewer); tokenList.addAll(afsTokens); } return tokenList; }
@Override public List<Token<?>> getDelegationTokens(String renewer) throws IOException { return myFs.getDelegationTokens(renewer); } }
@Override // AbstractFileSystem public List<Token<?>> getDelegationTokens(String renewer) throws IOException { return myFs.getDelegationTokens(renewer); }
@Override public List<Token<?>> getDelegationTokens(String renewer) throws IOException { return myFs.getDelegationTokens(renewer); } }
@Override public List<Token<?>> getDelegationTokens(String renewer) throws IOException { return myFs.getDelegationTokens(renewer); } }
@Override public List<Token<?>> getDelegationTokens(String renewer) throws IOException { return myFs.getDelegationTokens(renewer); } }
@Override // AbstractFileSystem public List<Token<?>> getDelegationTokens(String renewer) throws IOException { return myFs.getDelegationTokens(renewer); }
@Override // AbstractFileSystem public List<Token<?>> getDelegationTokens(String renewer) throws IOException { return myFs.getDelegationTokens(renewer); }
@Override // AbstractFileSystem public List<Token<?>> getDelegationTokens(String renewer) throws IOException { return myFs.getDelegationTokens(renewer); }
@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; }
@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; }
@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; }
@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; }
/** * Get delegation tokens for the file systems accessed for a given * path. * @param p Path for which delegations tokens are requested. * @param renewer the account name that is allowed to renew the token. * @return List of delegation tokens. * @throws IOException */ @InterfaceAudience.LimitedPrivate( { "HDFS", "MapReduce" }) public List<Token<?>> getDelegationTokens( Path p, String renewer) throws IOException { Set<AbstractFileSystem> afsSet = resolveAbstractFileSystems(p); List<Token<?>> tokenList = new ArrayList<Token<?>>(); for (AbstractFileSystem afs : afsSet) { List<Token<?>> afsTokens = afs.getDelegationTokens(renewer); tokenList.addAll(afsTokens); } return tokenList; }
/** * Get delegation tokens for the file systems accessed for a given * path. * @param p Path for which delegations tokens are requested. * @param renewer the account name that is allowed to renew the token. * @return List of delegation tokens. * @throws IOException */ @InterfaceAudience.LimitedPrivate( { "HDFS", "MapReduce" }) public List<Token<?>> getDelegationTokens( Path p, String renewer) throws IOException { Set<AbstractFileSystem> afsSet = resolveAbstractFileSystems(p); List<Token<?>> tokenList = new ArrayList<Token<?>>(); for (AbstractFileSystem afs : afsSet) { List<Token<?>> afsTokens = afs.getDelegationTokens(renewer); tokenList.addAll(afsTokens); } return tokenList; }
/** * Get delegation tokens for the file systems accessed for a given * path. * @param p Path for which delegations tokens are requested. * @param renewer the account name that is allowed to renew the token. * @return List of delegation tokens. * @throws IOException */ @InterfaceAudience.LimitedPrivate( { "HDFS", "MapReduce" }) public List<Token<?>> getDelegationTokens( Path p, String renewer) throws IOException { Set<AbstractFileSystem> afsSet = resolveAbstractFileSystems(p); List<Token<?>> tokenList = new ArrayList<Token<?>>(); for (AbstractFileSystem afs : afsSet) { List<Token<?>> afsTokens = afs.getDelegationTokens(renewer); tokenList.addAll(afsTokens); } return tokenList; }
@Test(timeout = 300000) public void testHdfsGetCanonicalServiceName() throws Exception { Configuration conf = dfs.getConf(); URI haUri = HATestUtil.getLogicalUri(cluster); AbstractFileSystem afs = AbstractFileSystem.createFileSystem(haUri, conf); String haService = HAUtil.buildTokenServiceForLogicalUri(haUri, HdfsConstants.HDFS_URI_SCHEME).toString(); assertEquals(haService, afs.getCanonicalServiceName()); Token<?> token = afs.getDelegationTokens( UserGroupInformation.getCurrentUser().getShortUserName()).get(0); assertEquals(haService, token.getService().toString()); // make sure the logical uri is handled correctly token.renew(conf); token.cancel(conf); }