public class ProbablisticSelectionManager extends SelectionManager
SelectionManager
interface, based on
probabilistic approach. The purpose of selection manager is to choose the nodes for
further selection scripts execution. The goal is to find optimal strategy
of nodes selection from the nodes pool to minimize scripts execution.
In order to do that we assume that script will pass on the node with
some probability. This probability will be increased or decreased accordingly
depending on execution results.
The selection of nodes sorted by its probability for each particular script
gives an optimal strategy for scripts execution. For several scripts join probabilities
are calculated for each nodes.authorizedSelectionScripts
Constructor and Description |
---|
ProbablisticSelectionManager() |
ProbablisticSelectionManager(RMCore rmcore) |
Modifier and Type | Method and Description |
---|---|
List<RMNode> |
arrangeNodesForScriptExecution(List<RMNode> nodes,
List<SelectionScript> scripts,
Map<String,Serializable> bindings)
Find appropriate candidates nodes for script execution, taking into
account "free" and "exclusion" nodes lists.
|
org.apache.log4j.Logger |
getLogger() |
boolean |
isPassed(SelectionScript script,
Map<String,Serializable> bindings,
RMNode rmnode)
Predicts script execution result.
|
boolean |
processScriptResult(SelectionScript script,
Map<String,Serializable> bindings,
ScriptResult<Boolean> scriptResult,
RMNode rmnode)
Processes script result and updates knowledge base of
selection manager at the same time.
|
executeScript, scriptExecutionFinished, selectNodes, shutdown, updateAuthorizedScriptsSignatures
public ProbablisticSelectionManager()
public ProbablisticSelectionManager(RMCore rmcore)
public List<RMNode> arrangeNodesForScriptExecution(List<RMNode> nodes, List<SelectionScript> scripts, Map<String,Serializable> bindings)
arrangeNodesForScriptExecution
in class SelectionManager
scripts
- set of scripts to executenodes
- free nodes list provided by resource managerpublic boolean isPassed(SelectionScript script, Map<String,Serializable> bindings, RMNode rmnode)
isPassed
in class SelectionManager
script
- - script to executermnode
- - target nodepublic boolean processScriptResult(SelectionScript script, Map<String,Serializable> bindings, ScriptResult<Boolean> scriptResult, RMNode rmnode)
processScriptResult
in class SelectionManager
script
- - executed scriptscriptResult
- - obtained script resultrmnode
- - node on which script has been executedpublic org.apache.log4j.Logger getLogger()
Loggable.getLogger()