DP3
Public Member Functions | List of all members
dp3::common::ClusterDesc Class Reference

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 NodeDescgetNode (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...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ ClusterDesc() [1/2]

dp3::common::ClusterDesc::ClusterDesc ( )
inline

Construct an empty object.

◆ ClusterDesc() [2/2]

dp3::common::ClusterDesc::ClusterDesc ( const std::string &  parsetName)
explicit

Construct from the given parameterset.

Member Function Documentation

◆ addNode()

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.

◆ getMap()

const std::map<std::string, std::vector<int> >& dp3::common::ClusterDesc::getMap ( ) const
inline

Get the map of file system to node index.

◆ getName()

const std::string& dp3::common::ClusterDesc::getName ( ) const
inline

Get the cluster name.

◆ getNode()

const NodeDesc& dp3::common::ClusterDesc::getNode ( const std::string &  nodeName) const

Get a specific node. An exception is thrown if not found.

◆ getNodes()

const std::vector<NodeDesc>& dp3::common::ClusterDesc::getNodes ( ) const
inline

Get all nodes.

◆ setName()

void dp3::common::ClusterDesc::setName ( const std::string &  name)
inline

Set cluster name.

◆ write()

void dp3::common::ClusterDesc::write ( std::ostream &  os) const

Write it in parset format.


The documentation for this class was generated from the following file: