@InterfaceAudience.Private @InterfaceStability.Evolving public class FsDelegationToken extends Object
Modifier and Type | Field and Description |
---|---|
private org.apache.hadoop.fs.FileSystem |
fs |
private boolean |
hasForwardedToken |
private static org.slf4j.Logger |
LOG |
private String |
renewer |
private UserProvider |
userProvider |
private org.apache.hadoop.security.token.Token<?> |
userToken |
Constructor and Description |
---|
FsDelegationToken(UserProvider userProvider,
String renewer) |
Modifier and Type | Method and Description |
---|---|
void |
acquireDelegationToken(org.apache.hadoop.fs.FileSystem fs)
Acquire the delegation token for the specified filesystem.
|
void |
acquireDelegationToken(String tokenKind,
org.apache.hadoop.fs.FileSystem fs)
Acquire the delegation token for the specified filesystem and token kind.
|
org.apache.hadoop.fs.FileSystem |
getFileSystem() |
String |
getRenewer()
Returns the account name that is allowed to renew the token.
|
UserProvider |
getUserProvider() |
org.apache.hadoop.security.token.Token<?> |
getUserToken()
Returns the delegation token acquired, or null in case it was not acquired
|
void |
releaseDelegationToken()
Releases a previously acquired delegation token.
|
private static final org.slf4j.Logger LOG
private final UserProvider userProvider
private boolean hasForwardedToken
private org.apache.hadoop.security.token.Token<?> userToken
private org.apache.hadoop.fs.FileSystem fs
public FsDelegationToken(UserProvider userProvider, String renewer)
public void acquireDelegationToken(org.apache.hadoop.fs.FileSystem fs) throws IOException
fs
- the filesystem that requires the delegation tokenIOException
- on fs.getDelegationToken() failurepublic void acquireDelegationToken(String tokenKind, org.apache.hadoop.fs.FileSystem fs) throws IOException
tokenKind
- non-null token kind to get delegation token from the UserProvider
fs
- the filesystem that requires the delegation tokenIOException
- on fs.getDelegationToken() failurepublic void releaseDelegationToken()
public UserProvider getUserProvider()
public String getRenewer()
public org.apache.hadoop.security.token.Token<?> getUserToken()
public org.apache.hadoop.fs.FileSystem getFileSystem()
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.