![]() |
XRootD
|
#include <XrdCmsFinder.hh>
Public Member Functions | |
XrdCmsFinderTRG (XrdSysLogger *, int, int, XrdOss *theSS=0) | |
~XrdCmsFinderTRG () | |
void | Added (const char *path, int Pend=0) |
int | Configure (const char *cfn, char *Args, XrdOucEnv *EnvInfo) |
int | Locate (XrdOucErrInfo &Resp, const char *path, int flags, XrdOucEnv *Info=0) |
XrdOucTList * | Managers () |
int | Prepare (XrdOucErrInfo &Resp, XrdSfsPrep &pargs, XrdOucEnv *Info=0) |
void | PutInfo (XrdCmsPerfMon::PerfInfo &perfInfo, bool alert=false) |
int | Release (int n) |
void | Removed (const char *path) |
int | Reserve (int n) |
int | Resource (int n) |
void | Resume (int Perm=1) |
int | RunAdmin (char *Path, const char *vnid) |
void * | RunPM () |
int | Space (XrdOucErrInfo &Resp, const char *path, XrdOucEnv *envP=0) |
void * | Start () |
void | Suspend (int Perm=1) |
void | Utilization (unsigned int util, bool alert=false) |
![]() | |
XrdCmsClient (Persona acting) | |
virtual | ~XrdCmsClient () |
Destructor. More... | |
virtual int | Forward (XrdOucErrInfo &Resp, const char *cmd, const char *arg1=0, const char *arg2=0, XrdOucEnv *Env1=0, XrdOucEnv *Env2=0) |
virtual int | isRemote () |
![]() | |
XrdCmsPerfMon () | |
Constructor & Destructor. More... | |
virtual | ~XrdCmsPerfMon () |
virtual bool | Configure (const char *cfn, char *Parms, XrdSysLogger &Logger, XrdCmsPerfMon &cmsMon, XrdOucEnv *EnvInfo, bool isCMS) |
virtual void | GetInfo (PerfInfo &info) |
Static Public Member Functions | |
static bool | VCheck (XrdVersionInfo &urVersion) |
Additional Inherited Members | |
![]() | |
enum | Persona { amLocal , amRemote , amTarget } |
![]() | |
Persona | myPersona |
Definition at line 122 of file XrdCmsFinder.hh.
XrdCmsFinderTRG::XrdCmsFinderTRG | ( | XrdSysLogger * | lp, |
int | whoami, | ||
int | port, | ||
XrdOss * | theSS = 0 |
||
) |
Definition at line 889 of file XrdCmsFinder.cc.
References XrdCms::IsProxy, XrdCms::IsRedir, XrdSysError::logger(), and XrdCms::Say().
XrdCmsFinderTRG::~XrdCmsFinderTRG | ( | ) |
Definition at line 911 of file XrdCmsFinder.cc.
References XrdOucTList::next.
|
virtual |
Notify the cms of a newly added file or a file whose state has changed on a data server node.
path | The logical file name. |
Pend | When true, the file is scheduled to be present in the future (e.g. copied in). |
Reimplemented from XrdCmsClient.
Definition at line 925 of file XrdCmsFinder.cc.
References XrdOucStream::Close(), XrdSysMutex::Lock(), XrdOucStream::Put(), and XrdSysMutex::UnLock().
|
virtual |
Configure the client object.
cfn | The configuration file name. |
Parms | Any parameters specified in the cmslib directive. If none, the pointer may be null. |
EnvInfo | Environmental information of the caller. |
Implements XrdCmsClient.
Definition at line 965 of file XrdCmsFinder.cc.
References XrdCmsClientConfig::CMSPath, XrdCmsClientConfig::configNorm, XrdCmsClientConfig::configServer, XrdCmsClientConfig::configSuper, XrdCmsClientConfig::Configure(), XrdSysError::Emsg(), XrdProxy::envP, XrdCmsClientConfig::ManList, XrdCmsClientConfig::myVNID, XrdCmsClientConfig::PanList, XrdCmsClientConfig::perfInt, XrdCmsClientConfig::perfMon, XrdOucEnv::PutPtr(), XrdSysThread::Run(), RunAdmin(), and XrdCms::Say().
|
virtual |
Retrieve file location information.
Resp | Object where message or response is to be returned. |
path | The logical path whise location is wanted. |
flags | One or more of the following: SFS_O_LOCATE - return the list of servers that have the file. Otherwise, redirect to the best server for the file. SFS_O_NOWAIT - w/ SFS_O_LOCATE return readily available info. Otherwise, select online files only. SFS_O_CREAT - file will be created. SFS_O_NOWAIT - select server if file is online. SFS_O_REPLICA - a replica of the file will be made. SFS_O_STAT - only stat() information wanted. SFS_O_TRUNC - file will be truncated. For any the the above, additional flags are passed: SFS_O_META - data will not change (inode operation only) SFS_O_RESET - reset cached info and recaculate the location(s). SFS_O_WRONLY - file will be only written (o/w RDWR or RDONLY). SFS_O_RDWR - file may be read and written (o/w WRONLY or RDONLY). |
Info | Associated environmental information for arg2 (e.g., cgi info which can be retrieved by Env1->Env(<len>)). |
Implements XrdCmsClient.
Definition at line 1012 of file XrdCmsFinder.cc.
References XrdOucErrInfo::getMsgBuff(), XrdOucErrInfo::setErrCode(), XrdOucErrInfo::setErrInfo(), SFS_DATA, SFS_ERROR, SFS_O_LOCAL, and SFS_O_LOCATE.
|
inlinevirtual |
Obtain the list of cmsd's being used by a manager node along with their associated index numbers, origin 1.
Reimplemented from XrdCmsClient.
Definition at line 135 of file XrdCmsFinder.hh.
|
inlinevirtual |
Start the preparation of a file for future processing.
Resp | Object where message or response is to be returned. |
pargs | Information on which and how to prepare the file. |
Info | Associated environmental information. |
Reimplemented from XrdCmsClient.
Definition at line 132 of file XrdCmsFinder.hh.
|
virtual |
Report performance statistics as load values from 0 to 100. The performance monitor plugin may call this method to asynchronously report performance via the passed XrdCmsPerfMon object during configuration.
info | Reference to the structure that should be filled out with load values. See the PerfInfo structure. |
alert | When true, load information is forcibly sent to the cluster's manager. Otherwise, it is only sent if it significantly changes. See the cms.sched directive fuzz parameter. |
Reimplemented from XrdCmsPerfMon.
Definition at line 1041 of file XrdCmsFinder.cc.
References XrdOucStream::Close(), XrdCmsPerfMon::PerfInfo::cpu_load, XrdSysMutex::Lock(), XrdCmsPerfMon::PerfInfo::mem_load, XrdCmsPerfMon::PerfInfo::net_load, XrdCmsPerfMon::PerfInfo::pag_load, XrdOucStream::Put(), XrdSysMutex::UnLock(), and XrdCmsPerfMon::PerfInfo::xeq_load.
Referenced by RunPM(), and Utilization().
|
virtual |
Increases the amount of resource available. When transitioning from a a non-positive to a positive resource amount, perform a resume so that additional clients may be dispatched to this data server.
n | The value to add to the resources available (default 1). The total amount is capped by the amount specified by Resource(). |
Reimplemented from XrdCmsClient.
Definition at line 1071 of file XrdCmsFinder.cc.
References XrdSysMutex::Lock(), Resume(), and XrdSysMutex::UnLock().
|
virtual |
Notify the cmsd that a file or directory has been deleted. It is only called called on a data server node.
path | The logical file name that was removed. |
Reimplemented from XrdCmsClient.
Definition at line 1101 of file XrdCmsFinder.cc.
References XrdOucStream::Close(), XrdSysMutex::Lock(), XrdOucStream::Put(), and XrdSysMutex::UnLock().
|
virtual |
Decreases the amount of resources available. When the available resources becomes non-positive, perform a temporary suspend to prevent additional clients from being dispatched to this data server.
n | The value by which resources are decreased (default 1). |
Reimplemented from XrdCmsClient.
Definition at line 1125 of file XrdCmsFinder.cc.
References XrdSysMutex::Lock(), Suspend(), and XrdSysMutex::UnLock().
|
virtual |
Enables the Reserve() & Release() methods.
n | a positive integer that specifies the amount of resource units that are available. It may be reset at any time. |
Reimplemented from XrdCmsClient.
Definition at line 1154 of file XrdCmsFinder.cc.
References XrdSysMutex::Lock(), and XrdSysMutex::UnLock().
|
virtual |
Resume service after a suspension.
Perm | When true the resume persist across server restarts. Otherwise, it is treated as a temporary request. |
Reimplemented from XrdCmsClient.
Definition at line 1182 of file XrdCmsFinder.cc.
References XrdOucStream::Close(), XrdSysMutex::Lock(), XrdOucStream::Put(), and XrdSysMutex::UnLock().
Referenced by Release().
int XrdCmsFinderTRG::RunAdmin | ( | char * | Path, |
const char * | vnid | ||
) |
Definition at line 1221 of file XrdCmsFinder.cc.
References XrdSysError::Emsg(), Path, XrdSysThread::Run(), and XrdCms::Say().
Referenced by XrdCmsFinderRMT::Configure(), and Configure().
void * XrdCmsFinderTRG::RunPM | ( | ) |
Definition at line 1251 of file XrdCmsFinder.cc.
References XrdCmsPerfMon::PerfInfo::Clear(), XrdCmsPerfMon::GetInfo(), PutInfo(), and XrdSysTimer::Snooze().
|
inlinevirtual |
Obtain the overall space usage of a cluster. Called only on manager nodes.
Resp | Object to hold response or error message. |
path | Associated logical path for the space request. |
Info | Associated cgi information for path. |
Implements XrdCmsClient.
Definition at line 152 of file XrdCmsFinder.hh.
void * XrdCmsFinderTRG::Start | ( | ) |
Definition at line 1270 of file XrdCmsFinder.cc.
References XrdOucStream::Close(), XrdSysError::Emsg(), XrdOucStream::FDNum(), XrdSysMutex::Lock(), XrdOucStream::Put(), XrdCmsRRData::Request, XrdCmsRRData::Routing, XrdCms::Say(), XrdSysMutex::UnLock(), and XrdSysTimer::Wait().
|
virtual |
Suspend service.
Perm | When true the suspend persist across server restarts. Otherwise, it is treated as a temporary request. |
Reimplemented from XrdCmsClient.
Definition at line 1202 of file XrdCmsFinder.cc.
References XrdOucStream::Close(), XrdOucStream::Put(), and XrdSysMutex::UnLock().
Referenced by Reserve().
|
virtual |
Report utilization of this server. This may be used in lieu of general performance metric reporting. For consistent results use only one method.
util | A value from 0 to 100 representing utilization. Values greater than 100 are set to be 100. |
alert | When true the utilization is forcibly report to the cluster managers. Otherwise, reporting is done only when it will significantly change server selection. |
Reimplemented from XrdCmsClient.
Definition at line 1318 of file XrdCmsFinder.cc.
References XrdCmsPerfMon::PerfInfo::cpu_load, XrdCmsPerfMon::PerfInfo::mem_load, XrdCmsPerfMon::PerfInfo::net_load, XrdCmsPerfMon::PerfInfo::pag_load, PutInfo(), and XrdCmsPerfMon::PerfInfo::xeq_load.
|
static |
Definition at line 1340 of file XrdCmsFinder.cc.
References XrdCms::myVersion, and XrdSysPlugin::VerCmp().