Interface ClientSCMProtocol


@Public @Unstable public interface ClientSCMProtocol

The protocol between clients and the SharedCacheManager to claim and release resources in the shared cache.

  • Method Details

    • use

      The interface used by clients to claim a resource with the SharedCacheManager. The client uses a checksum to identify the resource and an ApplicationId to identify which application will be using the resource.

      The SharedCacheManager responds with whether or not the resource exists in the cache. If the resource exists, a Path to the resource in the shared cache is returned. If the resource does not exist, the response is empty.

      Parameters:
      request - request to claim a resource in the shared cache
      Returns:
      response indicating if the resource is already in the cache
      Throws:
      YarnException - exceptions from yarn servers.
      IOException - io error occur.
    • release

      The interface used by clients to release a resource with the SharedCacheManager. This method is called once an application is no longer using a claimed resource in the shared cache. The client uses a checksum to identify the resource and an ApplicationId to identify which application is releasing the resource.

      Note: This method is an optimization and the client is not required to call it for correctness.

      Currently the SharedCacheManager sends an empty response.

      Parameters:
      request - request to release a resource in the shared cache
      Returns:
      (empty) response on releasing the resource
      Throws:
      YarnException - exceptions from yarn servers.
      IOException - io error occur.