@InterfaceAudience.Public
@InterfaceStability.Unstable
public interface ClientSCMProtocol
The protocol between clients and the SharedCacheManager
to claim
and release resources in the shared cache.
Modifier and Type | Method and Description |
---|---|
ReleaseSharedCacheResourceResponse |
release(ReleaseSharedCacheResourceRequest request)
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. |
UseSharedCacheResourceResponse |
use(UseSharedCacheResourceRequest request)
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. |
UseSharedCacheResourceResponse use(UseSharedCacheResourceRequest request) throws YarnException, IOException
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.
request
- request to claim a resource in the shared cacheYarnException
IOException
ReleaseSharedCacheResourceResponse release(ReleaseSharedCacheResourceRequest request) throws YarnException, IOException
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.
request
- request to release a resource in the shared cacheYarnException
IOException
Copyright © 2017 Apache Software Foundation. All rights reserved.