Interface DelegationTokenManager

  • All Known Implementing Classes:
    DefaultDelegationTokenManager, NoOpDelegationTokenManager

    @Internal
    public interface DelegationTokenManager
    Manager for delegation tokens in a Flink cluster.

    When delegation token renewal is enabled, this manager will make sure long-running apps can run without interruption while accessing secured services. It must contact all the configured secure services to obtain delegation tokens to be distributed to the rest of the application.

    • Method Detail

      • obtainDelegationTokens

        void obtainDelegationTokens​(DelegationTokenContainer container)
                             throws Exception
        Obtains new tokens in a one-time fashion and leaves it up to the caller to distribute them.
        Throws:
        Exception
      • obtainDelegationTokens

        void obtainDelegationTokens()
                             throws Exception
        Obtains new tokens in a one-time fashion and automatically distributes them to all local JVM receivers.
        Throws:
        Exception
      • start

        void start​(DelegationTokenManager.Listener listener)
            throws Exception
        Creates a re-occurring task which obtains new tokens and automatically distributes them to all receivers (in local JVM as well as in registered task managers too). Task manager distribution must be implemented in the listener logic in order to keep the manager logic clean.
        Throws:
        Exception
      • stop

        void stop()
        Stops re-occurring token obtain task.