Interface CredentialChangeListener

  • All Known Implementing Classes:
    StorageTransportHandler

    public interface CredentialChangeListener
    A listener interface that is notified on access token changes
    • Method Detail

      • onCredentialsChanged

        default void onCredentialsChanged​(java.lang.String jobId,
                                          StorageCredentialPair newTokens)
        The method is called when new access tokens are available for the job with ID jobId. The previous set of credentials and the newly-provided set must both be valid simultaneously for the Spark job to have time to rotate credentials without interruption. These tokens should be provided with plenty of time for the job to distribute them to the consumers of the storage transport endpoint to update their tokens before expiration.
        Parameters:
        jobId - the unique identifier for the job
        newTokens - a map of access tokens used to authenticate to the storage transport
      • onCredentialsChanged

        void onCredentialsChanged​(java.lang.String jobId,
                                  @Nullable
                                  java.lang.String clusterId,
                                  StorageCredentialPair newTokens)
        The method is called when new access tokens are available for the job with ID jobId in the cluster of clusterId. The previous set of credentials and the newly-provided set must both be valid simultaneously for the Spark job to have time to rotate credentials without interruption. These tokens should be provided with plenty of time for the job to distribute them to the consumers of the storage transport endpoint to update their tokens before expiration.
        Parameters:
        jobId - the unique identifier for the job
        clusterId - the unique identifier for the cluster. When its value is null, it behaves the same as onCredentialsChanged(String, StorageCredentialPair)
        newTokens - a map of access tokens used to authenticate to the storage transport