public class EhcacheHCatDependencyCache extends java.lang.Object implements HCatDependencyCache, net.sf.ehcache.event.CacheEventListener
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CONF_CACHE_NAME |
| Constructor and Description |
|---|
EhcacheHCatDependencyCache() |
| Modifier and Type | Method and Description |
|---|---|
void |
addMissingDependency(org.apache.oozie.util.HCatURI hcatURI,
java.lang.String actionID)
Add a missing partition dependency and the actionID waiting on it
|
java.lang.Object |
clone() |
void |
destroy()
Destroy the cache
|
void |
dispose() |
java.util.Collection<java.lang.String> |
getAvailableDependencyURIs(java.lang.String actionID)
Get a list of available dependency URIs for a actionID
|
java.util.Collection<java.lang.String> |
getWaitingActions(org.apache.oozie.util.HCatURI hcatURI)
Get the list of actionIDs waiting for a partition
|
void |
init(org.apache.hadoop.conf.Configuration conf)
Initialize the cache with configuration
|
java.util.Collection<java.lang.String> |
markDependencyAvailable(java.lang.String server,
java.lang.String db,
java.lang.String table,
java.util.Map<java.lang.String,java.lang.String> partitions)
Mark a partition dependency as available
|
void |
notifyElementEvicted(net.sf.ehcache.Ehcache cache,
net.sf.ehcache.Element element) |
void |
notifyElementExpired(net.sf.ehcache.Ehcache cache,
net.sf.ehcache.Element element) |
void |
notifyElementPut(net.sf.ehcache.Ehcache arg0,
net.sf.ehcache.Element arg1) |
void |
notifyElementRemoved(net.sf.ehcache.Ehcache arg0,
net.sf.ehcache.Element arg1) |
void |
notifyElementUpdated(net.sf.ehcache.Ehcache arg0,
net.sf.ehcache.Element arg1) |
void |
notifyRemoveAll(net.sf.ehcache.Ehcache arg0) |
boolean |
removeAvailableDependencyURIs(java.lang.String actionID,
java.util.Collection<java.lang.String> dependencyURIs)
Remove the list of available dependency URIs for a actionID once the missing dependencies are processed.
|
void |
removeCoordActionWithDependenciesAvailable(java.lang.String coordAction)
Remove coordAction when all dependencies met
|
boolean |
removeMissingDependency(org.apache.oozie.util.HCatURI hcatURI,
java.lang.String actionID)
Remove a missing partition dependency associated with a actionID
|
void |
removeNonWaitingCoordActions(java.util.Set<java.lang.String> staleActions)
Purge stale actions
|
public static java.lang.String CONF_CACHE_NAME
public EhcacheHCatDependencyCache()
public void init(org.apache.hadoop.conf.Configuration conf)
HCatDependencyCacheinit in interface HCatDependencyCacheconf - configurationpublic void addMissingDependency(org.apache.oozie.util.HCatURI hcatURI, java.lang.String actionID)
HCatDependencyCacheaddMissingDependency in interface HCatDependencyCachehcatURI - dependency URIactionID - ID of action which is waiting for the dependencypublic boolean removeMissingDependency(org.apache.oozie.util.HCatURI hcatURI, java.lang.String actionID)
HCatDependencyCacheremoveMissingDependency in interface HCatDependencyCachehcatURI - dependency URIactionID - ID of action which is waiting for the dependencypublic java.util.Collection<java.lang.String> getWaitingActions(org.apache.oozie.util.HCatURI hcatURI)
HCatDependencyCachegetWaitingActions in interface HCatDependencyCachehcatURI - dependency URIpublic java.util.Collection<java.lang.String> markDependencyAvailable(java.lang.String server, java.lang.String db, java.lang.String table, java.util.Map<java.lang.String,java.lang.String> partitions)
HCatDependencyCachemarkDependencyAvailable in interface HCatDependencyCacheserver - host:port of the serverdb - name of the databasetable - name of the tablepartitions - list of available partitionspublic java.util.Collection<java.lang.String> getAvailableDependencyURIs(java.lang.String actionID)
HCatDependencyCachegetAvailableDependencyURIs in interface HCatDependencyCacheactionID - action idpublic boolean removeAvailableDependencyURIs(java.lang.String actionID, java.util.Collection<java.lang.String> dependencyURIs)
HCatDependencyCacheremoveAvailableDependencyURIs in interface HCatDependencyCacheactionID - action iddependencyURIs - set of dependency URIspublic void destroy()
HCatDependencyCachedestroy in interface HCatDependencyCachepublic java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone in interface net.sf.ehcache.event.CacheEventListenerclone in class java.lang.Objectjava.lang.CloneNotSupportedExceptionpublic void dispose()
dispose in interface net.sf.ehcache.event.CacheEventListenerpublic void notifyElementExpired(net.sf.ehcache.Ehcache cache, net.sf.ehcache.Element element)
notifyElementExpired in interface net.sf.ehcache.event.CacheEventListenerpublic void notifyElementPut(net.sf.ehcache.Ehcache arg0, net.sf.ehcache.Element arg1) throws net.sf.ehcache.CacheException
notifyElementPut in interface net.sf.ehcache.event.CacheEventListenernet.sf.ehcache.CacheExceptionpublic void notifyElementRemoved(net.sf.ehcache.Ehcache arg0, net.sf.ehcache.Element arg1) throws net.sf.ehcache.CacheException
notifyElementRemoved in interface net.sf.ehcache.event.CacheEventListenernet.sf.ehcache.CacheExceptionpublic void notifyElementUpdated(net.sf.ehcache.Ehcache arg0, net.sf.ehcache.Element arg1) throws net.sf.ehcache.CacheException
notifyElementUpdated in interface net.sf.ehcache.event.CacheEventListenernet.sf.ehcache.CacheExceptionpublic void notifyRemoveAll(net.sf.ehcache.Ehcache arg0)
notifyRemoveAll in interface net.sf.ehcache.event.CacheEventListenerpublic void notifyElementEvicted(net.sf.ehcache.Ehcache cache, net.sf.ehcache.Element element)
notifyElementEvicted in interface net.sf.ehcache.event.CacheEventListenerpublic void removeNonWaitingCoordActions(java.util.Set<java.lang.String> staleActions)
HCatDependencyCacheremoveNonWaitingCoordActions in interface HCatDependencyCachepublic void removeCoordActionWithDependenciesAvailable(java.lang.String coordAction)
HCatDependencyCacheremoveCoordActionWithDependenciesAvailable in interface HCatDependencyCacheCopyright © 2019 Apache Software Foundation. All Rights Reserved.