xrootd
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
XrdCmsFinderTRG Class Reference

#include <XrdCmsFinder.hh>

Inheritance diagram for XrdCmsFinderTRG:
Inheritance graph
[legend]
Collaboration diagram for XrdCmsFinderTRG:
Collaboration graph
[legend]

Public Member Functions

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)
 
int Prepare (XrdOucErrInfo &Resp, XrdSfsPrep &pargs, XrdOucEnv *Info=0)
 
XrdOucTListManagers ()
 
void PutInfo (XrdCmsPerfMon::PerfInfo &perfInfo, bool alert=false)
 
void Removed (const char *path)
 
void Resume (int Perm=1)
 
void Suspend (int Perm=1)
 
int Resource (int n)
 
int Reserve (int n)
 
int Release (int n)
 
int RunAdmin (char *Path, const char *vnid)
 
void * RunPM ()
 
int Space (XrdOucErrInfo &Resp, const char *path, XrdOucEnv *envP=0)
 
void * Start ()
 
void Utilization (unsigned int util, bool alert=false)
 
 XrdCmsFinderTRG (XrdSysLogger *, int, int, XrdOss *theSS=0)
 
 ~XrdCmsFinderTRG ()
 
- Public Member Functions inherited from XrdCmsClient
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 ()
 
 XrdCmsClient (Persona acting)
 
virtual ~XrdCmsClient ()
 Destructor.
 
- Public Member Functions inherited from XrdCmsPerfMon
virtual bool Configure (const char *cfn, char *Parms, XrdSysLogger &Logger, XrdCmsPerfMon &cmsMon, XrdOucEnv *EnvInfo, bool isCMS)
 
virtual void GetInfo (PerfInfo &info)
 
 XrdCmsPerfMon ()
 Constructor & Destructor.
 
virtual ~XrdCmsPerfMon ()
 

Static Public Member Functions

static bool VCheck (XrdVersionInfo &urVersion)
 

Private Member Functions

void Hookup ()
 
int Process (XrdCmsRRData &Data)
 

Private Attributes

XrdOssSS
 
char * CMSPath
 
char * Login
 
XrdOucTListmyManList
 
XrdOucStreamCMSp
 
XrdSysMutex myData
 
XrdSysMutex rrMutex
 
int resMax
 
int resCur
 
int myPort
 
int isRedir
 
int isProxy
 
int Active
 
XrdCmsPerfMonperfMon
 
int perfInt
 

Additional Inherited Members

- Public Types inherited from XrdCmsClient
enum  Persona { amLocal , amRemote , amTarget }
 
- Protected Attributes inherited from XrdCmsClient
Persona myPersona
 

Constructor & Destructor Documentation

◆ XrdCmsFinderTRG()

XrdCmsFinderTRG::XrdCmsFinderTRG ( XrdSysLogger ,
int  ,
int  ,
XrdOss theSS = 0 
)

◆ ~XrdCmsFinderTRG()

XrdCmsFinderTRG::~XrdCmsFinderTRG ( )

Member Function Documentation

◆ Added()

void XrdCmsFinderTRG::Added ( const char *  path,
int  Pend = 0 
)
virtual

Notify the cms of a newly added file or a file whose state has changed on a data server node.

Parameters
pathThe logical file name.
PendWhen true, the file is scheduled to be present in the future (e.g. copied in).

Reimplemented from XrdCmsClient.

◆ Configure()

int XrdCmsFinderTRG::Configure ( const char *  cfn,
char *  Parms,
XrdOucEnv EnvInfo 
)
virtual

Configure the client object.

Parameters
cfnThe configuration file name.
ParmsAny parameters specified in the cmslib directive. If none, the pointer may be null.
EnvInfoEnvironmental information of the caller.
Returns
Success !0 Failure =0

Implements XrdCmsClient.

◆ Hookup()

void XrdCmsFinderTRG::Hookup ( )
private

◆ Locate()

int XrdCmsFinderTRG::Locate ( XrdOucErrInfo Resp,
const char *  path,
int  flags,
XrdOucEnv Info = 0 
)
virtual

Retrieve file location information.

Parameters
RespObject where message or response is to be returned.
pathThe logical path whise location is wanted.
flagsOne 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).
InfoAssociated environmental information for arg2 (e.g., cgi info which can be retrieved by Env1->Env(<len>)).
Returns
As explained under "return conventions".

Implements XrdCmsClient.

◆ Managers()

XrdOucTList * XrdCmsFinderTRG::Managers ( )
inlinevirtual

Obtain the list of cmsd's being used by a manager node along with their associated index numbers, origin 1.

Returns
The list of cmsd's being used. The list is considered permanent and is not deleted.

Reimplemented from XrdCmsClient.

References myManList.

◆ Prepare()

