ROOT  6.06/09
Reference Guide
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 ()
 
virtual int GetWorkers (XrdProofdProofServ *xps, std::list< XrdProofWorker * > *, const char *)
 Get a list of workers that can be used by session 'xps'. More...
 
virtual int Reschedule ()
 Consider starting some query from the queue. More...
 
virtual int UpdateSession (XrdProofdProofServ *, int=0, void *=0)
 
virtual int MaxSessions () const
 
virtual int UpdateProperties ()
 
virtual int ExportInfo (XrdOucString &)
 Fill sbuf with some info about our current status. More...
 
virtual bool IsValid ()
 
const char * Name () const
 
virtual int ProcessDirective (XrdProofdDirective *d, char *val, XrdOucStream *cfg, bool rcf)
 Update the priorities of the active sessions. 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 void DumpQueues (const char *prefix=0)
 Dump the content of the waiting sessions queue. More...
 
virtual XrdProofdProofServFirstSession ()
 Get first valid session. More...
 
int CheckFrequency () const
 
XrdProofdPipePipe ()
 
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...
 
- Public Member Functions inherited from XrdProofdConfig
 XrdProofdConfig (const char *cfg=0, XrdSysError *edest=0)
 Main constructor. More...
 
virtual ~XrdProofdConfig ()
 
void SetCfgEDest (const char *cfg, XrdSysError *edest)
 Set config file and error handler. More...
 
const char * CfgFile () const
 

Protected Member Functions

virtual void RegisterDirectives ()
 Register directives for configuration. More...
 
virtual int DoDirectiveSchedParam (char *, XrdOucStream *, bool)
 Process 'schedparam' directive. More...
 
virtual int DoDirectiveResource (char *, XrdOucStream *, bool)
 Process 'resource' directive. More...
 
virtual int GetNumWorkers (XrdProofdProofServ *xps)
 Calculate the number of workers to be used given the state of the cluster. 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

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

#include <XrdProofSched.h>

+ Inheritance diagram for XrdProofSched:
+ Collaboration diagram for XrdProofSched:

Member Enumeration Documentation

Enumerator
kReschedule 

Definition at line 114 of file XrdProofSched.h.

Constructor & Destructor Documentation

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

Constructor.

Definition at line 166 of file XrdProofSched.cxx.

virtual XrdProofSched::~XrdProofSched ( )
inlinevirtual

Definition at line 68 of file XrdProofSched.h.

Member Function Documentation

int XrdProofSched::CheckFrequency ( ) const
inline

Definition at line 107 of file XrdProofSched.h.

Referenced by XrdProofSchedCron().

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.

Referenced by XrdProofdManager::Config().

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.

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

Process 'resource' directive.

Definition at line 878 of file XrdProofSched.cxx.

Referenced by DoDirective(), and ProcessDirective().

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

Process 'schedparam' directive.

Definition at line 809 of file XrdProofSched.cxx.

Referenced by DoDirective(), and ProcessDirective().

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

Dump the content of the waiting sessions queue.

Definition at line 301 of file XrdProofSched.cxx.

Referenced by Enqueue(), FirstSession(), and Reschedule().

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.

Referenced by GetWorkers().

int XrdProofSched::ExportInfo ( XrdOucString &  sbuf)
virtual

Fill sbuf with some info about our current status.

Definition at line 756 of file XrdProofSched.cxx.

Referenced by XrdProofdAdmin::QueryWorkers().

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.

Referenced by Reschedule().

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.

Referenced by 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.

Referenced by XrdProofdManager::GetWorkers().

virtual bool XrdProofSched::IsValid ( )
inlinevirtual

Definition at line 96 of file XrdProofSched.h.

Referenced by XrdProofdManager::LoadScheduler().

virtual int XrdProofSched::MaxSessions ( ) const
inlinevirtual

Definition at line 89 of file XrdProofSched.h.

Referenced by XrdProofdProofServMgr::Create().

