Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TSlave.cxx
Go to the documentation of this file.
1// @(#)root/proof:$Id$
2// Author: Fons Rademakers 14/02/97
3
4/*************************************************************************
5 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
12/** \class TSlave
13\ingroup proofkernel
14
15Class describing a PROOF worker server. It contains information like the
16workers host name, ordinal number, performance index, socket, etc.
17Objects of this class can only be created via TProof member functions.
18
19*/
20
21#include <stdlib.h>
22
23#include "RConfigure.h"
24#include "TApplication.h"
25#include "TSlave.h"
26#include "TSlaveLite.h"
27#include "TProof.h"
28#include "TSystem.h"
29#include "TROOT.h"
30#include "TUrl.h"
31#include "TMessage.h"
32#include "TError.h"
33#include "TVirtualMutex.h"
34#include "TSocket.h"
35#include "TObjString.h"
36
38
39// Hook for the TXSlave constructor
41
42////////////////////////////////////////////////////////////////////////////////
43/// Create a PROOF slave object. Called via the TProof ctor.
44
45TSlave::TSlave(const char *url, const char *ord, Int_t perf,
46 const char *image, TProof *proof, Int_t stype,
47 const char *workdir, const char *msd, Int_t)
48 : fImage(image), fProofWorkDir(workdir),
49 fWorkDir(workdir), fPort(-1),
50 fOrdinal(ord), fPerfIdx(perf),
51 fProtocol(0), fSocket(0), fProof(proof),
52 fInput(0), fBytesRead(0), fRealTime(0),
53 fCpuTime(0), fSlaveType((ESlaveType)stype), fStatus(TSlave::kInvalid),
54 fParallel(0), fMsd(msd)
55{
56 fName = TUrl(url).GetHostFQDN();
57 fPort = TUrl(url).GetPort();
58
59 Init(url, -1, stype);
60}
61
62////////////////////////////////////////////////////////////////////////////////
63/// Default constructor used by derived classes
64
66{
67 fPort = -1;
68 fOrdinal = "-1";
69 fPerfIdx = -1;
70 fProof = 0;
72 fProtocol = 0;
73 fSocket = 0;
74 fInput = 0;
75 fBytesRead = 0;
76 fRealTime = 0;
77 fCpuTime = 0;
79 fParallel = 0;
80}
81
82////////////////////////////////////////////////////////////////////////////////
83/// Init a PROOF slave object. Called via the TSlave ctor.
84/// The Init method is technology specific and is overwritten by derived
85/// classes.
86
87void TSlave::Init(const char *host, Int_t port, Int_t stype)
88{
89 // The url contains information about the server type: make sure
90 // it is 'proofd' or alike
92 proto.Insert(5, 'd');
93
94 TUrl hurl(host);
95 hurl.SetProtocol(proto);
96 if (port > 0)
97 hurl.SetPort(port);
98
99 // Add information about our status (Client or Master)
100 TString iam;
101 if (fProof->IsMaster() && stype == kSlave) {
102 iam = "Master";
103 hurl.SetOptions("SM");
104 } else if (fProof->IsMaster() && stype == kMaster) {
105 iam = "Master";
106 hurl.SetOptions("MM");
107 } else if (!fProof->IsMaster() && stype == kMaster) {
108 iam = "Local Client";
109 hurl.SetOptions("MC");
110 } else {
111 Error("Init","Impossible PROOF <-> SlaveType Configuration Requested");
112 R__ASSERT(0);
113 }
114
115 // Open authenticated connection to remote PROOF slave server.
116 // If a connection was already open (fSocket != 0), re-use it
117 // to perform authentication (optimization needed to avoid a double
118 // opening in case this is called by TXSlave).
119 Int_t wsize = 65536;
120 fSocket = TSocket::CreateAuthSocket(hurl.GetUrl(), 0, wsize, fSocket);
121
122 if (!fSocket || !fSocket->IsAuthenticated()) {
124 return;
125 }
126
127 // Remove socket from global TROOT socket list. Only the TProof object,
128 // representing all slave sockets, will be added to this list. This will
129 // ensure the correct termination of all proof servers in case the
130 // root session terminates.
131 {
133 gROOT->GetListOfSockets()->Remove(fSocket);
134 }
135
136 // Fill some useful info
138 PDB(kGlobal,3) {
139 Info("Init","%s: fUser is .... %s", iam.Data(), fUser.Data());
140 }
141
142 if (fSocket->GetRemoteProtocol() >= 14 ) {
144
145 const TList *envs = TProof::GetEnvVars();
146 if (envs != 0 ) {
147 TIter next(envs);
148 for (TObject *o = next(); o != 0; o = next()) {
149 TNamed *env = dynamic_cast<TNamed*>(o);
150 if (env != 0) {
151 TString def = Form("%s=%s", env->GetName(), env->GetTitle());
152 const char *p = def.Data();
153 m << p;
154 }
155 }
156 }
157 fSocket->Send(m);
158 } else {
159 Info("Init","** NOT ** Sending kPROOF_SETENV RemoteProtocol : %d",
161 }
162
163 char buf[512];
164 fSocket->Recv(buf, sizeof(buf));
165 if (strcmp(buf, "Okay")) {
166 Printf("%s", buf);
168 return;
169 }
170
171}
172
173////////////////////////////////////////////////////////////////////////////////
174/// Init a PROOF slave object. Called via the TSlave ctor.
175/// The Init method is technology specific and is overwritten by derived
176/// classes.
177
178Int_t TSlave::SetupServ(Int_t stype, const char *conffile)
179{
180 // get back startup message of proofserv (we are now talking with
181 // the real proofserver and not anymore with the proofd front-end)
182 Int_t what;
183 char buf[512];
184 if (fSocket->Recv(buf, sizeof(buf), what) <= 0) {
185 Error("SetupServ", "failed to receive slave startup message");
187 return -1;
188 }
189
190 if (what == kMESS_NOTOK) {
192 return -1;
193 }
194
195 // exchange protocol level between client and master and between
196 // master and slave
197 if (fSocket->Send(kPROOF_Protocol, kROOTD_PROTOCOL) != 2*sizeof(Int_t)) {
198 Error("SetupServ", "failed to send local PROOF protocol");
200 return -1;
201 }
202
203 if (fSocket->Recv(fProtocol, what) != 2*sizeof(Int_t)) {
204 Error("SetupServ", "failed to receive remote PROOF protocol");
206 return -1;
207 }
208
209 // protocols less than 4 are incompatible
210 if (fProtocol < 4) {
211 Error("SetupServ", "incompatible PROOF versions (remote version"
212 " must be >= 4, is %d)", fProtocol);
214 return -1;
215 }
216
217 fProof->fProtocol = fProtocol; // protocol of last slave on master
218
219 if (fProtocol < 5) {
220 //
221 // Setup authentication related stuff for ald versions
222 Bool_t isMaster = (stype == kMaster);
223 TString wconf = isMaster ? TString(conffile) : fProofWorkDir;
224 if (OldAuthSetup(isMaster, wconf) != 0) {
225 Error("SetupServ", "OldAuthSetup: failed to setup authentication");
227 return -1;
228 }
229 } else {
230 //
231 // Send ordinal (and config) info to slave (or master)
232 TMessage mess;
233 if (stype == kMaster)
234 mess << fUser << fOrdinal << TString(conffile);
235 else
236 mess << fUser << fOrdinal << fProofWorkDir;
237
238 if (fSocket->Send(mess) < 0) {
239 Error("SetupServ", "failed to send ordinal and config info");
241 return -1;
242 }
243 }
244
245 // set some socket options
247
248 // Set active state
250
251 // We are done
252 return 0;
253}
254
255////////////////////////////////////////////////////////////////////////////////
256/// Init a PROOF slave object using the connection opened via s. Used to
257/// avoid double opening when an attempt via TXSlave found a remote proofd.
258
260{
261 fSocket = s;
262 TSlave::Init(s->GetInetAddress().GetHostName(), s->GetPort(), stype);
263}
264
265////////////////////////////////////////////////////////////////////////////////
266/// Destroy slave.
267
269{
270 Close();
271}
272
273////////////////////////////////////////////////////////////////////////////////
274/// Close slave socket.
275
277{
278 if (fSocket) {
279
280 // If local client ...
281 if (!(fProof->IsMaster()) && !strncasecmp(opt,"S",1)) {
282 // ... tell master and slaves to stop
284 }
285
286 // deactivate used sec context if talking to proofd daemon running
287 // an old protocol (sec context disactivated remotely)
289 if (sc && sc->IsActive()) {
291 TSecContextCleanup *nscc = 0;
292 while ((nscc = (TSecContextCleanup *)last())) {
293 if (nscc->GetType() == TSocket::kPROOFD &&
294 nscc->GetProtocol() < 9) {
295 sc->DeActivate("");
296 break;
297 }
298 }
299 }
300 }
301
304}
305
306////////////////////////////////////////////////////////////////////////////////
307/// Used to sort slaves by performance index.
308
310{
311 const TSlave *sl = dynamic_cast<const TSlave*>(obj);
312
313 if (!sl) {
314 Error("Compare", "input is not a TSlave object");
315 return 0;
316 }
317
318 if (fPerfIdx > sl->GetPerfIdx()) return 1;
319 if (fPerfIdx < sl->GetPerfIdx()) return -1;
320 const char *myord = GetOrdinal();
321 const char *otherord = sl->GetOrdinal();
322 while (myord && otherord) {
323 Int_t myval = atoi(myord);
324 Int_t otherval = atoi(otherord);
325 if (myval < otherval) return 1;
326 if (myval > otherval) return -1;
327 myord = strchr(myord, '.');
328 if (myord) myord++;
329 otherord = strchr(otherord, '.');
330 if (otherord) otherord++;
331 }
332 if (myord) return -1;
333 if (otherord) return 1;
334 return 0;
335}
336
337////////////////////////////////////////////////////////////////////////////////
338/// Printf info about slave.
339
341{
342 TString sc;
343
344 const char *sst[] = { "invalid" , "valid", "inactive" };
345 Int_t st = fSocket ? ((fStatus == kInactive) ? 2 : 1) : 0;
346
347 Printf("*** Worker %s (%s)", fOrdinal.Data(), sst[st]);
348 Printf(" Host name: %s", GetName());
349 Printf(" Port number: %d", GetPort());
350 Printf(" Worker session tag: %s", GetSessionTag());
351 Printf(" ROOT version|rev|tag: %s", GetROOTVersion());
352 Printf(" Architecture-Compiler: %s", GetArchCompiler());
353 if (fSocket) {
354 if (strlen(GetGroup()) > 0) {
355 Printf(" User/Group: %s/%s", GetUser(), GetGroup());
356 } else {
357 Printf(" User: %s", GetUser());
358 }
359 if (fSocket->GetSecContext())
360 Printf(" Security context: %s", fSocket->GetSecContext()->AsString(sc));
361 Printf(" Proofd protocol version: %d", fSocket->GetRemoteProtocol());
362 Printf(" Image name: %s", GetImage());
363 Printf(" Working directory: %s", GetWorkDir());
364 Printf(" Performance index: %d", GetPerfIdx());
365 Printf(" MB's processed: %.2f", float(GetBytesRead())/(1024*1024));
366 Printf(" MB's sent: %.2f", float(fSocket->GetBytesRecv())/(1024*1024));
367 Printf(" MB's received: %.2f", float(fSocket->GetBytesSent())/(1024*1024));
368 Printf(" Real time used (s): %.3f", GetRealTime());
369 Printf(" CPU time used (s): %.3f", GetCpuTime());
370 } else {
371 if (strlen(GetGroup()) > 0) {
372 Printf(" User/Group: %s/%s", GetUser(), GetGroup());
373 } else {
374 Printf(" User: %s", GetUser());
375 }
376 Printf(" Security context:");
377 Printf(" Proofd protocol version:");
378 Printf(" Image name: %s", GetImage());
379 Printf(" Working directory: %s", GetWorkDir());
380 Printf(" Performance index: %d", GetPerfIdx());
381 Printf(" MB's processed: %.2f", float(GetBytesRead())/(1024*1024));
382 Printf(" MB's sent:");
383 Printf(" MB's received:");
384 Printf(" Real time used (s): %.3f", GetRealTime());
385 Printf(" CPU time used (s): %.3f", GetCpuTime());
386 }
387}
388
389////////////////////////////////////////////////////////////////////////////////
390/// Adopt and register input handler for this slave. Handler will be deleted
391/// by the slave.
392
394{
395 fInput = ih;
396 fInput->Add();
397}
398
399////////////////////////////////////////////////////////////////////////////////
400/// Setup authentication related stuff for old versions.
401/// Provided for backward compatibility.
402
404{
405 static OldSlaveAuthSetup_t oldAuthSetupHook = 0;
406
407 if (!oldAuthSetupHook) {
408 // Load libraries needed for (server) authentication ...
409 TString authlib = "libRootAuth";
410 char *p = 0;
411 // The generic one
412 if ((p = gSystem->DynamicPathName(authlib, kTRUE))) {
413 delete[] p;
414 if (gSystem->Load(authlib) == -1) {
415 Error("OldAuthSetup", "can't load %s",authlib.Data());
416 return kFALSE;
417 }
418 } else {
419 Error("OldAuthSetup", "can't locate %s",authlib.Data());
420 return -1;
421 }
422 //
423 // Locate OldSlaveAuthSetup
424 Func_t f = gSystem->DynFindSymbol(authlib,"OldSlaveAuthSetup");
425 if (f)
426 oldAuthSetupHook = (OldSlaveAuthSetup_t)(f);
427 else {
428 Error("OldAuthSetup", "can't find OldSlaveAuthSetup");
429 return -1;
430 }
431 }
432 //
433 // Setup
434 return (*oldAuthSetupHook)(fSocket, master, fOrdinal, wconf);
435}
436
437////////////////////////////////////////////////////////////////////////////////
438/// Static method returning the appropriate TSlave object for the remote
439/// server.
440
441TSlave *TSlave::Create(const char *url, const char *ord, Int_t perf,
442 const char *image, TProof *proof, Int_t stype,
443 const char *workdir, const char *msd, Int_t nwk)
444{
445 TSlave *s = 0;
446
447 // Check if we are setting up a lite version
448 if (!strcmp(url, "lite")) {
449 return new TSlaveLite(ord, perf, image, proof, stype, workdir, msd);
450 }
451
452 // No need to try a XPD connection in some well defined cases
453 Bool_t tryxpd = kTRUE;
454 if (!(proof->IsMaster())) {
455 if (proof->IsProofd())
456 tryxpd = kFALSE;
457 } else {
458 if (gApplication && (gApplication->Argc() < 3 ||
459 (gApplication->Argc() > 2 && gApplication->Argv(2) &&
460 strncmp(gApplication->Argv(2),"xpd",3))))
461 tryxpd = kFALSE;
462 }
463
464 // We do this without the plugin manager because it blocks the CINT mutex
465 // breaking the parallel startup
466 if (!fgTXSlaveHook) {
467
468 // Load the library containing TXSlave ...
469 TString proofxlib = "libProofx";
470 char *p = 0;
471 if ((p = gSystem->DynamicPathName(proofxlib, kTRUE))) {
472 delete[] p;
473 if (gSystem->Load(proofxlib) == -1)
474 ::Error("TSlave::Create", "can't load %s", proofxlib.Data());
475 } else
476 ::Error("TSlave::Create", "can't locate %s", proofxlib.Data());
477 }
478
479 // Load the right class
480 if (fgTXSlaveHook && tryxpd) {
481 s = (*fgTXSlaveHook)(url, ord, perf, image, proof, stype, workdir, msd, nwk);
482 } else {
483 s = new TSlave(url, ord, perf, image, proof, stype, workdir, msd);
484 }
485
486 return s;
487}
488
489////////////////////////////////////////////////////////////////////////////////
490/// Ping the remote master or slave servers.
491/// Returns 0 if ok, -1 in case of error
492
494{
495 if (!IsValid()) return -1;
496
498 fSocket->Send(mess);
499 if (fSocket->Send(mess) == -1) {
500 Warning("Ping","%s: acknowledgement not received", GetOrdinal());
501 return -1;
502 }
503 return 0;
504}
505
506////////////////////////////////////////////////////////////////////////////////
507/// Send interrupt OOB byte to master or slave servers.
508/// Returns 0 if ok, -1 in case of error
509
511{
512 if (!IsValid()) return;
513
514 char oobc = (char) type;
515 const int kBufSize = 1024;
516 char waste[kBufSize];
517
518 // Send one byte out-of-band message to server
519 if (fSocket->SendRaw(&oobc, 1, kOob) <= 0) {
520 Error("Interrupt", "error sending oobc to slave %s", GetOrdinal());
521 return;
522 }
523
525 char oob_byte;
526 int n, nch, nbytes = 0, nloop = 0;
527
528 // Receive the OOB byte
529 while ((n = fSocket->RecvRaw(&oob_byte, 1, kOob)) < 0) {
530 if (n == -2) { // EWOULDBLOCK
531 //
532 // The OOB data has not yet arrived: flush the input stream
533 //
534 // In some systems (Solaris) regular recv() does not return upon
535 // receipt of the oob byte, which makes the below call to recv()
536 // block indefinitely if there are no other data in the queue.
537 // FIONREAD ioctl can be used to check if there are actually any
538 // data to be flushed. If not, wait for a while for the oob byte
539 // to arrive and try to read it again.
540 //
542 if (nch == 0) {
543 gSystem->Sleep(1000);
544 continue;
545 }
546
547 if (nch > kBufSize) nch = kBufSize;
548 n = fSocket->RecvRaw(waste, nch);
549 if (n <= 0) {
550 Error("Interrupt", "error receiving waste from slave %s",
551 GetOrdinal());
552 break;
553 }
554 nbytes += n;
555 } else if (n == -3) { // EINVAL
556 //
557 // The OOB data has not arrived yet
558 //
559 gSystem->Sleep(100);
560 if (++nloop > 100) { // 10 seconds time-out
561 Error("Interrupt", "server %s does not respond", GetOrdinal());
562 break;
563 }
564 } else {
565 Error("Interrupt", "error receiving OOB from server %s",
566 GetOrdinal());
567 break;
568 }
569 }
570
571 //
572 // Continue flushing the input socket stream until the OOB
573 // mark is reached
574 //
575 while (1) {
576 int atmark;
577
578 fSocket->GetOption(kAtMark, atmark);
579
580 if (atmark)
581 break;
582
583 // find out number of bytes to read before atmark
585 if (nch == 0) {
586 gSystem->Sleep(1000);
587 continue;
588 }
589
590 if (nch > kBufSize) nch = kBufSize;
591 n = fSocket->RecvRaw(waste, nch);
592 if (n <= 0) {
593 Error("Interrupt", "error receiving waste (2) from slave %s",
594 GetOrdinal());
595 break;
596 }
597 nbytes += n;
598 }
599 if (nbytes > 0) {
600 if (fProof->IsMaster())
601 Info("Interrupt", "slave %s:%s synchronized: %d bytes discarded",
602 GetName(), GetOrdinal(), nbytes);
603 else
604 Info("Interrupt", "PROOF synchronized: %d bytes discarded", nbytes);
605 }
606
607 // Get log file from master or slave after a hard interrupt
608 fProof->Collect(this);
609
610 } else if (type == TProof::kSoftInterrupt) {
611
612 // Get log file from master or slave after a soft interrupt
613 fProof->Collect(this);
614
615 } else if (type == TProof::kShutdownInterrupt) {
616
617 ; // nothing expected to be returned
618
619 } else {
620
621 // Unexpected message, just receive log file
622 fProof->Collect(this);
623 }
624}
625
626////////////////////////////////////////////////////////////////////////////////
627/// Sent stop/abort request to PROOF server.
628
629void TSlave::StopProcess(Bool_t abort, Int_t timeout)
630{
631 // Notify the remote counterpart
633 msg << abort;
634 if (fProof->fProtocol > 9)
635 msg << timeout;
636 fSocket->Send(msg);
637}
638
639////////////////////////////////////////////////////////////////////////////////
640/// Send message to intermediate coordinator. Only meaningful when there is one,
641/// i.e. in XPD framework
642
644{
645 if (gDebug > 0)
646 Info("SendCoordinator","method not implemented for this communication layer");
647 return 0;
648}
649
650////////////////////////////////////////////////////////////////////////////////
651/// Set an alias for this session. If reconnection is supported, the alias
652/// will be communicated to the remote coordinator so that it can be recovered
653/// when reconnecting
654
655void TSlave::SetAlias(const char *)
656{
657 if (gDebug > 0)
658 Info("SetAlias","method not implemented for this communication layer");
659 return;
660}
661
662////////////////////////////////////////////////////////////////////////////////
663/// Set hook to TXSlave ctor
664
666{
667 fgTXSlaveHook = xslavehook;
668}
@ kPROOF_PING
@ kMESS_NOTOK
@ kPROOF_STOPPROCESS
@ kMESS_ACK
@ kROOTD_PROTOCOL
@ kPROOF_SETENV
#define SafeDelete(p)
Definition RConfig.hxx:517
#define f(i)
Definition RSha256.hxx:104
constexpr Bool_t kFALSE
Definition RtypesCore.h:101
constexpr Bool_t kTRUE
Definition RtypesCore.h:100
const char Option_t
Definition RtypesCore.h:66
#define ClassImp(name)
Definition Rtypes.h:377
R__EXTERN TApplication * gApplication
const Bool_t kIterBackward
Definition TCollection.h:43
#define R__ASSERT(e)
Definition TError.h:118
winID h TVirtualViewer3D TVirtualGLPainter p
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
#define PDB(mask, level)
Definition TProofDebug.h:56
const Int_t kPROOF_Protocol
Definition TProof.h:120
Int_t gDebug
Definition TROOT.cxx:597
R__EXTERN TVirtualMutex * gROOTMutex
Definition TROOT.h:63
#define gROOT
Definition TROOT.h:407
TSlave *(* TSlave_t)(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)
Definition TSlave.h:42
Int_t(* OldSlaveAuthSetup_t)(TSocket *, Bool_t, TString, TString)
Definition TSlave.h:38
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
Definition TString.cxx:2489
void Printf(const char *fmt,...)
Formats a string in a circular formatting buffer and prints the string.
Definition TString.cxx:2503
@ kBytesToRead
Definition TSystem.h:223
@ kNoDelay
Definition TSystem.h:219
@ kAtMark
Definition TSystem.h:222
@ kOob
Definition TSystem.h:228
void(* Func_t)()
Definition TSystem.h:233
R__EXTERN TSystem * gSystem
Definition TSystem.h:555
@ kInvalid
Definition TSystem.h:77
#define R__LOCKGUARD(mutex)
const char * proto
Definition civetweb.c:17536
char ** Argv() const
Int_t Argc() const
void Add() override
Add file event handler to system file handler list.
const char * GetHostName() const
A doubly linked list.
Definition TList.h:38
The TNamed class is the base class for all named ROOT classes.
Definition TNamed.h:29
const char * GetName() const override
Returns name of object.
Definition TNamed.h:47
const char * GetTitle() const override
Returns title of object.
Definition TNamed.h:48
Collectable string class.
Definition TObjString.h:28
Mother of all ROOT objects.
Definition TObject.h:41
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
Definition TObject.cxx:973
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Definition TObject.cxx:987
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
Definition TObject.cxx:961
This class controls a Parallel ROOT Facility, PROOF, cluster.
Definition TProof.h:316
@ kShutdownInterrupt
Definition TProof.h:398
@ kHardInterrupt
Definition TProof.h:396
@ kSoftInterrupt
Definition TProof.h:397
TUrl fUrl
Definition TProof.h:567
Int_t Collect(const TSlave *sl, Long_t timeout=-1, Int_t endtype=-1, Bool_t deactonfail=kFALSE)
Collect responses from slave sl.
Definition TProof.cxx:2669
Int_t fProtocol
Definition TProof.h:571
Bool_t IsProofd() const
Definition TProof.h:934
static const TList * GetEnvVars()
Get environemnt variables.
Definition TProof.cxx:11751
Bool_t IsMaster() const
Definition TProof.h:936
Int_t GetType() const
Int_t GetProtocol() const
Bool_t IsActive() const
Check remote OffSet and expiring Date.
const char * GetUser() const
Definition TSecContext.h:82
virtual void DeActivate(Option_t *opt="CR")
Set OffSet to -1 and expiring Date to default Remove from the list If Opt contains "C" or "c",...
virtual const char * AsString(TString &out)
Returns short string with relevant information about this security context.
TList * GetSecContextCleanup() const
Definition TSecContext.h:80
Class describing a PROOF worker server.
Definition TSlave.h:46
Int_t fStatus
Definition TSlave.h:96
const char * GetName() const override
Returns name of object.
Definition TSlave.h:124
Int_t fParallel
Definition TSlave.h:97
virtual void SetAlias(const char *alias)
Set an alias for this session.
Definition TSlave.cxx:655
Float_t fRealTime
Definition TSlave.h:93
TSocket * fSocket
Definition TSlave.h:89
const char * GetWorkDir() const
Definition TSlave.h:127
TProof * fProof
Definition TSlave.h:90
ESlaveType fSlaveType
Definition TSlave.h:95
Float_t GetRealTime() const
Definition TSlave.h:137
TString fUser
Definition TSlave.h:83
Int_t fPort
Definition TSlave.h:85
static TSlave_t fgTXSlaveHook
Definition TSlave.h:63
Float_t fCpuTime
Definition TSlave.h:94
const char * GetImage() const
Definition TSlave.h:125
Int_t GetPort() const
Definition TSlave.h:130
ESlaveType
Definition TSlave.h:55
@ kSlave
Definition TSlave.h:55
@ kMaster
Definition TSlave.h:55
Int_t Compare(const TObject *obj) const override
Used to sort slaves by performance index.
Definition TSlave.cxx:309
TSlave()
Default constructor used by derived classes.
Definition TSlave.cxx:65
Long64_t GetBytesRead() const
Definition TSlave.h:136
const char * GetGroup() const
Definition TSlave.h:129
virtual void StopProcess(Bool_t abort, Int_t timeout)
Sent stop/abort request to PROOF server.
Definition TSlave.cxx:629
const char * GetUser() const
Definition TSlave.h:128
@ kActive
Definition TSlave.h:56
@ kInvalid
Definition TSlave.h:56
@ kInactive
Definition TSlave.h:56
TString fOrdinal
Definition TSlave.h:86
void Init(const char *host, Int_t port, Int_t stype)
Init a PROOF slave object.
Definition TSlave.cxx:87
friend class TSlaveLite
Definition TSlave.h:50
Long64_t fBytesRead
Definition TSlave.h:92
TFileHandler * fInput
Definition TSlave.h:91
static void SetTXSlaveHook(TSlave_t xslavehook)
Set hook to TXSlave ctor.
Definition TSlave.cxx:665
static TSlave * Create(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)
Static method returning the appropriate TSlave object for the remote server.
Definition TSlave.cxx:441
TString fProofWorkDir
Definition TSlave.h:81
const char * GetSessionTag() const
Definition TSlave.h:143
void SetInputHandler(TFileHandler *ih)
Adopt and register input handler for this slave.
Definition TSlave.cxx:393
Int_t fPerfIdx
Definition TSlave.h:87
virtual void Interrupt(Int_t type)
Send interrupt OOB byte to master or slave servers.
Definition TSlave.cxx:510
Int_t fProtocol
Definition TSlave.h:88
void Print(Option_t *option="") const override
Printf info about slave.
Definition TSlave.cxx:340
const char * GetArchCompiler() const
Definition TSlave.h:147
virtual Int_t SetupServ(Int_t stype, const char *conffile)
Init a PROOF slave object.
Definition TSlave.cxx:178
virtual Int_t Ping()
Ping the remote master or slave servers.
Definition TSlave.cxx:493
virtual TObjString * SendCoordinator(Int_t kind, const char *msg=0, Int_t int2=0)
Send message to intermediate coordinator.
Definition TSlave.cxx:643
~TSlave() override
Destroy slave.
Definition TSlave.cxx:268
const char * GetROOTVersion() const
Definition TSlave.h:148
Float_t GetCpuTime() const
Definition TSlave.h:138
TString fName
Definition TSlave.h:79
virtual Bool_t IsValid() const
Definition TSlave.h:150
Int_t OldAuthSetup(Bool_t master, TString wconf)
Setup authentication related stuff for old versions.
Definition TSlave.cxx:403
const char * GetOrdinal() const
Definition TSlave.h:131
virtual void Close(Option_t *opt="")
Close slave socket.
Definition TSlave.cxx:276
Int_t GetPerfIdx() const
Definition TSlave.h:132
virtual Int_t SetOption(ESockOptions opt, Int_t val)
Set socket options.
Definition TSocket.cxx:1013
UInt_t GetBytesRecv() const
Definition TSocket.h:120
virtual Int_t Recv(TMessage *&mess)
Receive a TMessage object.
Definition TSocket.cxx:818
Int_t GetRemoteProtocol() const
Definition TSocket.h:126
UInt_t GetBytesSent() const
Definition TSocket.h:119
TInetAddress GetInetAddress() const
Definition TSocket.h:113
virtual Int_t RecvRaw(void *buffer, Int_t length, ESendRecvOptions opt=kDefault)
Receive a raw buffer of specified length bytes.
Definition TSocket.cxx:898
TSecContext * GetSecContext() const
Definition TSocket.h:127
virtual Int_t SendRaw(const void *buffer, Int_t length, ESendRecvOptions opt=kDefault)
Send a raw buffer of specified length.
Definition TSocket.cxx:620
Option_t * GetOption() const override
Definition TSocket.h:98
@ kPROOFD
Definition TSocket.h:52
static TSocket * CreateAuthSocket(const char *user, const char *host, Int_t port, Int_t size=0, Int_t tcpwindowsize=-1, TSocket *s=nullptr, Int_t *err=nullptr)
Creates a socket or a parallel socket and authenticates to the remote server specified in 'url' on re...
Definition TSocket.cxx:1432
Int_t GetPort() const
Definition TSocket.h:115
virtual Int_t Send(const TMessage &mess)
Send a TMessage object.
Definition TSocket.cxx:522
virtual Bool_t IsAuthenticated() const
Definition TSocket.h:131
Basic string class.
Definition TString.h:139
const char * Data() const
Definition TString.h:376
virtual Func_t DynFindSymbol(const char *module, const char *entry)
Find specific entry point in specified library.
Definition TSystem.cxx:2044
virtual int Load(const char *module, const char *entry="", Bool_t system=kFALSE)
Load a shared library.
Definition TSystem.cxx:1857
virtual void Sleep(UInt_t milliSec)
Sleep milliSec milli seconds.
Definition TSystem.cxx:437
char * DynamicPathName(const char *lib, Bool_t quiet=kFALSE)
Find a dynamic library called lib using the system search paths.
Definition TSystem.cxx:2020
This class represents a WWW compatible URL.
Definition TUrl.h:33
const char * GetUrl(Bool_t withDeflt=kFALSE) const
Return full URL.
Definition TUrl.cxx:390
void SetProtocol(const char *proto, Bool_t setDefaultPort=kFALSE)
Set protocol and, optionally, change the port accordingly.
Definition TUrl.cxx:523
void SetOptions(const char *opt)
Definition TUrl.h:87
const char * GetHostFQDN() const
Return fully qualified domain name of url host.
Definition TUrl.cxx:472
const char * GetProtocol() const
Definition TUrl.h:64
void SetPort(Int_t port)
Definition TUrl.h:88
Int_t GetPort() const
Definition TUrl.h:78
const Int_t n
Definition legend1.C:16
static const char * what
Definition stlLoader.cc:5
TMarker m
Definition textangle.C:8