Logo ROOT   6.14/05
Reference Guide
List of all members | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
XrdProofSched Class Reference

Definition at line 62 of file XrdProofSched.h.

Public Types

enum  SchedProtocol { kReschedule = 0 }
 

Public Member Functions

 XrdProofSched (const char *name, XrdProofdManager *mgr, XrdProofGroupMgr *grpmgr, const char *cfn, XrdSysError *e=0)
 Constructor. More...
 
virtual ~XrdProofSched ()
 
int CheckFrequency () const
 
virtual int Config (bool rcf=0)
 Configure this instance using the content of file 'cfn'. More...
 
virtual int DoDirective (XrdProofdDirective *d, char *val, XrdOucStream *cfg, bool rcf)
 Update the priorities of the active sessions. More...
 
virtual void DumpQueues (const char *prefix=0)
 Dump the content of the waiting sessions queue. More...
 
virtual int Enqueue (XrdProofdProofServ *xps, XrdProofQuery *query)
 Queue a query in the session; if this is the first querym enqueue also the session. More...
 
virtual int ExportInfo (XrdOucString &)
 Fill sbuf with some info about our current status. More...
 
virtual XrdProofdProofServFirstSession ()
 Get first valid session. More...
 
virtual int GetWorkers (XrdProofdProofServ *xps, std::list< XrdProofWorker *> *, const char *)
 Get a list of workers that can be used by session 'xps'. More...
 
virtual bool IsValid ()
 
virtual int MaxSessions () const
 
const char * Name () const
 
XrdProofdPipePipe ()
 
virtual int ProcessDirective (XrdProofdDirective *d, char *val, XrdOucStream *cfg, bool rcf)
 Update the priorities of the active sessions. More...
 
virtual int Reschedule ()
 Consider starting some query from the queue. More...
 
virtual int UpdateProperties ()
 
virtual int UpdateSession (XrdProofdProofServ *, int=0, void *=0)
 
- Public Member Functions inherited from XrdProofdConfig
 XrdProofdConfig (const char *cfg=0, XrdSysError *edest=0)
 Main constructor. More...
 
virtual ~XrdProofdConfig ()
 
const char * CfgFile () const
 
void SetCfgEDest (const char *cfg, XrdSysError *edest)
 Set config file and error handler. More...
 

Protected Member Functions

virtual int DoDirectiveResource (char *, XrdOucStream *, bool)
 Process 'resource' directive. More...
 
virtual int DoDirectiveSchedParam (char *, XrdOucStream *, bool)
 Process 'schedparam' directive. More...
 
virtual int GetNumWorkers (XrdProofdProofServ *xps)
 Calculate the number of workers to be used given the state of the cluster. More...
 
virtual void RegisterDirectives ()
 Register directives for configuration. More...
 
virtual void ResetParameters ()
 Reset values for the configurable parameters. More...
 
- Protected Member Functions inherited from XrdProofdConfig
int ParseFile (bool rcf=false)
 Parse config file for the registered directives. More...
 
bool ReadFile (bool update=true)
 Return true if the file has never been read or did change since last reading, false otherwise. More...
 
void Register (const char *dname, XrdProofdDirective *d)
 

Protected Attributes

int fCheckFrequency
 
XrdOucHash< XrdProofdDirectivefConfigDirectives
 
XrdSysErrorfEDest
 
XrdProofGroupMgrfGrpMgr
 
int fMaxRunning
 
int fMaxSessions
 
XrdProofdManagerfMgr
 
int fMinForQuery
 
char fName [kXPSMXNMLEN]
 
int fNextWrk
 
double fNodesFraction
 
int fOptWrksPerUnit
 
XrdProofdPipe fPipe
 
std::list< XrdProofdProofServ * > fQueue
 
bool fUseFIFO
 
bool fValid
 
int fWorkerMax
 
int fWorkerSel
 
- Protected Attributes inherited from XrdProofdConfig
XrdSysErrorfEDest
 

#include <XrdProofSched.h>

Inheritance diagram for XrdProofSched:
[legend]

Member Enumeration Documentation

◆ SchedProtocol

Enumerator
kReschedule 

