java.io.Closeable, java.lang.AutoCloseable, org.apache.hadoop.service.ServiceInMemorySCMStore@Private
@Evolving
public abstract class SCMStore
extends org.apache.hadoop.service.CompositeService
| Modifier and Type | Field | Description |
|---|---|---|
protected AppChecker |
appChecker |
| Modifier | Constructor | Description |
|---|---|---|
protected |
SCMStore(java.lang.String name) |
| Modifier and Type | Method | Description |
|---|---|---|
abstract java.lang.String |
addResource(java.lang.String key,
java.lang.String fileName) |
Add a resource to the shared cache and it's associated filename.
|
abstract java.lang.String |
addResourceReference(java.lang.String key,
SharedCacheResourceReference ref) |
Add a
SharedCacheResourceReference to a resource and update
the resource access time. |
void |
cleanResourceReferences(java.lang.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_CLASS parameter. |
abstract java.util.Collection<SharedCacheResourceReference> |
getResourceReferences(java.lang.String key) |
Get the
SharedCacheResourceReference(s) associated with the
resource. |
abstract boolean |
isResourceEvictable(java.lang.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(java.lang.String key) |
Remove a resource from the shared cache.
|
abstract boolean |
removeResourceReference(java.lang.String key,
SharedCacheResourceReference ref,
boolean updateAccessTime) |
Remove a
SharedCacheResourceReference from a resource. |
abstract void |
removeResourceReferences(java.lang.String key,
java.util.Collection<SharedCacheResourceReference> refs,
boolean updateAccessTime) |
Remove a collection of
SharedCacheResourceReferences from 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 void serviceInit(org.apache.hadoop.conf.Configuration conf)
throws java.lang.Exception
serviceInit in class org.apache.hadoop.service.CompositeServicejava.lang.Exception@Private
public abstract java.lang.String addResource(java.lang.String key,
java.lang.String fileName)
key - a unique identifier for a resourcefileName - the filename of the resource@Private public abstract boolean removeResource(java.lang.String key)
key - a unique identifier for a resourceSharedCacheResourceReference and was not removed.@Private
public abstract java.lang.String addResourceReference(java.lang.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@Private public abstract java.util.Collection<SharedCacheResourceReference> getResourceReferences(java.lang.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.@Private
public abstract boolean removeResourceReference(java.lang.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@Private
public abstract void removeResourceReferences(java.lang.String key,
java.util.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@Private
public void cleanResourceReferences(java.lang.String key)
throws org.apache.hadoop.yarn.exceptions.YarnException
key - a unique identifier for a resourceorg.apache.hadoop.yarn.exceptions.YarnException@Private
public abstract boolean isResourceEvictable(java.lang.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.@Private public static AppChecker createAppCheckerService(org.apache.hadoop.conf.Configuration conf)
YarnConfiguration.SCM_APP_CHECKER_CLASS parameter.conf - Copyright © 2008–2025 Apache Software Foundation. All rights reserved.