48 const
char *workdir, const
char *msd,
Int_t nwk)
51 proof, stype, workdir, msd, nwk)));
69 void TXSlave::DoError(
int level,
const char *location,
const char *fmt, va_list va)
const 81 TXSlaveInterruptHandler(
TXSocket *s = 0)
89 Bool_t TXSlaveInterruptHandler::Notify()
91 Info(
"Notify",
"Processing interrupt signal ...");
95 fSocket->SetInterrupt();
105 const char *workdir,
const char *msd,
Int_t nwk) :
TSlave()
147 Info(
"Init",
"service 'proofd' not found by GetServiceByName" 148 ": using default IANA assigned tcp port 1093");
152 Info(
"Init",
"port from GetServiceByName: %d", port);
190 iam =
"Local Client";
191 mode = (attach) ?
'A' :
'M';
193 Error(
"Init",
"Impossible PROOF <-> SlaveType Configuration Requested");
214 for (
TObject *o = next(); o != 0; o = next()) {
225 Info(
"Init",
"** NOT ** sending user envs - RemoteProtocol : %d",
231 alias +=
Form(
"|envs:%s", envlist.
Data());
238 Error(
"Init",
"while opening the connection to %s - exit", url.
GetUrl(
kTRUE));
246 Error(
"Init",
"some severe error occurred while opening " 262 Info(
"Init",
"user envs setting sent but unsupported remotely - RemoteProtocol : %d",
311 TString dpu = (ilog !=
kNPOS) ? buffer(0, ilog) : buffer;
316 buffer.
Remove(0, ilog +
sizeof(
"|log:") - 1);
322 Warning(
"ParseBuffer",
"expected log path not found in received startup buffer!");
341 Error(
"SetupServ",
"failed to receive slave startup message");
356 Error(
"SetupServ",
"incompatible PROOF versions (remote version " 434 Info(
"Interrupt",
"%p: deactivating from monitor %p",
this, mon);
438 Warning(
"Interrupt",
"%p: reference to PROOF missing",
this);
448 Info(
"Interrupt",
"Interrupt of type %d sent", type);
461 Info(
"StopProcess",
"Request of type %d sent over", abort);
473 Int_t len =
sizeof(cproto);
474 memcpy((
char *)&cproto,
478 ::Error(
"TXSlave::GetProofdProtocol",
479 "sending %d bytes to proofd server [%s:%d]",
489 ::Error(
"TXSlave::GetProofdProtocol",
490 "reading %d bytes from proofd server [%s:%d]",
500 len =
sizeof(rproto);
503 ::Error(
"TXSlave::GetProofdProtocol",
504 "reading %d bytes from proofd server [%s:%d]",
512 ::Info(
"TXSlave::GetProofdProtocol",
513 "remote proofd: buf1: %d, buf2: %d rproto: %d",
573 Printf(
"Proof: connection to master at %s:%d re-established",
576 Printf(
"Proof: connection to node '%s' at %s:%d re-established",
585 Info(
"HandleError",
"%p:%s:%s got called ... fProof: %p, fSocket: %p (valid: %d)",
587 (fSocket ? (
Int_t)fSocket->IsValid() : -1));
599 Info(
"HandleError",
"%p: proof: %p",
this,
fProof);
603 ((
TXSocket *)fSocket)->SetSessionID(-1);
605 ((
TXSocket *)fSocket)->SetInterrupt();
613 TString msg(
Form(
"Worker '%s-%s' has been removed from the active list",
620 Warning(
"HandleError",
"%p: global reference to TProofServ missing",
this);
623 Warning(
"HandleError",
"%p: reference to PROOF missing",
this);
626 Printf(
"TXSlave::HandleError: %p: DONE ... ",
this);
643 Info(
"HandleInput",
"%p: %s: proof: %p, mon: %p",
649 Info(
"HandleInput",
"%p: %s: posting monitor %p",
this,
GetOrdinal(), mon);
655 Info(
"HandleInput",
"%p: %s: not active in current monitor" 656 " - calling TProof::CollectInputFrom",
659 Info(
"HandleInput",
"%p: %s: calling TProof::CollectInputFrom",
668 Warning(
"HandleInput",
"%p: %s: reference to PROOF missing",
this,
GetOrdinal());
682 Info(
"SetInterruptHandler",
"enter: %d", on);
virtual const char * GetName() const
Returns name of object.
static void SetLocation(const char *loc="")
Set location string.
virtual Bool_t IsValid() const
void StopProcess(Bool_t abort, Int_t timeout)
Sent stop/abort request to PROOF server.
static Int_t GetProofdProtocol(TSocket *s)
Find out the remote proofd protocol version.
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
Int_t SendGroupPriority(const char *grp, Int_t priority)
Communicate to the coordinator the priprity of the group to which the user belongs Return 0 on succes...
void SetProtocol(const char *proto, Bool_t setDefaultPort=kFALSE)
Set protocol and, optionally, change the port accordingly.
Collectable string class.
static XSlaveInit xslave_init
virtual Int_t Send(const TMessage &mess)
Send a TMessage object.
virtual Int_t SetOption(ESockOptions opt, Int_t val)
Set socket options.
This class represents a WWW compatible URL.
static TXSocketHandler * GetSocketHandler(TFileHandler *h=0, TSocket *s=0)
Get an instance of the input socket handler with 'h' as handler, connected to socket 's'...
virtual Int_t Recv(TMessage *&mess)
Receive a TMessage object.
const char * GetProtocol() const
TSocket * GetSocket() const
static const TList * GetEnvVars()
Get environemnt variables.
virtual void Add()
Add signal handler to system signal handler list.
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
void ParseBuffer()
Parse fBuffer after a connection attempt.
const char * GetOrdinal() const
Bool_t IsActive(TSocket *s) const
Check if socket 's' is in the active list.
Int_t Ping()
Ping the remote master or slave servers.
Bool_t HandleError(const void *in=0)
Handle error on the input socket.
R__EXTERN TVirtualMutex * gROOTMutex
const char * GetOptions() const
const char * GetName() const
Returns name of object.
This is the version of TSlave for workers servers based on XProofD.
const char * GetHostFQDN() const
Return fully qualified domain name of url host.
TSlave * GetTXSlave(const char *url, const char *ord, Int_t perf, const char *image, TProof *proof, Int_t stype, const char *workdir, const char *msd, Int_t nwk)
const char * GetUrl(Bool_t withDeflt=kFALSE) const
Return full URL.
virtual TObject * FindObject(const char *name) const
Find an object in this list using its name.
void Init(const char *host, Int_t stype)
Init a PROOF slave object.
TSignalHandler * fIntHandler
virtual ~TXSlave()
Destroy slave.
virtual Int_t SendRaw(const void *buffer, Int_t length, ESendRecvOptions opt=kDefault)
Send a raw buffer of specified length.
UShort_t net2host(UShort_t x)
virtual Bool_t IsValid() const
The TNamed class is the base class for all named ROOT classes.
virtual void DeActivate(TSocket *sock)
De-activate a socket.
Int_t GetLogLevel() const
static void SetTXSlaveHook(TSlave_t xslavehook)
Set hook to TXSlave ctor.
virtual const char * Getenv(const char *env)
Get environment variable.
void Info(const char *location, const char *msgfmt,...)
Int_t GetRemoteProtocol() const
Int_t SetupServ(Int_t stype, const char *conffile)
Init a PROOF slave object.
TSignalHandler * fIntHandler
void SetDataPoolUrl(const char *url)
const char * GetPasswd() const
virtual void Close(Option_t *opt="")
Close the socket.
void SetInterruptHandler(Bool_t on=kTRUE)
Set/Unset the interrupt handler.
R__EXTERN TSystem * gSystem
TMonitor * fCurrentMonitor
Input handler for XProofD sockets.
High level handler of connections to XProofD.
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
void SetReady(TSocket *sock)
Called by TSocketHandler::Notify() to signal which socket is ready to be read or written.
TList * GetListOfActives() const
Returns a list with all active sockets.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
char * Form(const char *fmt,...)
static void AddEnvVar(const char *name, const char *value)
Add an variable to the list of environment variables passed to proofserv on the master and slaves...
const Int_t kPROOF_Protocol
Int_t Flush(TSocket *s)
Remove any reference to socket 's' from the global pipe and ready-socket queue.
Bool_t HandleInput(const void *in=0)
Handle asynchronous input on the socket.
TObjString * SendCoordinator(Int_t kind, const char *msg=0, Int_t int2=0)
Send message to intermediate coordinator.
#define R__LOCKGUARD2(mutex)
void Close(Option_t *opt="")
Close slave socket.
TString & Remove(Ssiz_t pos)
void FlushSocket()
Clean any input on the socket.
TXSlave(const char *url, const char *ord, Int_t perf, const char *image, TProof *proof, Int_t stype, const char *workdir, const char *msd, Int_t nwk=1)
Create a PROOF slave object. Called via the TProof ctor.
Ssiz_t Last(char c) const
Find last occurrence of a character c.
virtual void Remove()
Remove signal handler from system signal handler list.
This class controls a Parallel ROOT Facility, PROOF, cluster.
Mother of all ROOT objects.
void Interrupt(Int_t type)
Send interrupt to master or slave servers.
R__EXTERN TProofServ * gProofServ
virtual int GetServiceByName(const char *service)
Get port # of internet service.
void ErrorHandler(int level, const char *location, const char *fmt, va_list va)
General error handler function. It calls the user set error handler.
virtual Int_t GetRemoteProtocol() const
static Int_t GetClientProtocol()
Static method returning supported client protocol.
TInetAddress GetInetAddress() const
virtual void AddFileHandler(TFileHandler *fh)
Add a file handler to the list of system file handlers.
TProofMgr::EServType fServType
void SetAlias(const char *alias)
Set an alias for this session.
Class describing a PROOF worker server.
virtual Int_t RecvRaw(void *buffer, Int_t length, ESendRecvOptions opt=kDefault)
Receive a raw buffer of specified length bytes.
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
void DoError(int level, const char *location, const char *fmt, va_list va) const
Interface to ErrorHandler (protected).
static void DelEnvVar(const char *name)
Remove an variable from the list of environment variables passed to proofserv on the master and slave...
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
Int_t CollectInputFrom(TSocket *s, Int_t endtype=-1, Bool_t deactonfail=kFALSE)
Collect and analyze available input from socket s.
virtual const char * GetTitle() const
Returns title of object.
void Touch()
Touch the client admin file to proof we are alive.
const char * Data() const