const char* XrdProofSched::Name ( ) const
inline

Definition at line 98 of file XrdProofSched.h.

Referenced by XrdProofdManager::LoadScheduler().

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

Update the priorities of the active sessions.

Definition at line 788 of file XrdProofSched.cxx.

void XrdProofSched::RegisterDirectives ( )
protectedvirtual

Register directives for configuration.

Reimplemented from XrdProofdConfig.

Definition at line 190 of file XrdProofSched.cxx.

Referenced by XrdProofSched().

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 702 of file XrdProofSched.cxx.

Referenced by XrdProofSchedCron().

void XrdProofSched::ResetParameters ( )
protectedvirtual

Reset values for the configurable parameters.

Definition at line 221 of file XrdProofSched.cxx.

Referenced by DoDirectiveSchedParam(), and XrdProofSched().

virtual int XrdProofSched::UpdateProperties ( )
inlinevirtual

Definition at line 92 of file XrdProofSched.h.

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

Definition at line 86 of file XrdProofSched.h.

Member Data Documentation

int XrdProofSched::fCheckFrequency
protected

Definition at line 136 of file XrdProofSched.h.

Referenced by CheckFrequency(), and ResetParameters().

XrdOucHash<XrdProofdDirective> XrdProofSched::fConfigDirectives
protected

Definition at line 134 of file XrdProofSched.h.

XrdSysError* XrdProofSched::fEDest
protected

Definition at line 139 of file XrdProofSched.h.

Referenced by XrdProofSched().

XrdProofGroupMgr* XrdProofSched::fGrpMgr
protected

Definition at line 120 of file XrdProofSched.h.

Referenced by GetNumWorkers(), and XrdProofSched().

int XrdProofSched::fMaxRunning
protected

Definition at line 123 of file XrdProofSched.h.

Referenced by Config(), DoDirectiveSchedParam(), GetWorkers(), and ResetParameters().

int XrdProofSched::fMaxSessions
protected
XrdProofdManager* XrdProofSched::fMgr
protected

Definition at line 119 of file XrdProofSched.h.

Referenced by ExportInfo(), GetNumWorkers(), GetWorkers(), Reschedule(), and XrdProofSched().

int XrdProofSched::fMinForQuery
protected

Definition at line 128 of file XrdProofSched.h.

Referenced by DoDirectiveSchedParam(), GetNumWorkers(), and ResetParameters().

char XrdProofSched::fName[kXPSMXNMLEN]
protected

Definition at line 117 of file XrdProofSched.h.

Referenced by Name(), and XrdProofSched().

int XrdProofSched::fNextWrk
protected

Definition at line 126 of file XrdProofSched.h.

Referenced by GetWorkers(), and XrdProofSched().

double XrdProofSched::fNodesFraction
protected

Definition at line 129 of file XrdProofSched.h.

Referenced by DoDirectiveSchedParam(), GetNumWorkers(), and ResetParameters().

int XrdProofSched::fOptWrksPerUnit
protected

Definition at line 127 of file XrdProofSched.h.

Referenced by DoDirectiveSchedParam(), GetNumWorkers(), and ResetParameters().

XrdProofdPipe XrdProofSched::fPipe
protected

Definition at line 137 of file XrdProofSched.h.

Referenced by Pipe().

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

Definition at line 132 of file XrdProofSched.h.

Referenced by DumpQueues(), Enqueue(), FirstSession(), and Reschedule().

bool XrdProofSched::fUseFIFO
protected

Definition at line 131 of file XrdProofSched.h.

Referenced by Config(), DoDirectiveSchedParam(), GetWorkers(), Reschedule(), and XrdProofSched().

bool XrdProofSched::fValid
protected

Definition at line 118 of file XrdProofSched.h.

Referenced by Config(), IsValid(), and XrdProofSched().

int XrdProofSched::fWorkerMax
protected
int XrdProofSched::fWorkerSel
protected

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