org.apache.oozie.dependency.hcat
Interface HCatDependencyCache

All Known Implementing Classes:
EhcacheHCatDependencyCache, SimpleHCatDependencyCache

public interface HCatDependencyCache


Method Summary
 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.
 boolean removeMissingDependency(org.apache.oozie.util.HCatURI hcatURI, String actionID)
          Remove a missing partition dependency associated with a actionID
 

Method Detail

init

void init(org.apache.hadoop.conf.Configuration conf)
Initialize the cache with configuration

Parameters:
conf - configuration

addMissingDependency

void addMissingDependency(org.apache.oozie.util.HCatURI hcatURI,
                          String actionID)
Add a missing partition dependency and the actionID waiting on it

Parameters:
hcatURI - dependency URI
actionID - ID of action which is waiting for the dependency

removeMissingDependency

boolean removeMissingDependency(org.apache.oozie.util.HCatURI hcatURI,
                                String actionID)
Remove a missing partition dependency associated with a actionID

Parameters:
hcatURI - dependency URI
actionID - ID of action which is waiting for the dependency
Returns:
true if successful, else false

getWaitingActions

Collection<String> getWaitingActions(org.apache.oozie.util.HCatURI hcatURI)
Get the list of actionIDs waiting for a partition

Parameters:
hcatURI - dependency URI
Returns:
list of actionIDs

markDependencyAvailable

Collection<String> markDependencyAvailable(String server,
                                           String db,
                                           String table,
                                           Map<String,String> partitions)
Mark a partition dependency as available

Parameters:
server - host:port of the server
db - name of the database
table - name of the table
partitions - list of available partitions
Returns:
list of actionIDs for which the dependency is now available

getAvailableDependencyURIs

Collection<String> getAvailableDependencyURIs(String actionID)
Get a list of available dependency URIs for a actionID

Parameters:
actionID - action id
Returns:
list of available dependency URIs

removeAvailableDependencyURIs

boolean removeAvailableDependencyURIs(String actionID,
                                      Collection<String> dependencyURIs)
Remove the list of available dependency URIs for a actionID once the missing dependencies are processed.

Parameters:
actionID - action id
dependencyURIs - set of dependency URIs
Returns:
true if successful, else false

destroy

void destroy()
Destroy the cache



Copyright © 2013 Apache Software Foundation. All Rights Reserved.