@Experimental public interface DelegationTokenReceiver
DelegationTokenReceiver
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 by DelegationTokenProvider
.Modifier and Type | Field and Description |
---|---|
static String |
CONFIG_PREFIX
Config prefix of receivers.
|
Modifier and Type | Method and 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.
|
static final String CONFIG_PREFIX
String serviceName()
DelegationTokenProvider
.default String serviceConfigPrefix()
void init(Configuration configuration) throws Exception
configuration
- Configuration to initialize the receiver.Exception
void onNewTokensObtained(byte[] tokens) throws Exception
tokens
- Serialized form of delegation tokens. Must be deserialized the reverse way
which is implemented in DelegationTokenProvider
.Exception
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.