47 const char *workdir,
const char *msd,
Int_t nwk)
50 proof, stype, workdir, msd, nwk)));
68void TXSlave::DoError(
int level,
const char *location,
const char *fmt, va_list va)
const
90 Info(
"Notify",
"Processing interrupt signal ...");
104 const char *workdir,
const char *msd,
Int_t nwk) :
TSlave()
146 Info(
"Init",
"service 'proofd' not found by GetServiceByName"
147 ": using default IANA assigned tcp port 1093");
151 Info(
"Init",
"port from GetServiceByName: %d", port);
189 iam =
"Local Client";
190 mode = (attach) ?
'A' :
'M';
192 Error(
"Init",
"Impossible PROOF <-> SlaveType Configuration Requested");
198 alias +=
Form(
"|cf:%s",
fProof->fConfFile.Data());
202 if (!
fProof->GetManager() ||
203 fProof->GetManager()->GetRemoteProtocol() > 1001) {
206 if (
gSystem->Getenv(
"XrdSecPROTOCOL")) {
213 for (
TObject *o = next(); o != 0; o = next()) {
224 Info(
"Init",
"** NOT ** sending user envs - RemoteProtocol : %d",
225 fProof->GetManager()->GetRemoteProtocol());
230 alias +=
Form(
"|envs:%s", envlist.
Data());
235 -1, alias,
fProof->GetLogLevel(),
this))) {
237 Error(
"Init",
"while opening the connection to %s - exit", url.
GetUrl(
kTRUE));
245 Error(
"Init",
"some severe error occurred while opening "
250 PDB(kGlobal,3)
Info(
"Init",
"%s: fUser is .... %s", iam.
Data(),
fUser.Data());
261 Info(
"Init",
"user envs setting sent but unsupported remotely - RemoteProtocol : %d",
292 Info(
"Init",
"%s: fUser is .... %s", iam.
Data(),
fUser.Data());
310 TString dpu = (ilog !=
kNPOS) ? buffer(0, ilog) : buffer;
315 buffer.
Remove(0, ilog +
sizeof(
"|log:") - 1);
321 Warning(
"ParseBuffer",
"expected log path not found in received startup buffer!");
340 Error(
"SetupServ",
"failed to receive slave startup message");
355 Error(
"SetupServ",
"incompatible PROOF versions (remote version "
434 Info(
"Interrupt",
"%p: deactivating from monitor %p",
this, mon);
439 Warning(
"Interrupt",
"%p: reference to PROOF missing",
this);
449 Info(
"Interrupt",
"Interrupt of type %d sent",
type);
462 Info(
"StopProcess",
"Request of type %d sent over", abort);
475 memcpy((
char *)&cproto,
479 ::Error(
"TXSlave::GetProofdProtocol",
480 "sending %d bytes to proofd server [%s:%d]",
490 ::Error(
"TXSlave::GetProofdProtocol",
491 "reading %d bytes from proofd server [%s:%d]",
501 len =
sizeof(rproto);
504 ::Error(
"TXSlave::GetProofdProtocol",
505 "reading %d bytes from proofd server [%s:%d]",
513 ::Info(
"TXSlave::GetProofdProtocol",
514 "remote proofd: buf1: %d, buf2: %d rproto: %d",
574 Printf(
"Proof: connection to master at %s:%d re-established",
577 Printf(
"Proof: connection to node '%s' at %s:%d re-established",
586 Info(
"HandleError",
"%p:%s:%s got called ... fProof: %p, fSocket: %p (valid: %d)",
598 fProof->fIntHandler->Remove();
600 Info(
"HandleError",
"%p: proof: %p",
this,
fProof);
614 TString msg(
Form(
"Worker '%s-%s' has been removed from the active list",
621 Warning(
"HandleError",
"%p: global reference to TProofServ missing",
this);
624 Warning(
"HandleError",
"%p: reference to PROOF missing",
this);
627 Printf(
"TXSlave::HandleError: %p: DONE ... ",
this);
644 Info(
"HandleInput",
"%p: %s: proof: %p, mon: %p",
650 Info(
"HandleInput",
"%p: %s: posting monitor %p",
this,
GetOrdinal(), mon);
656 Info(
"HandleInput",
"%p: %s: not active in current monitor"
657 " - calling TProof::CollectInputFrom",
660 Info(
"HandleInput",
"%p: %s: calling TProof::CollectInputFrom",
669 Warning(
"HandleInput",
"%p: %s: reference to PROOF missing",
this,
GetOrdinal());
683 Info(
"SetInterruptHandler",
"enter: %d",
on);
UShort_t net2host(UShort_t x)
void ErrorHandler(int level, const char *location, const char *fmt, std::va_list va)
General error handler function. It calls the user set error handler.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void on
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t UChar_t len
Option_t Option_t TPoint TPoint const char mode
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
R__EXTERN TProofServ * gProofServ
const Int_t kPROOF_Protocol
externTVirtualMutex * gROOTMutex
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
void Printf(const char *fmt,...)
Formats a string in a circular formatting buffer and prints the string.
R__EXTERN TSystem * gSystem
#define R__LOCKGUARD(mutex)
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)
static XSlaveInit xslave_init
TObject * FindObject(const char *name) const override
Find an object in this list using its name.
void SetReady(TSocket *sock)
Called by TSocketHandler::Notify() to signal which socket is ready to be read or written.
virtual void DeActivate(TSocket *sock)
De-activate a socket.
TList * GetListOfActives() const
Returns a list with all active sockets.
Bool_t IsActive(TSocket *s) const
Check if socket 's' is in the active list.
The TNamed class is the base class for all named ROOT classes.
const char * GetName() const override
Returns name of object.
const char * GetTitle() const override
Returns title of object.
Collectable string class.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
TObject()
TObject constructor.
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
This class controls a Parallel ROOT Facility, PROOF, cluster.
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.
static const TList * GetEnvVars()
Get environemnt variables.
static void DelEnvVar(const char *name)
Remove an variable from the list of environment variables passed to proofserv on the master and slave...
Class describing a PROOF worker server.
const char * GetName() const override
Returns name of object.
static void SetTXSlaveHook(TSlave_t xslavehook)
Set hook to TXSlave ctor.
virtual Bool_t IsValid() const
const char * GetOrdinal() const
This class implements client sockets.
static Int_t GetClientProtocol()
Static method returning supported client protocol.
TInetAddress GetInetAddress() const
virtual Int_t RecvRaw(void *buffer, Int_t length, ESendRecvOptions opt=kDefault)
Receive a raw buffer of specified length bytes.
virtual Int_t SendRaw(const void *buffer, Int_t length, ESendRecvOptions opt=kDefault)
Send a raw buffer of specified length.
Int_t Atoi() const
Return integer value of string.
const char * Data() const
Bool_t IsDigit() const
Returns true if all characters in string are digits (0-9) or white spaces, i.e.
TString & Remove(Ssiz_t pos)
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
This class represents a WWW compatible URL.
const char * GetUrl(Bool_t withDeflt=kFALSE) const
Return full URL.
void SetProtocol(const char *proto, Bool_t setDefaultPort=kFALSE)
Set protocol and, optionally, change the port accordingly.
const char * GetPasswd() const
const char * GetHostFQDN() const
Return fully qualified domain name of url host.
const char * GetOptions() const
TXSlaveInterruptHandler(TXSocket *s=0)
Bool_t Notify()
TXSlave interrupt handler.
This is the version of TSlave for workers servers based on XProofD.
Int_t SetupServ(Int_t stype, const char *conffile) override
Init a PROOF slave object.
void SetInterruptHandler(Bool_t on=kTRUE) override
Set/Unset the interrupt handler.
Int_t Ping() override
Ping the remote master or slave servers.
Int_t SendGroupPriority(const char *grp, Int_t priority) override
Communicate to the coordinator the priprity of the group to which the user belongs Return 0 on succes...
void Close(Option_t *opt="") override
Close slave socket.
void SetAlias(const char *alias) override
Set an alias for this session.
void FlushSocket() override
Clean any input on the socket.
TObjString * SendCoordinator(Int_t kind, const char *msg=0, Int_t int2=0) override
Send message to intermediate coordinator.
Bool_t HandleError(const void *in=0) override
Handle error on the input socket.
static Int_t GetProofdProtocol(TSocket *s)
Find out the remote proofd protocol version.
~TXSlave() override
Destroy slave.
void StopProcess(Bool_t abort, Int_t timeout) override
Sent stop/abort request to PROOF server.
void Touch() override
Touch the client admin file to proof we are alive.
void Interrupt(Int_t type) override
Send interrupt to master or slave servers.
TSignalHandler * fIntHandler
Bool_t HandleInput(const void *in=0) override
Handle asynchronous input on the socket.
void ParseBuffer()
Parse fBuffer after a connection attempt.
void Init(const char *host, Int_t stype)
Init a PROOF slave object.
void DoError(int level, const char *location, const char *fmt, va_list va) const override
Interface to ErrorHandler (protected).
Input handler for XProofD sockets.
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'.
High level handler of connections to XProofD.
static void SetLocation(const char *loc="")
Set location string.