org.apache.hadoop.hdfs.tools
Class DelegationTokenFetcher

java.lang.Object
  extended by org.apache.hadoop.hdfs.tools.DelegationTokenFetcher

@InterfaceAudience.Private
public class DelegationTokenFetcher
extends Object

Fetch a DelegationToken from the current Namenode and store it in the specified file.


Constructor Summary
DelegationTokenFetcher()
           
 
Method Summary
static void cancelDelegationToken(String nnAddr, org.apache.hadoop.security.token.Token<DelegationTokenIdentifier> tok)
          Cancel a Delegation Token.
static org.apache.hadoop.security.Credentials getDTfromRemote(String nnAddr, String renewer)
           
static void main(String[] args)
          Command-line interface
static long renewDelegationToken(String nnAddr, org.apache.hadoop.security.token.Token<DelegationTokenIdentifier> tok)
          Renew a Delegation Token.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DelegationTokenFetcher

public DelegationTokenFetcher()
Method Detail

main

public static void main(String[] args)
                 throws Exception
Command-line interface

Throws:
Exception

getDTfromRemote

public static org.apache.hadoop.security.Credentials getDTfromRemote(String nnAddr,
                                                                     String renewer)
                                                              throws IOException
Throws:
IOException

renewDelegationToken

public static long renewDelegationToken(String nnAddr,
                                        org.apache.hadoop.security.token.Token<DelegationTokenIdentifier> tok)
                                 throws IOException
Renew a Delegation Token.

Parameters:
nnAddr - the NameNode's address
tok - the token to renew
Returns:
the Date that the token will expire next.
Throws:
IOException

cancelDelegationToken

public static void cancelDelegationToken(String nnAddr,
                                         org.apache.hadoop.security.token.Token<DelegationTokenIdentifier> tok)
                                  throws IOException
Cancel a Delegation Token.

Parameters:
nnAddr - the NameNode's address
tok - the token to cancel
Throws:
IOException


Copyright © 2009 The Apache Software Foundation