public abstract class AbstractCoordInputDependency extends Object implements org.apache.hadoop.io.Writable, CoordInputDependency
| Modifier and Type | Field and Description |
|---|---|
protected Map<String,List<String>> |
availableDependenciesSet |
protected Map<String,List<CoordInputInstance>> |
dependencyMap |
protected boolean |
isDependencyMet |
protected Map<String,List<String>> |
missingDependenciesSet |
INTERNAL_VERSION_ID| Constructor and Description |
|---|
AbstractCoordInputDependency() |
AbstractCoordInputDependency(Map<String,List<CoordInputInstance>> dependencyMap) |
| Modifier and Type | Method and Description |
|---|---|
void |
addInputInstanceList(String inputEventName,
List<CoordInputInstance> inputInstanceList)
Adds the input instance list.
|
void |
addToAvailableDependencies(Collection<String> availableList)
Adds the to available dependencies.
|
void |
addToAvailableDependencies(String dataSet,
CoordInputInstance coordInputInstance) |
void |
addToAvailableDependencies(String dataSet,
String availableSet) |
void |
addToMissingDependencies(String dataSet,
CoordInputInstance coordInputInstance) |
boolean |
checkPullMissingDependencies(CoordinatorActionBean coordAction,
StringBuilder existList,
StringBuilder nonExistList)
Check pull missing dependencies.
|
ActionDependency |
checkPushMissingDependencies(CoordinatorActionBean coordAction,
boolean registerForNotification)
Check push missing dependencies.
|
boolean |
checkUnresolved(CoordinatorActionBean coordAction,
org.jdom.Element eAction)
Check unresolved.
|
protected void |
generateDependencies() |
List<String> |
getAvailableDependencies(String dataSet)
Gets the available dependencies.
|
List<String> |
getAvailableDependenciesAsList()
Gets the available dependencies as list.
|
Map<String,List<CoordInputInstance>> |
getDependencyMap() |
String |
getListAsString(List<String> dataSets) |
String |
getMissingDependencies()
Gets the missing dependencies.
|
String |
getMissingDependencies(String dataSet) |
List<String> |
getMissingDependenciesAsList()
Gets the missing dependencies as list.
|
boolean |
isChangeInDependency(StringBuilder nonExistList,
String missingDependencies,
StringBuilder nonResolvedList,
boolean status)
Checks if is change in dependency.
|
boolean |
isDataSetResolved(String dataSet) |
boolean |
isDependencyMet()
Checks if dependencies are meet.
|
boolean |
isUnResolvedDependencyMet()
Checks if is unresolved dependencies met.
|
void |
readFields(DataInput in) |
void |
removeFromMissingDependencies(String dataSet,
CoordInputInstance coordInputInstance) |
String |
serialize()
Serialize.
|
void |
setDependencyMap(Map<String,List<CoordInputInstance>> dependencyMap) |
void |
setDependencyMet(boolean isDependencyMeet)
Sets the dependency meet.
|
void |
write(DataOutput out) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddUnResolvedList, setMissingDependenciesprotected boolean isDependencyMet
protected transient Map<String,List<String>> missingDependenciesSet
protected transient Map<String,List<String>> availableDependenciesSet
protected Map<String,List<CoordInputInstance>> dependencyMap
public AbstractCoordInputDependency()
public AbstractCoordInputDependency(Map<String,List<CoordInputInstance>> dependencyMap)
public void addInputInstanceList(String inputEventName, List<CoordInputInstance> inputInstanceList)
CoordInputDependencyaddInputInstanceList in interface CoordInputDependencyinputEventName - the input event nameinputInstanceList - the input instance listpublic Map<String,List<CoordInputInstance>> getDependencyMap()
public void setDependencyMap(Map<String,List<CoordInputInstance>> dependencyMap)
public void addToAvailableDependencies(String dataSet, CoordInputInstance coordInputInstance)
public void removeFromMissingDependencies(String dataSet, CoordInputInstance coordInputInstance)
public void addToMissingDependencies(String dataSet, CoordInputInstance coordInputInstance)
protected void generateDependencies()
public List<String> getAvailableDependencies(String dataSet)
CoordInputDependencygetAvailableDependencies in interface CoordInputDependencydataSet - the data setpublic String getMissingDependencies(String dataSet)
public void addToAvailableDependencies(String dataSet, String availableSet)
public String getMissingDependencies()
CoordInputDependencygetMissingDependencies in interface CoordInputDependencypublic List<String> getMissingDependenciesAsList()
CoordInputDependencygetMissingDependenciesAsList in interface CoordInputDependencypublic List<String> getAvailableDependenciesAsList()
CoordInputDependencygetAvailableDependenciesAsList in interface CoordInputDependencypublic String serialize() throws IOException
CoordInputDependencyserialize in interface CoordInputDependencyIOException - Signals that an I/O exception has occurred.public String getListAsString(List<String> dataSets)
public void setDependencyMet(boolean isDependencyMeet)
CoordInputDependencysetDependencyMet in interface CoordInputDependencyisDependencyMeet - the new dependency metpublic boolean isDependencyMet()
CoordInputDependencyisDependencyMet in interface CoordInputDependencypublic boolean isUnResolvedDependencyMet()
CoordInputDependencyisUnResolvedDependencyMet in interface CoordInputDependencypublic void addToAvailableDependencies(Collection<String> availableList)
CoordInputDependencyaddToAvailableDependencies in interface CoordInputDependencyavailableList - the avail dep listpublic ActionDependency checkPushMissingDependencies(CoordinatorActionBean coordAction, boolean registerForNotification) throws CommandException, IOException, org.jdom.JDOMException
CoordInputDependencycheckPushMissingDependencies in interface CoordInputDependencycoordAction - the coord actionregisterForNotification - the register for notificationCommandException - the command exceptionIOException - Signals that an I/O exception has occurred.org.jdom.JDOMException - the JDOM exceptionpublic boolean checkPullMissingDependencies(CoordinatorActionBean coordAction, StringBuilder existList, StringBuilder nonExistList) throws IOException, org.jdom.JDOMException
CoordInputDependencycheckPullMissingDependencies in interface CoordInputDependencycoordAction - the coord actionexistList - the exist listnonExistList - the non exist listIOException - Signals that an I/O exception has occurred.org.jdom.JDOMException - the JDOM exceptionpublic boolean isChangeInDependency(StringBuilder nonExistList, String missingDependencies, StringBuilder nonResolvedList, boolean status)
CoordInputDependencyisChangeInDependency in interface CoordInputDependencynonExistList - the non exist listmissingDependencies - the missing dependenciesnonResolvedList - the non resolved liststatus - the statuspublic boolean checkUnresolved(CoordinatorActionBean coordAction, org.jdom.Element eAction) throws Exception
CoordInputDependencycheckUnresolved in interface CoordInputDependencycoordAction - the coord actionException - the exceptionpublic void write(DataOutput out) throws IOException
write in interface org.apache.hadoop.io.WritableIOExceptionpublic void readFields(DataInput in) throws IOException
readFields in interface org.apache.hadoop.io.WritableIOExceptionpublic boolean isDataSetResolved(String dataSet)
Copyright © 2016 Apache Software Foundation. All rights reserved.