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, wait
addUnResolvedList, setMissingDependencies
protected 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)
CoordInputDependency
addInputInstanceList
in interface CoordInputDependency
inputEventName
- 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)
CoordInputDependency
getAvailableDependencies
in interface CoordInputDependency
dataSet
- the data setpublic String getMissingDependencies(String dataSet)
public void addToAvailableDependencies(String dataSet, String availableSet)
public String getMissingDependencies()
CoordInputDependency
getMissingDependencies
in interface CoordInputDependency
public List<String> getMissingDependenciesAsList()
CoordInputDependency
getMissingDependenciesAsList
in interface CoordInputDependency
public List<String> getAvailableDependenciesAsList()
CoordInputDependency
getAvailableDependenciesAsList
in interface CoordInputDependency
public String serialize() throws IOException
CoordInputDependency
serialize
in interface CoordInputDependency
IOException
- Signals that an I/O exception has occurred.public String getListAsString(List<String> dataSets)
public void setDependencyMet(boolean isDependencyMeet)
CoordInputDependency
setDependencyMet
in interface CoordInputDependency
isDependencyMeet
- the new dependency metpublic boolean isDependencyMet()
CoordInputDependency
isDependencyMet
in interface CoordInputDependency
public boolean isUnResolvedDependencyMet()
CoordInputDependency
isUnResolvedDependencyMet
in interface CoordInputDependency
public void addToAvailableDependencies(Collection<String> availableList)
CoordInputDependency
addToAvailableDependencies
in interface CoordInputDependency
availableList
- the avail dep listpublic ActionDependency checkPushMissingDependencies(CoordinatorActionBean coordAction, boolean registerForNotification) throws CommandException, IOException, org.jdom.JDOMException
CoordInputDependency
checkPushMissingDependencies
in interface CoordInputDependency
coordAction
- 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
CoordInputDependency
checkPullMissingDependencies
in interface CoordInputDependency
coordAction
- 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)
CoordInputDependency
isChangeInDependency
in interface CoordInputDependency
nonExistList
- the non exist listmissingDependencies
- the missing dependenciesnonResolvedList
- the non resolved liststatus
- the statuspublic boolean checkUnresolved(CoordinatorActionBean coordAction, org.jdom.Element eAction) throws Exception
CoordInputDependency
checkUnresolved
in interface CoordInputDependency
coordAction
- the coord actionException
- the exceptionpublic void write(DataOutput out) throws IOException
write
in interface org.apache.hadoop.io.Writable
IOException
public void readFields(DataInput in) throws IOException
readFields
in interface org.apache.hadoop.io.Writable
IOException
public boolean isDataSetResolved(String dataSet)
Copyright © 2016 Apache Software Foundation. All rights reserved.