Definition at line 114 of file XrdProofSched.h.

Constructor & Destructor Documentation

◆ XrdProofSched()

XrdProofSched::XrdProofSched ( const char *  name,
XrdProofdManager mgr,
XrdProofGroupMgr grpmgr,
const char *  cfn,
XrdSysError e = 0 
)

Constructor.

Definition at line 166 of file XrdProofSched.cxx.

◆ ~XrdProofSched()

virtual XrdProofSched::~XrdProofSched ( )
inlinevirtual

Definition at line 68 of file XrdProofSched.h.

Member Function Documentation

◆ CheckFrequency()

int XrdProofSched::CheckFrequency ( ) const
inline

Definition at line 107 of file XrdProofSched.h.

◆ Config()

int XrdProofSched::Config ( bool  rcf = 0)
virtual

Configure this instance using the content of file 'cfn'.

Return 0 on success, -1 in case of failure (file does not exists or containing incoherent information).

Reimplemented from XrdProofdConfig.

Definition at line 238 of file XrdProofSched.cxx.

◆ DoDirective()

int XrdProofSched::DoDirective ( XrdProofdDirective d,
char *  val,
XrdOucStream *  cfg,
bool  rcf 
)
virtual

Update the priorities of the active sessions.

Reimplemented from XrdProofdConfig.

Definition at line 199 of file XrdProofSched.cxx.

◆ DoDirectiveResource()

int XrdProofSched::DoDirectiveResource ( char *  val,
XrdOucStream *  cfg,
bool   
)
protectedvirtual

Process 'resource' directive.

Definition at line 882 of file XrdProofSched.cxx.

◆ DoDirectiveSchedParam()

int XrdProofSched::DoDirectiveSchedParam ( char *  val,
XrdOucStream *  cfg,
bool   
)
protectedvirtual

Process 'schedparam' directive.

Definition at line 813 of file XrdProofSched.cxx.

◆ DumpQueues()

void XrdProofSched::DumpQueues ( const char *  prefix = 0)
virtual

Dump the content of the waiting sessions queue.

Definition at line 301 of file XrdProofSched.cxx.

◆ Enqueue()

int XrdProofSched::Enqueue ( XrdProofdProofServ xps,
XrdProofQuery query 
)
virtual

Queue a query in the session; if this is the first querym enqueue also the session.

Definition at line 278 of file XrdProofSched.cxx.

◆ ExportInfo()

int XrdProofSched::ExportInfo ( XrdOucString &  sbuf)
virtual

Fill sbuf with some info about our current status.

Definition at line 760 of file XrdProofSched.cxx.

◆ FirstSession()

XrdProofdProofServ * XrdProofSched::FirstSession ( )
virtual

Get first valid session.

The dataset information can be used to assign workers.

Definition at line 322 of file XrdProofSched.cxx.

◆ GetNumWorkers()

int XrdProofSched::GetNumWorkers ( XrdProofdProofServ xps)
protectedvirtual

Calculate the number of workers to be used given the state of the cluster.

Definition at line 341 of file XrdProofSched.cxx.

◆ GetWorkers()

int XrdProofSched::GetWorkers ( XrdProofdProofServ xps,
std::list< XrdProofWorker *> *  wrks,
const char *  querytag 
)
virtual

Get a list of workers that can be used by session 'xps'.

The return code is: -1 Some failure occured; cannot continue 0 A new list has been assigned to the session 'xps' and returned in 'wrks' 1 The list currently assigned to the session is the one to be used 2 No worker could be assigned now; session should be queued

Definition at line 397 of file XrdProofSched.cxx.

◆ IsValid()

virtual bool XrdProofSched::IsValid ( )
inlinevirtual

Definition at line 96 of file XrdProofSched.h.

◆ MaxSessions()

virtual int XrdProofSched::MaxSessions ( ) const
inlinevirtual

Definition at line 89 of file XrdProofSched.h.

◆ Name()

const char* XrdProofSched::Name ( ) const
inline

Definition at line 98 of file XrdProofSched.h.

◆ Pipe()

XrdProofdPipe* XrdProofSched::Pipe ( )
inline

