@InterfaceAudience.Private
 @InterfaceStability.Evolving
public abstract class SCMStore
extends org.apache.hadoop.service.CompositeService
| Modifier and Type | Field and Description | 
|---|---|
| protected AppChecker | appChecker | 
| Modifier | Constructor and Description | 
|---|---|
| protected  | SCMStore(String name) | 
| Modifier and Type | Method and Description | 
|---|---|
| abstract String | addResource(String key,
           String fileName)Add a resource to the shared cache and it's associated filename. | 
| abstract String | addResourceReference(String key,
                    SharedCacheResourceReference ref)Add a  SharedCacheResourceReferenceto a resource and update
 the resource access time. | 
| void | cleanResourceReferences(String key)Clean all resource references to a cache resource that contain application
 ids pointing to finished applications. | 
| static AppChecker | createAppCheckerService(org.apache.hadoop.conf.Configuration conf)Create an instance of the AppChecker service via reflection based on the
  YarnConfiguration.SCM_APP_CHECKER_CLASSparameter. | 
| abstract Collection<SharedCacheResourceReference> | getResourceReferences(String key)Get the  SharedCacheResourceReference(s) associated with the
 resource. | 
| abstract boolean | isResourceEvictable(String key,
                   org.apache.hadoop.fs.FileStatus file)Check if a specific resource is evictable according to the store's enabled
 cache eviction policies. | 
| abstract boolean | removeResource(String key)Remove a resource from the shared cache. | 
| abstract boolean | removeResourceReference(String key,
                       SharedCacheResourceReference ref,
                       boolean updateAccessTime)Remove a  SharedCacheResourceReferencefrom a resource. | 
| abstract void | removeResourceReferences(String key,
                        Collection<SharedCacheResourceReference> refs,
                        boolean updateAccessTime)Remove a collection of  SharedCacheResourceReferencesfrom a
 resource. | 
| protected void | serviceInit(org.apache.hadoop.conf.Configuration conf) | 
addIfService, addService, getServices, removeService, serviceStart, serviceStopclose, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, setConfig, start, stop, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStopprotected AppChecker appChecker
protected SCMStore(String name)
protected void serviceInit(org.apache.hadoop.conf.Configuration conf)
                    throws Exception
serviceInit in class org.apache.hadoop.service.CompositeServiceException@InterfaceAudience.Private public abstract String addResource(String key, String fileName)
key - a unique identifier for a resourcefileName - the filename of the resource@InterfaceAudience.Private public abstract boolean removeResource(String key)
key - a unique identifier for a resourceSharedCacheResourceReference and was not removed.@InterfaceAudience.Private public abstract String addResourceReference(String key, SharedCacheResourceReference ref)
SharedCacheResourceReference to a resource and update
 the resource access time.key - a unique identifier for a resourceref - the SharedCacheResourceReference to addSharedCacheResourceReference was added or already
         existed. null if the resource did not exist@InterfaceAudience.Private public abstract Collection<SharedCacheResourceReference> getResourceReferences(String key)
SharedCacheResourceReference(s) associated with the
 resource.key - a unique identifier for a resourceSharedCacheResourceReferences. If the resource does
         not exist, an empty set is returned.@InterfaceAudience.Private public abstract boolean removeResourceReference(String key, SharedCacheResourceReference ref, boolean updateAccessTime)
SharedCacheResourceReference from a resource.key - a unique identifier for a resourceref - the SharedCacheResourceReference to removeupdateAccessTime - true if the call should update the access time for
          the resource@InterfaceAudience.Private public abstract void removeResourceReferences(String key, Collection<SharedCacheResourceReference> refs, boolean updateAccessTime)
SharedCacheResourceReferences from a
 resource.key - a unique identifier for a resourcerefs - the collection of SharedCacheResourceReferences to
          removeupdateAccessTime - true if the call should update the access time for
          the resource@InterfaceAudience.Private public void cleanResourceReferences(String key) throws org.apache.hadoop.yarn.exceptions.YarnException
key - a unique identifier for a resourceorg.apache.hadoop.yarn.exceptions.YarnException@InterfaceAudience.Private public abstract boolean isResourceEvictable(String key, org.apache.hadoop.fs.FileStatus file)
key - a unique identifier for a resourcefile - the FileStatus object for the resource file in the
          file system.@InterfaceAudience.Private public static AppChecker createAppCheckerService(org.apache.hadoop.conf.Configuration conf)
YarnConfiguration.SCM_APP_CHECKER_CLASS parameter.conf - Copyright © 2008–2023 Apache Software Foundation. All rights reserved.