public class SimpleHCatDependencyCache extends Object implements HCatDependencyCache
Constructor and Description |
---|
SimpleHCatDependencyCache() |
Modifier and Type | Method and Description |
---|---|
void |
addMissingDependency(org.apache.oozie.util.HCatURI hcatURI,
String actionID)
Add a missing partition dependency and the actionID waiting on it
|
void |
destroy()
Destroy the cache
|
Collection<String> |
getAvailableDependencyURIs(String actionID)
Get a list of available dependency URIs for a actionID
|
Collection<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
|
Collection<String> |
markDependencyAvailable(String server,
String db,
String table,
Map<String,String> partitions)
Mark a partition dependency as available
|
boolean |
removeAvailableDependencyURIs(String actionID,
Collection<String> dependencyURIs)
Remove the list of available dependency URIs for a actionID once the missing dependencies are processed.
|
void |
removeCoordActionWithDependenciesAvailable(String coordAction)
Remove coordAction when all dependencies met
|
boolean |
removeMissingDependency(org.apache.oozie.util.HCatURI hcatURI,
String actionID)
Remove a missing partition dependency associated with a actionID
|
void |
removeNonWaitingCoordActions(Set<String> coordActions)
Purge stale actions
|
public SimpleHCatDependencyCache()
public void init(org.apache.hadoop.conf.Configuration conf)
HCatDependencyCache
init
in interface HCatDependencyCache
conf
- configurationpublic void addMissingDependency(org.apache.oozie.util.HCatURI hcatURI, String actionID)
HCatDependencyCache
addMissingDependency
in interface HCatDependencyCache
hcatURI
- dependency URIactionID
- ID of action which is waiting for the dependencypublic boolean removeMissingDependency(org.apache.oozie.util.HCatURI hcatURI, String actionID)
HCatDependencyCache
removeMissingDependency
in interface HCatDependencyCache
hcatURI
- dependency URIactionID
- ID of action which is waiting for the dependencypublic Collection<String> getWaitingActions(org.apache.oozie.util.HCatURI hcatURI)
HCatDependencyCache
getWaitingActions
in interface HCatDependencyCache
hcatURI
- dependency URIpublic Collection<String> markDependencyAvailable(String server, String db, String table, Map<String,String> partitions)
HCatDependencyCache
markDependencyAvailable
in interface HCatDependencyCache
server
- host:port of the serverdb
- name of the databasetable
- name of the tablepartitions
- list of available partitionspublic Collection<String> getAvailableDependencyURIs(String actionID)
HCatDependencyCache
getAvailableDependencyURIs
in interface HCatDependencyCache
actionID
- action idpublic boolean removeAvailableDependencyURIs(String actionID, Collection<String> dependencyURIs)
HCatDependencyCache
removeAvailableDependencyURIs
in interface HCatDependencyCache
actionID
- action iddependencyURIs
- set of dependency URIspublic void destroy()
HCatDependencyCache
destroy
in interface HCatDependencyCache
public void removeNonWaitingCoordActions(Set<String> coordActions)
HCatDependencyCache
removeNonWaitingCoordActions
in interface HCatDependencyCache
public void removeCoordActionWithDependenciesAvailable(String coordAction)
HCatDependencyCache
removeCoordActionWithDependenciesAvailable
in interface HCatDependencyCache
Copyright © 2015 Apache Software Foundation. All Rights Reserved.