public class PartitionDependencyManagerService extends Object implements Service
| Modifier and Type | Field and Description | 
|---|---|
static String | 
CACHE_MANAGER_IMPL  | 
static String | 
CACHE_PURGE_INTERVAL  | 
static String | 
CACHE_PURGE_TTL  | 
static String | 
CONF_PREFIX  | 
DEFAULT_LOCK_TIMEOUT, lockTimeout| Constructor and Description | 
|---|
PartitionDependencyManagerService()  | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
addMissingDependency(HCatURI hcatURI,
                                        String actionID)
Add a missing partition dependency and the actionID waiting on it 
 | 
void | 
destroy()
Destroy the service. 
 | 
Collection<String> | 
getAvailableDependencyURIs(String actionID)
Get a list of available dependency URIs for a actionID 
 | 
Class<? extends Service> | 
getInterface()
Return the public interface of the service. 
 | 
Collection<String> | 
getWaitingActions(HCatURI hcatURI)
Get the list of actionIDs waiting for a partition 
 | 
void | 
init(Services services)
Initialize the service. 
 | 
void | 
partitionAvailable(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 actionID)
Remove a coord action from dependency cache when all push missing dependencies available 
 | 
boolean | 
removeMissingDependency(HCatURI hcatURI,
                                              String actionID)
Remove a missing partition dependency associated with a actionID 
 | 
void | 
runCachePurgeWorker()  | 
public static final String CONF_PREFIX
public static final String CACHE_MANAGER_IMPL
public static final String CACHE_PURGE_INTERVAL
public static final String CACHE_PURGE_TTL
public PartitionDependencyManagerService()
public void init(Services services) throws ServiceException
Service Invoked by the Service singleton at start up time.
init in interface Serviceservices - services singleton initializing the service.ServiceException - thrown if the service could not initialize.public void destroy()
Service Invoked by the Service singleton at shutdown time.
public Class<? extends Service> getInterface()
ServiceServices are retrieved by its public interface. Specializations of services must return the public interface.
getInterface in interface Servicepublic void addMissingDependency(HCatURI hcatURI, String actionID)
hcatURI - dependency URIactionID - ID of action which is waiting for the dependencypublic boolean removeMissingDependency(HCatURI hcatURI, String actionID)
hcatURI - dependency URIactionID - ID of action which is waiting for the dependencypublic Collection<String> getWaitingActions(HCatURI hcatURI)
hcatURI - dependency URIpublic void partitionAvailable(String server, String db, String table, Map<String,String> partitions)
server - host:port of the serverdb - name of the databasetable - name of the tablepartitions - list of available partitionspublic Collection<String> getAvailableDependencyURIs(String actionID)
actionID - action idpublic boolean removeAvailableDependencyURIs(String actionID, Collection<String> dependencyURIs)
actionID - action iddependencyURIs - set of dependency URIspublic void removeCoordActionWithDependenciesAvailable(String actionID)
actionID - action idpublic void runCachePurgeWorker()
Copyright © 2016 Apache Software Foundation. All rights reserved.