Interface DelegationTokenReceiver
-
- All Known Implementing Classes:
AbstractS3DelegationTokenReceiver
,HadoopDelegationTokenReceiver
,HadoopFSDelegationTokenReceiver
,HBaseDelegationTokenReceiver
,S3HadoopDelegationTokenReceiver
,S3PrestoDelegationTokenReceiver
@Experimental public interface DelegationTokenReceiver
Delegation token receiver API. Instances ofDelegationTokenReceiver
s are loaded both on JobManager and TaskManager side through service loader. Basically the implementation of this interface is responsible to receive the serialized form of tokens produced byDelegationTokenProvider
.
-
-
Field Summary
Fields Modifier and Type Field Description static String
CONFIG_PREFIX
Config prefix of receivers.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
init(Configuration configuration)
Called to initialize receiver after construction.void
onNewTokensObtained(byte[] tokens)
Callback function when new delegation tokens obtained.default String
serviceConfigPrefix()
Config prefix of the service.String
serviceName()
Name of the service to receive delegation tokens for.
-
-
-
Field Detail
-
CONFIG_PREFIX
static final String CONFIG_PREFIX
Config prefix of receivers.- See Also:
- Constant Field Values
-
-
Method Detail
-
serviceName
String serviceName()
Name of the service to receive delegation tokens for. This name should be unique and the same as the one provided in the correspondingDelegationTokenProvider
.
-
serviceConfigPrefix
default String serviceConfigPrefix()
Config prefix of the service.
-
init
void init(Configuration configuration) throws Exception
Called to initialize receiver after construction.- Parameters:
configuration
- Configuration to initialize the receiver.- Throws:
Exception
-
onNewTokensObtained
void onNewTokensObtained(byte[] tokens) throws Exception
Callback function when new delegation tokens obtained.- Parameters:
tokens
- Serialized form of delegation tokens. Must be deserialized the reverse way which is implemented inDelegationTokenProvider
.- Throws:
Exception
-
-