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

#include <XrdCmsFinder.hh>

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

Public Member Functions

void Added (const char *path, int Pend=0)
 
int Configure (const char *cfn, char *Args, XrdOucEnv *EnvInfo)
 
int Forward (XrdOucErrInfo &Resp, const char *cmd, const char *arg1=0, const char *arg2=0, XrdOucEnv *Env1=0, XrdOucEnv *Env2=0)
 
int Locate (XrdOucErrInfo &Resp, const char *path, int flags, XrdOucEnv *Info=0)
 
XrdOucTListManagers ()
 
int Prepare (XrdOucErrInfo &Resp, XrdSfsPrep &pargs, XrdOucEnv *Info=0)
 
void Removed (const char *path)
 
void setSS (XrdOss *thess)
 
int Space (XrdOucErrInfo &Resp, const char *path, XrdOucEnv *Info=0)
 
 XrdCmsFinderRMT (XrdSysLogger *lp, int whoami=0, int Port=0)
 
 ~XrdCmsFinderRMT ()
 
- Public Member Functions inherited from XrdCmsClient
virtual int isRemote ()
 
virtual void Resume (int Perm=1)
 
virtual void Suspend (int Perm=1)
 
virtual int Resource (int n)
 
virtual int Reserve (int n=1)
 
virtual int Release (int n=1)
 
virtual void Utilization (unsigned int util, bool alert=false)
 
 XrdCmsClient (Persona acting)
 
virtual ~XrdCmsClient ()
 Destructor.
 

Static Public Member Functions

static bool VCheck (XrdVersionInfo &urVersion)
 

Static Public Attributes

static const int MaxMan = 15
 

Private Member Functions

int Decode (char **resp)
 
void Inform (XrdCmsClientMan *xman, struct iovec xmsg[], int xnum)
 
int LocLocal (XrdOucErrInfo &Resp, XrdOucEnv *Env)
 
XrdCmsClientManSelectManager (XrdOucErrInfo &Resp, const char *path)
 
void SelectManFail (XrdOucErrInfo &Resp)
 
int send2Man (XrdOucErrInfo &, const char *, struct iovec *, int)
 
int StartManagers (XrdOucTList *)
 

Private Attributes

XrdCmsClientManmyManTable [MaxMan]
 
XrdCmsClientManmyManagers
 
XrdOucTListmyManList
 
int myManCount
 
XrdSysMutex myData
 
char * CMSPath
 
int ConWait
 
int RepDelay
 
int RepNone
 
int RepWait
 
int FwdWait
 
int PrepWait
 
int isMeta
 
int isProxy
 
int isTarget
 
int myPort
 
unsigned char SMode
 
unsigned char sendID
 
unsigned char savePath
 

Additional Inherited Members

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

Constructor & Destructor Documentation

◆ XrdCmsFinderRMT()

XrdCmsFinderRMT::XrdCmsFinderRMT ( XrdSysLogger lp,
int  whoami = 0,
int  Port = 0 
)

◆ ~XrdCmsFinderRMT()

XrdCmsFinderRMT::~XrdCmsFinderRMT ( )

Member Function Documentation

◆ Added()

void XrdCmsFinderRMT::Added ( const char *  path,
int  Pend = 0 
)
inlinevirtual

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 XrdCmsFinderRMT::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.

◆ Decode()

int XrdCmsFinderRMT::Decode ( char **  resp)
private

◆ Forward()

int XrdCmsFinderRMT::Forward ( XrdOucErrInfo Resp,
const char *  cmd,
const char *  arg1 = 0,
const char *  arg2 = 0,
XrdOucEnv Env1 = 0,
XrdOucEnv Env2 = 0 
)
virtual

Relay a meta-operation to all nodes in the cluster.

This method is only used on manager nodes and is enabled by the ofs.forward directive.

