|
DP3
|
Description of a cluster and the nodes in it. More...
#include <ClusterDesc.h>
Public Member Functions | |
| ClusterDesc () | |
| Construct an empty object. More... | |
| ClusterDesc (const std::string &parsetName) | |
| Construct from the given parameterset. More... | |
| void | addNode (const NodeDesc &node, bool canExist=false) |
| const std::map< std::string, std::vector< int > > & | getMap () const |
| Get the map of file system to node index. More... | |
| const std::string & | getName () const |
| Get the cluster name. More... | |
| const NodeDesc & | getNode (const std::string &nodeName) const |
| Get a specific node. An exception is thrown if not found. More... | |
| const std::vector< NodeDesc > & | getNodes () const |
| Get all nodes. More... | |
| void | setName (const std::string &name) |
| Set cluster name. More... | |
| void | write (std::ostream &os) const |
| Write it in parset format. More... | |
Description of a cluster and the nodes in it.
This class holds the basic description of a cluster. It defines which nodes are part of the cluster and which file systems each node has access to. If a data set is distributed over many file systems, the cluster description tells which node can handle a data set part on a particular file system.
Currently the information is made persistent in a LOFAR .parset file. In the future it needs to use the Centrol Processor Resource Manager.
|
inline |
Construct an empty object.
|
explicit |
Construct from the given parameterset.
| void dp3::common::ClusterDesc::addNode | ( | const NodeDesc & | node, |
| bool | canExist = false |
||
| ) |
Add a node description. A node with an already existing name is not added. If canExist=false, an exception is thrown if existing.
|
inline |
Get the map of file system to node index.
|
inline |
Get the cluster name.
| const NodeDesc& dp3::common::ClusterDesc::getNode | ( | const std::string & | nodeName | ) | const |
Get a specific node. An exception is thrown if not found.
|
inline |
Get all nodes.
|
inline |
Set cluster name.
| void dp3::common::ClusterDesc::write | ( | std::ostream & | os | ) | const |
Write it in parset format.