Class StorageTransportHandler

    • Method Detail

      • onCredentialsChanged

        public void onCredentialsChanged​(java.lang.String jobId,
                                         @Nullable
                                         java.lang.String clusterId,
                                         StorageCredentialPair newCredentials)
        Description copied from interface: CredentialChangeListener
        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.
        Specified by:
        onCredentialsChanged in interface CredentialChangeListener
        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 CredentialChangeListener.onCredentialsChanged(String, StorageCredentialPair)
        newCredentials - a map of access tokens used to authenticate to the storage transport
      • onObjectFailed

        public void onObjectFailed​(java.lang.String jobId,
                                   java.lang.String bucket,
                                   java.lang.String key,
                                   java.lang.String errorMessage)
        Description copied from interface: ObjectFailureListener
        Method to call when an unrecoverable error has been encountered for the given jobId, objectURI, with errorMessage.
        Specified by:
        onObjectFailed in interface ObjectFailureListener
        Parameters:
        jobId - the unique identifier for the job. It could be customer-supplied or self-generated (when not supplied)
        bucket - the object storage bucket
        key - the key in the object storage
        errorMessage - a description of the error