Interface DelegationTokenReceiver


  • @Experimental
    public interface DelegationTokenReceiver
    Delegation token receiver API. Instances of DelegationTokenReceivers 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.
    • 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 corresponding DelegationTokenProvider.
      • 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 in DelegationTokenProvider.
        Throws:
        Exception