org.apache.hadoop.hbase.security.token
Class FsDelegationToken
java.lang.Object
org.apache.hadoop.hbase.security.token.FsDelegationToken
@InterfaceAudience.Private
@InterfaceStability.Evolving
public class FsDelegationToken
- extends Object
Helper class to obtain a filesystem delegation token.
Mainly used by Map-Reduce jobs that requires to read/write data to
a remote file-system (e.g. BulkLoad, ExportSnapshot).
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FsDelegationToken
public FsDelegationToken(UserProvider userProvider,
String renewer)
acquireDelegationToken
public void acquireDelegationToken(org.apache.hadoop.fs.FileSystem fs)
throws IOException
- Acquire the delegation token for the specified filesytem.
Before requesting a new delegation token, tries to find one already available.
- Parameters:
fs
- the filesystem that requires the delegation token
- Throws:
IOException
- on fs.getDelegationToken() failure
releaseDelegationToken
public void releaseDelegationToken()
- Releases a previously acquired delegation token.
getUserProvider
public UserProvider getUserProvider()
getRenewer
public String getRenewer()
- Returns:
- the account name that is allowed to renew the token.
getUserToken
public org.apache.hadoop.security.token.Token<?> getUserToken()
- Returns:
- the delegation token acquired, or null in case it was not acquired
getFileSystem
public org.apache.hadoop.fs.FileSystem getFileSystem()
Copyright © 2007–2016 The Apache Software Foundation. All rights reserved.