|
DP3
|
Description of a node in a cluster. More...
#include <NodeDesc.h>
Public Types | |
| enum | NodeType { Compute , Storage , Head , Any } |
| Define the node types. More... | |
Public Member Functions | |
| NodeDesc () | |
| NodeDesc (const ParameterSet &) | |
| Construct from the given parameterset. More... | |
| void | addFileSys (const std::string &fsName, const std::string &mountPoint) |
| std::string | findFileSys (const std::string &fileName) const |
| const std::vector< std::string > & | getFileSys () const |
| Get the file systems it has access to. More... | |
| const std::vector< std::string > & | getMountPoints () const |
| Get the mount points of the file systems. More... | |
| const std::string & | getName () const |
| Get the name. More... | |
| NodeType | getType () const |
| Get the type. More... | |
| void | setName (const std::string &name) |
| Set node name. More... | |
| void | setType (NodeType type) |
| Set node type. More... | |
| void | write (std::ostream &os, const std::string &prefix) const |
| Write it in parset format. More... | |
Description of a node in a cluster.
This class holds the basic description of a node. It tells the name of the node and which file systems it has access to.
Currently the information is made persistent in a LOFAR .parset file. In the future it needs to use the Central Processor Resource Manager.
|
inline |
Construct an empty object. By default its type is Any.
|
explicit |
Construct from the given parameterset.
| void dp3::common::NodeDesc::addFileSys | ( | const std::string & | fsName, |
| const std::string & | mountPoint | ||
| ) |
Add a file system the node has access to. A possible leading /auto is removed from the mountPoint.
| std::string dp3::common::NodeDesc::findFileSys | ( | const std::string & | fileName | ) | const |
Find the file system a file is on. The file must be given with its absolute file name. It does it by comparing the mount points with the leading part of the file name.
|
inline |
Get the file systems it has access to.
|
inline |
Get the mount points of the file systems.
|
inline |
Get the name.
|
inline |
Get the type.
|
inline |
Set node name.
|
inline |
Set node type.
| void dp3::common::NodeDesc::write | ( | std::ostream & | os, |
| const std::string & | prefix | ||
| ) | const |
Write it in parset format.