Definition at line 108 of file XrdProofSched.h.

◆ ProcessDirective()

int XrdProofSched::ProcessDirective ( XrdProofdDirective d,
char *  val,
XrdOucStream *  cfg,
bool  rcf 
)
virtual

Update the priorities of the active sessions.

Definition at line 792 of file XrdProofSched.cxx.

◆ RegisterDirectives()

void XrdProofSched::RegisterDirectives ( )
protectedvirtual

Register directives for configuration.

Reimplemented from XrdProofdConfig.

Definition at line 190 of file XrdProofSched.cxx.

◆ Reschedule()

int XrdProofSched::Reschedule ( )
virtual

Consider starting some query from the queue.

to be called after some resources are free (e.g. by a finished query) This method is doing the full transaction of finding the session to resume, assigning it workers and sending a resume message. In this way there is not possibility of interference with other GetWorkers return 0 in case of success and -1 in case of an error

Definition at line 706 of file XrdProofSched.cxx.

◆ ResetParameters()

void XrdProofSched::ResetParameters ( )
protectedvirtual

Reset values for the configurable parameters.

Definition at line 221 of file XrdProofSched.cxx.

◆ UpdateProperties()

virtual int XrdProofSched::UpdateProperties ( )
inlinevirtual

Definition at line 92 of file XrdProofSched.h.

◆ UpdateSession()

virtual int XrdProofSched::UpdateSession ( XrdProofdProofServ ,
int  = 0,
void = 0 
)
inlinevirtual

Definition at line 86 of file XrdProofSched.h.

Member Data Documentation

◆ fCheckFrequency

int XrdProofSched::fCheckFrequency
protected

Definition at line 136 of file XrdProofSched.h.

◆ fConfigDirectives

XrdOucHash<XrdProofdDirective> XrdProofSched::fConfigDirectives
protected

Definition at line 134 of file XrdProofSched.h.

◆ fEDest

XrdSysError* XrdProofSched::fEDest
protected

Definition at line 139 of file XrdProofSched.h.

◆ fGrpMgr

XrdProofGroupMgr* XrdProofSched::fGrpMgr
protected

Definition at line 120 of file XrdProofSched.h.

◆ fMaxRunning

int XrdProofSched::fMaxRunning
protected

Definition at line 123 of file XrdProofSched.h.

◆ fMaxSessions

int XrdProofSched::fMaxSessions
protected

Definition at line 122 of file XrdProofSched.h.

◆ fMgr

XrdProofdManager* XrdProofSched::fMgr
protected

Definition at line 119 of file XrdProofSched.h.

◆ fMinForQuery

int XrdProofSched::fMinForQuery
protected

Definition at line 128 of file XrdProofSched.h.

◆ fName

char XrdProofSched::fName[kXPSMXNMLEN]
protected

Definition at line 117 of file XrdProofSched.h.

◆ fNextWrk

int XrdProofSched::fNextWrk
protected

Definition at line 126 of file XrdProofSched.h.

◆ fNodesFraction

double XrdProofSched::fNodesFraction
protected

Definition at line 129 of file XrdProofSched.h.

◆ fOptWrksPerUnit

int XrdProofSched::fOptWrksPerUnit
protected

Definition at line 127 of file XrdProofSched.h.

◆ fPipe

XrdProofdPipe XrdProofSched::fPipe
protected

Definition at line 137 of file XrdProofSched.h.

◆ fQueue

std::list<XrdProofdProofServ *> XrdProofSched::fQueue
protected

Definition at line 132 of file XrdProofSched.h.

◆ fUseFIFO

bool XrdProofSched::fUseFIFO
protected

Definition at line 131 of file XrdProofSched.h.

◆ fValid

bool XrdProofSched::fValid
protected

Definition at line 118 of file XrdProofSched.h.

◆ fWorkerMax

int XrdProofSched::fWorkerMax
protected

Definition at line 124 of file XrdProofSched.h.

◆ fWorkerSel

int XrdProofSched::fWorkerSel
protected

Definition at line 125 of file XrdProofSched.h.

Libraries for XrdProofSched:
[legend]

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