int XrdCmsFinderTRG::Prepare ( XrdOucErrInfo Resp,
XrdSfsPrep pargs,
XrdOucEnv Info = 0 
)
inlinevirtual

Start the preparation of a file for future processing.

Parameters
RespObject where message or response is to be returned.
pargsInformation on which and how to prepare the file.
InfoAssociated environmental information.
Returns
As explained under "return conventions".

Reimplemented from XrdCmsClient.

◆ Process()

int XrdCmsFinderTRG::Process ( XrdCmsRRData Data)
private

◆ PutInfo()

void XrdCmsFinderTRG::PutInfo ( XrdCmsPerfMon::PerfInfo info,
bool  alert = false 
)
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.

Parameters
infoReference to the structure that should be filled out with load values. See the PerfInfo structure.
alertWhen 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.

◆ Release()

int XrdCmsFinderTRG::Release ( int  n)
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.

Parameters
nThe value to add to the resources available (default 1). The total amount is capped by the amount specified by Resource().
Returns
The amount of resource left.

Reimplemented from XrdCmsClient.

◆ Removed()

void XrdCmsFinderTRG::Removed ( const char *  path)
virtual

Notify the cmsd that a file or directory has been deleted. It is only called called on a data server node.

Parameters
pathThe logical file name that was removed.

Reimplemented from XrdCmsClient.

◆ Reserve()

int XrdCmsFinderTRG::Reserve ( int  n)
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.

Parameters
nThe value by which resources are decreased (default 1).
Returns
The amount of resource left.

Reimplemented from XrdCmsClient.

◆ Resource()

int XrdCmsFinderTRG::Resource ( int  n)
virtual

Enables the Reserve() & Release() methods.

Parameters
na positive integer that specifies the amount of resource units that are available. It may be reset at any time.
Returns
The previous resource value. This first call returns 0.

Reimplemented from XrdCmsClient.

◆ Resume()

void XrdCmsFinderTRG::Resume ( int  Perm = 1)
virtual

Resume service after a suspension.

Parameters
PermWhen true the resume persist across server restarts. Otherwise, it is treated as a temporary request.

Reimplemented from XrdCmsClient.

◆ RunAdmin()

int XrdCmsFinderTRG::RunAdmin ( char *  Path,
const char *  vnid 
)

◆ RunPM()

void * XrdCmsFinderTRG::RunPM ( )

◆ Space()

int XrdCmsFinderTRG::Space ( XrdOucErrInfo Resp,
const char *  path,
XrdOucEnv Info = 0 
)
inlinevirtual

Obtain the overall space usage of a cluster. Called only on manager nodes.

Parameters
RespObject to hold response or error message.
pathAssociated logical path for the space request.
InfoAssociated cgi information for path.
Returns
Space information as defined by the response to kYR_statfs. For a typical implementation see XrdCmsNode::do_StatFS().

Implements XrdCmsClient.

◆ Start()

void * XrdCmsFinderTRG::Start ( )

◆ Suspend()

void XrdCmsFinderTRG::Suspend ( int  Perm = 1)
virtual

Suspend service.

Parameters
PermWhen true the suspend persist across server restarts. Otherwise, it is treated as a temporary request.

Reimplemented from XrdCmsClient.

◆ Utilization()

void XrdCmsFinderTRG::Utilization ( unsigned int  util,
bool  alert = false 
)
virtual

Report utilization of this server. This may be used in lieu of general performance metric reporting. For consistent results use only one method.

Parameters
utilA value from 0 to 100 representing utilization. Values greater than 100 are set to be 100.
alertWhen 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.

◆ VCheck()

static bool XrdCmsFinderTRG::VCheck ( XrdVersionInfo &  urVersion)
static

Member Data Documentation

◆ Active

int XrdCmsFinderTRG::Active
private

◆ CMSp

XrdOucStream* XrdCmsFinderTRG::CMSp
private

◆ CMSPath

char* XrdCmsFinderTRG::CMSPath
private

◆ isProxy

int XrdCmsFinderTRG::isProxy
private

◆ isRedir

int XrdCmsFinderTRG::isRedir
private

◆ Login

char* XrdCmsFinderTRG::Login
private

◆ myData

XrdSysMutex XrdCmsFinderTRG::myData
private

◆ myManList

XrdOucTList* XrdCmsFinderTRG::myManList
private

Referenced by Managers().

◆ myPort

int XrdCmsFinderTRG::myPort
private

◆ perfInt

int XrdCmsFinderTRG::perfInt
private

◆ perfMon

XrdCmsPerfMon* XrdCmsFinderTRG::perfMon
private

◆ resCur

int XrdCmsFinderTRG::resCur
private

◆ resMax

int XrdCmsFinderTRG::resMax
private

◆ rrMutex

XrdSysMutex XrdCmsFinderTRG::rrMutex
private

◆ SS

XrdOss* XrdCmsFinderTRG::SS
private

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