Parameters
RespObject where messages are to be returned.
cmdThe operation being performed (see table below). If it starts with a '+' then a response (2way) is needed. Otherwise, a best-effort is all that is all that is required and success can always be returned.
arg11st argument to cmd.
arg22nd argument to cmd, which may be null if none exists.
Env1Associated environmental information for arg1 (e.g., cgi info which can be retrieved by Env1->Env(<len>)).
Env2Associated environmental information for arg2 (e.g., cgi info which can be retrieved by Env1->Env(<len>)).
     cmd       arg1    arg2           cmd       arg1    arg2
     --------  ------  ------         --------  ------  ------
     [+]chmod  <path>  <mode %o>      [+]rmdir  <path>  0
     [+]mkdir  <path>  <mode %o>      [+]mv     <oldp>  <newp>
     [+]mkpath <path>  <mode %o>      [+]trunc  <path>  <size %lld>
     [+]rm     <path>  0
Returns
As explained under "return conventions".

Reimplemented from XrdCmsClient.

◆ Inform()

void XrdCmsFinderRMT::Inform ( XrdCmsClientMan xman,
struct iovec  xmsg[],
int  xnum 
)
private

◆ Locate()

int XrdCmsFinderRMT::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.

◆ LocLocal()

int XrdCmsFinderRMT::LocLocal ( XrdOucErrInfo Resp,
XrdOucEnv Env 
)
private

◆ Managers()

XrdOucTList * XrdCmsFinderRMT::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 XrdCmsFinderRMT::Prepare ( XrdOucErrInfo Resp,
XrdSfsPrep pargs,
XrdOucEnv Info = 0 
)
virtual

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.

◆ Removed()

void XrdCmsFinderRMT::Removed ( const char *  path)
inlinevirtual

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.

◆ SelectManager()

XrdCmsClientMan * XrdCmsFinderRMT::SelectManager ( XrdOucErrInfo Resp,
const char *  path 
)
private

◆ SelectManFail()

void XrdCmsFinderRMT::SelectManFail ( XrdOucErrInfo Resp)
private

◆ send2Man()

int XrdCmsFinderRMT::send2Man ( XrdOucErrInfo ,
const char *  ,
struct iovec *  ,
int   
)
private

◆ setSS()

void XrdCmsFinderRMT::setSS ( XrdOss thess)
inline

◆ Space()

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

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.

◆ StartManagers()

int XrdCmsFinderRMT::StartManagers ( XrdOucTList )
private

◆ VCheck()

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

Member Data Documentation

◆ CMSPath

char* XrdCmsFinderRMT::CMSPath
private

◆ ConWait

int XrdCmsFinderRMT::ConWait
private

◆ FwdWait

int XrdCmsFinderRMT::FwdWait
private

◆ isMeta

int XrdCmsFinderRMT::isMeta
private

◆ isProxy

int XrdCmsFinderRMT::isProxy
private

◆ isTarget

int XrdCmsFinderRMT::isTarget
private

◆ MaxMan

const int XrdCmsFinderRMT::MaxMan = 15
static

◆ myData

XrdSysMutex XrdCmsFinderRMT::myData
private

◆ myManagers

XrdCmsClientMan* XrdCmsFinderRMT::myManagers
private

◆ myManCount

int XrdCmsFinderRMT::myManCount
private

◆ myManList

XrdOucTList* XrdCmsFinderRMT::myManList
private

Referenced by Managers().

◆ myManTable

XrdCmsClientMan* XrdCmsFinderRMT::myManTable[MaxMan]
private

◆ myPort

int XrdCmsFinderRMT::myPort
private

◆ PrepWait

int XrdCmsFinderRMT::PrepWait
private

◆ RepDelay

int XrdCmsFinderRMT::RepDelay
private

◆ RepNone

int XrdCmsFinderRMT::RepNone
private

◆ RepWait

int XrdCmsFinderRMT::RepWait
private

◆ savePath

unsigned char XrdCmsFinderRMT::savePath
private

◆ sendID

unsigned char XrdCmsFinderRMT::sendID
private

◆ SMode

unsigned char XrdCmsFinderRMT::SMode
private

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