NCBI C++ ToolKit
Classes | Macros | Typedefs | Enumerations | Enumerator | Functions | Variables | Friends
+ Collaboration diagram for Client API to NCBI NetSchedule:

Classes

class  CGridJobBatchSubmitter
 Grid Job Batch Submitter. More...
 
class  CGridClient
 Grid Client (the submitter). More...
 
class  CGridClientException
 Grid Client exception. More...
 
class  CGridClientApp
 Grid Client Application. More...
 
class  IWorkerNodeCleanupEventListener
 
class  IWorkerNodeCleanupEventSource
 Clean-up event source for the worker node. More...
 
class  IWorkerNodeInitBaseContext
 Worker Node initialize context. More...
 
class  IWorkerNodeInitContext
 
class  IWorkerNodeJob
 Worker Node Job interface. More...
 
class  CWorkerNodeJobContext
 Worker Node job context. More...
 
class  CWorkerNodeIdleTaskContext
 Worker Node Idle Task Context. More...
 
class  IWorkerNodeIdleTask
 Worker Node Idle Task Interface. More...
 
class  IWorkerNodeJobFactory
 Worker Node Job Factory interface. More...
 
class  CSimpleJobFactory< TWorkerNodeJob >
 
class  CSimpleJobFactoryEx< TWorkerNodeJob, TWorkerNodeIdleTask >
 
class  IWorkerNodeJobWatcher
 Jobs watcher interface. More...
 
class  CGridWorkerNode
 Grid Worker Node. More...
 
class  CGridWorkerNodeException
 
class  CNetScheduleAPI
 Client API for NCBI NetSchedule server. More...
 
struct  CNetScheduleAPI::SServerParams
 
struct  CNetScheduleNewJob
 New job description. More...
 
struct  CNetScheduleJob
 Job description. More...
 
class  CNetScheduleSubmitter
 Smart pointer to the job submission part of the NetSchedule API. More...
 
class  CNetScheduleExecutor
 Smart pointer to a part of the NetSchedule API that does job retrieval and processing on the worker node side. More...
 
class  CNetScheduleJobReader
 Smart pointer to a part of the NetSchedule API that allows to retrieve completed jobs. More...
 
class  CNetScheduleExceptionMap
 Map from exception names to codes. More...
 
class  CNetScheduleException
 NetSchedule internal exception. More...
 
struct  CNetScheduleKey
 Meaningful information encoded in the NetSchedule key. More...
 
class  CNetScheduleKeyGenerator
 
class  CGridCgiContext
 Grid CGI Context Context in which a request is processed. More...
 
class  CGridCgiApplication
 Grid Cgi Application. More...
 
class  CRemoteCgiApp
 
class  CCgi2RCgiApp
 
class  CRegexpTemplateFilter
 
struct  SJob
 
struct  SJobs
 

Macros

#define NCBI_DECLARE_WORKERNODE_FACTORY_IMPL(TWorkerNodeJob, Version)
 
#define NCBI_DECLARE_WORKERNODE_FACTORY(TWorkerNodeJob, Version)
 
#define NCBI_DECLARE_WORKERNODE_FACTORY_EX( TWorkerNodeJob, TWorkerNodeIdleTask, Version)
 
#define CALLBACK_PARAM   "callback="
 

Typedefs

typedef SWorkerNodeJobContextImplCWorkerNodeJobContext::TInstance
 
typedef SGridWorkerNodeImplCGridWorkerNode::TInstance
 
typedef pair< string, SBuildInfoCGridWorkerNode::TVersion
 
typedef SNetScheduleAPIImplCNetScheduleAPI::TInstance
 
typedef unsigned CNetScheduleAPI::TJobMask
 
typedef map< string, stringCNetScheduleAPI::TQueueParams
 
typedef SNetScheduleSubmitterImplCNetScheduleSubmitter::TInstance
 
typedef SNetScheduleExecutorImplCNetScheduleExecutor::TInstance
 
typedef CNetScheduleExecutor CNetScheduleExecuter
 
typedef SNetScheduleJobReaderImplCNetScheduleJobReader::TInstance
 
typedef map< string, stringCGridCgiContext::TPersistedEntries
 
typedef map< string, stringCGridCgiContext::TPersistentEntries
 

Enumerations

enum  CGridClient::ECleanUp { CGridClient::eAutomaticCleanup = 0 , CGridClient::eManualCleanup }
 
enum  CGridClient::EProgressMsg { CGridClient::eProgressMsgOn = 0 , CGridClient::eProgressMsgOff }
 
enum  CGridClientException::EErrCode { CGridClientException::eBatchAlreadySubmitted }
 
enum  IWorkerNodeCleanupEventListener::EWorkerNodeCleanupEvent { IWorkerNodeCleanupEventListener::eRegularCleanup , IWorkerNodeCleanupEventListener::eOnHardExit }
 Event notifying of a safe clean-up point. More...
 
enum  CWorkerNodeJobContext::ECommitStatus {
  CWorkerNodeJobContext::eCS_Done , CWorkerNodeJobContext::eCS_Failure , CWorkerNodeJobContext::eCS_Return , CWorkerNodeJobContext::eCS_Reschedule ,
  CWorkerNodeJobContext::eCS_NotCommitted , CWorkerNodeJobContext::eCS_JobIsLost
}
 
enum  IWorkerNodeJobWatcher::EEvent {
  IWorkerNodeJobWatcher::eJobStarted , IWorkerNodeJobWatcher::eJobStopped , IWorkerNodeJobWatcher::eJobFailed , IWorkerNodeJobWatcher::eJobSucceeded ,
  IWorkerNodeJobWatcher::eJobReturned , IWorkerNodeJobWatcher::eJobRescheduled , IWorkerNodeJobWatcher::eJobCanceled , IWorkerNodeJobWatcher::eJobLost
}
 
enum  CGridWorkerNode::EDisabledRequestEvents { CGridWorkerNode::eEnableStartStop , CGridWorkerNode::eDisableStartStop , CGridWorkerNode::eDisableStartOnly }
 Disable the automatic logging of request-start and request-stop events by the framework itself. More...
 
enum  CGridWorkerNodeException::EErrCode { CGridWorkerNodeException::ePortBusy , CGridWorkerNodeException::eJobIsLost , CGridWorkerNodeException::eJobFactoryIsNotSet , CGridWorkerNodeException::eExclusiveModeIsAlreadySet }
 
enum  CNetScheduleAPI::EAppRegistry { CNetScheduleAPI::eAppRegistry }
 Defines how this object must be initialized. More...
 
enum  CNetScheduleAPI::EJobStatus {
  CNetScheduleAPI::eJobNotFound = -1 , CNetScheduleAPI::ePending = 0 , CNetScheduleAPI::eRunning = 1 , CNetScheduleAPI::eCanceled = 3 ,
  CNetScheduleAPI::eFailed = 4 , CNetScheduleAPI::eDone = 5 , CNetScheduleAPI::eReading = 6 , CNetScheduleAPI::eConfirmed = 7 ,
  CNetScheduleAPI::eReadFailed = 8 , CNetScheduleAPI::eDeleted = 9 , CNetScheduleAPI::eLastStatus
}
 Job status codes. More...
 
enum  CNetScheduleAPI::EJobMask {
  CNetScheduleAPI::eEmptyMask = 0 , CNetScheduleAPI::eExclusiveJob = (1 << 0) , CNetScheduleAPI::eOutOfOrder = (1 << 1) , CNetScheduleAPI::eForEachNode = (1 << 2) ,
  CNetScheduleAPI::eSystemJob = (1 << 3) , CNetScheduleAPI::eUserMask = (1 << 16)
}
 Job masks. More...
 
enum  CNetScheduleAPI::EClientType {
  CNetScheduleAPI::eCT_Auto , CNetScheduleAPI::eCT_Admin , CNetScheduleAPI::eCT_Submitter , CNetScheduleAPI::eCT_WorkerNode ,
  CNetScheduleAPI::eCT_Reader
}
 
enum  CNetScheduleAPI::ENetScheduleWarningType {
  CNetScheduleAPI::eWarnUnknown , CNetScheduleAPI::eWarnAffinityNotFound , CNetScheduleAPI::eWarnAffinityNotPreferred , CNetScheduleAPI::eWarnAffinityAlreadyPreferred ,
  CNetScheduleAPI::eWarnGroupNotFound , CNetScheduleAPI::eWarnJobNotFound , CNetScheduleAPI::eWarnJobAlreadyCanceled , CNetScheduleAPI::eWarnJobAlreadyDone ,
  CNetScheduleAPI::eWarnJobAlreadyFailed , CNetScheduleAPI::eWarnJobPassportOnlyMatch , CNetScheduleAPI::eWarnNoParametersChanged , CNetScheduleAPI::eWarnConfigFileNotChanged ,
  CNetScheduleAPI::eWarnAlertNotFound , CNetScheduleAPI::eWarnAlertAlreadyAcknowledged , CNetScheduleAPI::eWarnSubmitsDisabledForServer , CNetScheduleAPI::eWarnQueueAlreadyPaused ,
  CNetScheduleAPI::eWarnQueueNotPaused , CNetScheduleAPI::eWarnCommandObsolete , CNetScheduleAPI::eWarnJobNotRead
}
 
enum  CNetScheduleExecutor::EJobAffinityPreference {
  CNetScheduleExecutor::ePreferredAffsOrAnyJob , CNetScheduleExecutor::ePreferredAffinities , CNetScheduleExecutor::eClaimNewPreferredAffs , CNetScheduleExecutor::eAnyJob ,
  CNetScheduleExecutor::eExplicitAffinitiesOnly
}
 Affinity matching modes. More...
 
enum  CNetScheduleJobReader::EReadNextJobResult {
  CNetScheduleJobReader::eRNJ_JobReady , CNetScheduleJobReader::eRNJ_NotReady , CNetScheduleJobReader::eRNJ_Timeout = eRNJ_NotReady , CNetScheduleJobReader::eRNJ_NoMoreJobs ,
  CNetScheduleJobReader::eRNJ_Interrupt
}
 Possible outcomes of ReadNextJob() calls. More...
 
enum  CNetScheduleException::EErrCode {
  CNetScheduleException::eInternalError , CNetScheduleException::eProtocolSyntaxError , CNetScheduleException::eAuthenticationError , CNetScheduleException::eKeyFormatError ,
  CNetScheduleException::eJobNotFound , CNetScheduleException::eGroupNotFound , CNetScheduleException::eAffinityNotFound , CNetScheduleException::eInvalidJobStatus ,
  CNetScheduleException::eUnknownQueue , CNetScheduleException::eUnknownQueueClass , CNetScheduleException::eUnknownService , CNetScheduleException::eTooManyPendingJobs ,
  CNetScheduleException::eDataTooLong , CNetScheduleException::eInvalidClient , CNetScheduleException::eClientDataVersionMismatch , CNetScheduleException::eAccessDenied ,
  CNetScheduleException::eSubmitsDisabled , CNetScheduleException::eShuttingDown , CNetScheduleException::eDuplicateName , CNetScheduleException::eObsoleteCommand ,
  CNetScheduleException::eInvalidParameter , CNetScheduleException::eInvalidAuthToken , CNetScheduleException::eTooManyPreferredAffinities , CNetScheduleException::ePrefAffExpired ,
  CNetScheduleException::eTryAgain
}
 

Functions

void CGridJobBatchSubmitter::SetJobInput (const string &input)
 Set a job's input This string will be sent to then the job is submitted. More...
 
CNcbiOstreamCGridJobBatchSubmitter::GetOStream ()
 Get a stream where a client can write an input data for the remote job. More...
 
void CGridJobBatchSubmitter::SetJobMask (CNetScheduleAPI::TJobMask mask)
 Set a job mask. More...
 
void CGridJobBatchSubmitter::SetJobAffinity (const string &affinity)
 Set a job affinity. More...
 
void CGridJobBatchSubmitter::PrepareNextJob ()
 
void CGridJobBatchSubmitter::Submit (const string &job_group=kEmptyStr)
 Submit a batch to the queue. More...
 
void CGridJobBatchSubmitter::Reset ()
 
const vector< CNetScheduleJob > & CGridJobBatchSubmitter::GetBatch () const
 
void CGridJobBatchSubmitter::CheckIfBatchAlreadySubmitted ()
 
void CGridJobBatchSubmitter::CheckIfBatchSubmittedAndPrepareNextJob ()
 
 CGridJobBatchSubmitter::CGridJobBatchSubmitter (CGridClient &)
 
 CGridJobBatchSubmitter::CGridJobBatchSubmitter (const CGridJobBatchSubmitter &)
 The copy constructor and the assignment operator are prohibited. More...
 
CGridJobBatchSubmitterCGridJobBatchSubmitter::operator= (CGridJobBatchSubmitter &)
 
 CGridClient::CGridClient (CNetScheduleSubmitter::TInstance ns_submitter, IBlobStorage &storage, ECleanUp cleanup, EProgressMsg progress_msg)
 Constructor. More...
 
 CGridClient::CGridClient (CNetScheduleSubmitter::TInstance ns_submitter, CNetCacheAPI::TInstance nc_client, ECleanUp cleanup, EProgressMsg progress_msg)
 Constructor. More...
 
const stringCGridClient::GetJobOutput ()
 Get a job's output string. More...
 
const stringCGridClient::GetJobInput ()
 Get a job's input sting. More...
 
int CGridClient::GetReturnCode ()
 Get a job's return code. More...
 
const stringCGridClient::GetErrorMessage ()
 If something bad has happened this method will return an explanation. More...
 
CNetScheduleAPI::EJobStatus CGridClient::GetStatus ()
 Get a job status. More...
 
CNcbiIstreamCGridClient::GetIStream ()
 Get a stream with a job's result. More...
 
size_t CGridClient::GetBlobSize () const
 Get the size of an input stream. More...
 
string CGridClient::GetProgressMessage ()
 Get a job interim message. More...
 
void CGridClient::SetJobInput (const string &input)
 Set a job's input This string will be sent to then the job is submitted. More...
 
CNcbiOstreamCGridClient::GetOStream ()
 Get a stream where a client can write an input data for the remote job. More...
 
void CGridClient::CloseStream ()
 
void CGridClient::SetJobMask (CNetScheduleAPI::TJobMask mask)
 
void CGridClient::SetJobGroup (const string &group)
 
void CGridClient::SetJobAffinity (const string &affinity)
 
string CGridClient::Submit (const string &affinity=kEmptyStr)
 Submit a job to the queue. More...
 
CNetScheduleAPI::EJobStatus CGridClient::SubmitAndWait (unsigned wait_time)
 Submit a job to the queue. More...
 
CNetScheduleAPI::EJobStatus CGridClient::WaitForJob (const string &job_key, unsigned wait_time)
 Wait for job to finish its execution (done/failed/canceled). More...
 
CNetScheduleJobCGridClient::GetJob ()
 
CGridJobBatchSubmitterCGridClient::GetJobBatchSubmitter ()
 Get a job submitter. More...
 
void CGridClient::SetJobKey (const string &job_key)
 
void CGridClient::CancelJob (const string &job_key)
 Cancel Job. More...
 
CNetScheduleSubmitter CGridClient::GetNetScheduleSubmitter ()
 
CNetCacheAPICGridClient::GetNetCacheAPI ()
 
size_t CGridClient::GetMaxServerInputSize ()
 
void CGridClient::RemoveDataBlob (const string &)
 
void CGridClient::x_ProlongBlobLifetime (const string &blob_key, unsigned ttl)
 
bool CGridClient::x_ProlongJobFieldLifetime (const string &job_field, unsigned ttl)
 
void CGridClient::x_RenewAllJobBlobs (unsigned ttl)
 
CNetScheduleAPI::EJobStatus CGridClient::x_CheckAllJobBlobs (CNetScheduleAPI::EJobStatus status, time_t job_exptime)
 
void CGridClient::x_GetJobDetails ()
 
 CGridClient::CGridClient (const CGridClient &)
 The copy constructor and the assignment operator are prohibited. More...
 
CGridClientCGridClient::operator= (const CGridClient &)
 
virtual const char * CGridClientException::GetErrCodeString (void) const override
 Get error code interpreted as text. More...
 
 CGridClientException::NCBI_EXCEPTION_DEFAULT (CGridClientException, CException)
 
virtual void CGridClientApp::Init (void)
 If you override this method, do call CGridClientApp::Init() from inside your overriding method. More...
 
CGridClientCGridClientApp::GetGridClient ()
 Get a grid client. More...
 
virtual string CGridClientApp::GetProgramVersion (void) const =0
 Get program version (like: MyProgram v. More...
 
virtual bool CGridClientApp::UseProgressMessage () const
 
virtual bool CGridClientApp::UseAutomaticCleanup () const
 
virtual void IWorkerNodeCleanupEventListener::HandleEvent (EWorkerNodeCleanupEvent cleanup_event)=0
 
virtual IWorkerNodeCleanupEventListener::~IWorkerNodeCleanupEventListener ()
 
virtual void IWorkerNodeCleanupEventSource::AddListener (IWorkerNodeCleanupEventListener *listener)=0
 
virtual void IWorkerNodeCleanupEventSource::RemoveListener (IWorkerNodeCleanupEventListener *listener)=0
 
virtual void IWorkerNodeCleanupEventSource::CallEventHandlers ()=0
 
virtual IWorkerNodeInitBaseContext::~IWorkerNodeInitBaseContext ()
 
virtual const IRegistryIWorkerNodeInitBaseContext::GetConfig () const =0
 Get a config file registry. More...
 
virtual const CArgsIWorkerNodeInitBaseContext::GetArgs () const =0
 Get command line arguments. More...
 
virtual const CNcbiEnvironmentIWorkerNodeInitBaseContext::GetEnvironment () const =0
 Get environment variables. More...
 
virtual IWorkerNodeCleanupEventSourceIWorkerNodeInitContext::GetCleanupEventSource () const =0
 Get interface for registering clean-up event listeners. More...
 
virtual CNetScheduleAPI IWorkerNodeInitContext::GetNetScheduleAPI () const =0
 Get the shared NetScheduleAPI object used by the worker node framework. More...
 
virtual CNetCacheAPI IWorkerNodeInitContext::GetNetCacheAPI () const =0
 Get the shared NetCacheAPI object used by the worker node framework. More...
 
virtual IWorkerNodeJob::~IWorkerNodeJob ()
 
virtual int IWorkerNodeJob::Do (CWorkerNodeJobContext &context)=0
 Execute the job. More...
 
 CWorkerNodeJobContext::CWorkerNodeJobContext (EVoid)
 
 CWorkerNodeJobContext::CWorkerNodeJobContext (SWorkerNodeJobContextImpl *impl)
 
CWorkerNodeJobContextCWorkerNodeJobContext::operator= (SWorkerNodeJobContextImpl *impl)
 
 CWorkerNodeJobContext::operator SWorkerNodeJobContextImpl * ()
 
 CWorkerNodeJobContext::operator const SWorkerNodeJobContextImpl * () const
 
SWorkerNodeJobContextImplCWorkerNodeJobContext::operator-- (int)
 
const SWorkerNodeJobContextImplCWorkerNodeJobContext::operator-- (int) const
 
SWorkerNodeJobContextImplCWorkerNodeJobContext::operator-> ()
 
const SWorkerNodeJobContextImplCWorkerNodeJobContext::operator-> () const
 
 CWorkerNodeJobContext::CWorkerNodeJobContext ()
 
const CNetScheduleJobCWorkerNodeJobContext::GetJob () const
 Get the associated job structure to access all of its fields. More...
 
CNetScheduleJobCWorkerNodeJobContext::GetJob ()
 
const stringCWorkerNodeJobContext::GetJobKey () const
 Get a job key. More...
 
const stringCWorkerNodeJobContext::GetJobInput () const
 Get a job input string. More...
 
void CWorkerNodeJobContext::SetJobOutput (const string &output)
 Set a job's output. More...
 
void CWorkerNodeJobContext::SetJobRetCode (int ret_code)
 Set the return code of the job. More...
 
CNcbiIstreamCWorkerNodeJobContext::GetIStream ()
 Get a stream with input data for a job. More...
 
size_t CWorkerNodeJobContext::GetInputBlobSize () const
 Get the size of an input stream. More...
 
void CWorkerNodeJobContext::PutProgressMessage (const string &msg, bool send_immediately=false, bool overwrite=true)
 Put progress message. More...
 
CNcbiOstreamCWorkerNodeJobContext::GetOStream ()
 Get a stream where a job can write its result. More...
 
void CWorkerNodeJobContext::CloseStreams ()
 
void CWorkerNodeJobContext::CommitJob ()
 Confirm that a job is done and result is ready to be sent back to the client. More...
 
void CWorkerNodeJobContext::CommitJobWithFailure (const string &err_msg, bool no_retries=false)
 Confirm that a job is finished, but an error has happened during its execution. More...
 
void CWorkerNodeJobContext::ReturnJob ()
 Schedule the job for return. More...
 
void CWorkerNodeJobContext::RescheduleJob (const string &affinity, const string &group=kEmptyStr)
 Put the job back in the queue with the specified affinity and group. More...
 
CNetScheduleAdmin::EShutdownLevel CWorkerNodeJobContext::GetShutdownLevel ()
 Check if job processing must be aborted. More...
 
const stringCWorkerNodeJobContext::GetQueueName () const
 Get a name of a queue where this node is connected to. More...
 
const stringCWorkerNodeJobContext::GetClientName () const
 Get a node name. More...
 
void CWorkerNodeJobContext::JobDelayExpiration (unsigned runtime_inc)
 Increment job execution timeout. More...
 
bool CWorkerNodeJobContext::IsLogRequested () const
 Check if logging was requested in config file. More...
 
void CWorkerNodeJobContext::RequestExclusiveMode ()
 Instruct the system that this job requires all system's resources If this method is call, the node will not accept any other jobs until this one is done. More...
 
const stringCWorkerNodeJobContext::GetJobOutput () const
 
CNetScheduleAPI::TJobMask CWorkerNodeJobContext::GetJobMask () const
 
unsigned int CWorkerNodeJobContext::GetJobNumber () const
 
bool CWorkerNodeJobContext::IsJobCommitted () const
 
ECommitStatus CWorkerNodeJobContext::GetCommitStatus () const
 
static const char * CWorkerNodeJobContext::GetCommitStatusDescription (ECommitStatus commit_status)
 
bool CWorkerNodeJobContext::IsJobLost () const
 
IWorkerNodeCleanupEventSourceCWorkerNodeJobContext::GetCleanupEventSource ()
 
CGridWorkerNode CWorkerNodeJobContext::GetWorkerNode () const
 
void CWorkerNodeIdleTaskContext::RequestShutdown ()
 
bool CWorkerNodeIdleTaskContext::IsShutdownRequested () const
 
void CWorkerNodeIdleTaskContext::SetRunAgain ()
 
bool CWorkerNodeIdleTaskContext::NeedRunAgain () const
 
void CWorkerNodeIdleTaskContext::Reset ()
 
 CWorkerNodeIdleTaskContext::CWorkerNodeIdleTaskContext (CWorkerNodeIdleThread &thread)
 
 CWorkerNodeIdleTaskContext::CWorkerNodeIdleTaskContext (const CWorkerNodeIdleTaskContext &)
 
CWorkerNodeIdleTaskContextCWorkerNodeIdleTaskContext::operator= (const CWorkerNodeIdleTaskContext &)
 
virtual IWorkerNodeIdleTask::~IWorkerNodeIdleTask ()
 
virtual void IWorkerNodeIdleTask::Run (CWorkerNodeIdleTaskContext &)=0
 Do the Idle task here. More...
 
virtual IWorkerNodeJobFactory::~IWorkerNodeJobFactory ()
 
virtual IWorkerNodeJobIWorkerNodeJobFactory::CreateInstance (void)=0
 Create a job. More...
 
virtual void IWorkerNodeJobFactory::Init (const IWorkerNodeInitContext &)
 Initialize a worker node factory. More...
 
virtual string IWorkerNodeJobFactory::GetJobVersion () const =0
 Get the job version. More...
 
virtual string IWorkerNodeJobFactory::GetAppName () const
 
virtual string IWorkerNodeJobFactory::GetAppVersion () const
 
virtual IWorkerNodeIdleTaskIWorkerNodeJobFactory::GetIdleTask ()
 Get the Idle task. More...
 
virtual void CSimpleJobFactory< TWorkerNodeJob >::Init (const IWorkerNodeInitContext &context)
 Initialize a worker node factory. More...
 
virtual IWorkerNodeJobCSimpleJobFactory< TWorkerNodeJob >::CreateInstance (void)
 Create a job. More...
 
virtual string CSimpleJobFactory< TWorkerNodeJob >::GetJobVersion () const
 Get the job version. More...
 
virtual string CSimpleJobFactory< TWorkerNodeJob >::GetAppName () const
 
virtual void CSimpleJobFactoryEx< TWorkerNodeJob, TWorkerNodeIdleTask >::Init (const IWorkerNodeInitContext &context)
 Initialize a worker node factory. More...
 
virtual IWorkerNodeIdleTaskCSimpleJobFactoryEx< TWorkerNodeJob, TWorkerNodeIdleTask >::GetIdleTask ()
 Get the Idle task. More...
 
virtual IWorkerNodeJobWatcher::~IWorkerNodeJobWatcher ()
 
virtual void IWorkerNodeJobWatcher::Notify (const CWorkerNodeJobContext &job, EEvent event)=0
 
 CGridWorkerNode::CGridWorkerNode (EVoid)
 
 CGridWorkerNode::CGridWorkerNode (SGridWorkerNodeImpl *impl)
 
CGridWorkerNodeCGridWorkerNode::operator= (SGridWorkerNodeImpl *impl)
 
 CGridWorkerNode::operator SGridWorkerNodeImpl * ()
 
 CGridWorkerNode::operator const SGridWorkerNodeImpl * () const
 
SGridWorkerNodeImplCGridWorkerNode::operator-- (int)
 
const SGridWorkerNodeImplCGridWorkerNode::operator-- (int) const
 
SGridWorkerNodeImplCGridWorkerNode::operator-> ()
 
const SGridWorkerNodeImplCGridWorkerNode::operator-> () const
 
 CGridWorkerNode::CGridWorkerNode ()
 
 CGridWorkerNode::CGridWorkerNode (CNcbiApplicationAPI &app, IWorkerNodeJobFactory *job_factory)
 Construct a worker node using class factories. More...
 
void CGridWorkerNode::Init ()
 
int CGridWorkerNode::Run (ESwitch daemonize=eDefault, string procinfo_file_name=string())
 Start job execution loop. More...
 
void CGridWorkerNode::RequestShutdown ()
 
void CGridWorkerNode::ForceSingleThread ()
 
void CGridWorkerNode::SetListener (IGridWorkerNodeApp_Listener *listener)
 
IWorkerNodeJobFactoryCGridWorkerNode::GetJobFactory ()
 
unsigned int CGridWorkerNode::GetMaxThreads () const
 Get the maximum threads running simultaneously. More...
 
Uint8 CGridWorkerNode::GetTotalMemoryLimit () const
 Get total memory limit (automatic restart if node grows more than that) More...
 
unsigned CGridWorkerNode::GetTotalTimeLimit () const
 Get total time limit (automatic restart after that) More...
 
time_t CGridWorkerNode::GetStartupTime () const
 
unsigned CGridWorkerNode::GetQueueTimeout () const
 
bool CGridWorkerNode::IsHostInAdminHostsList (const string &host) const
 
unsigned CGridWorkerNode::GetCommitJobInterval () const
 
unsigned CGridWorkerNode::GetCheckStatusPeriod () const
 
size_t CGridWorkerNode::GetServerOutputSize ()
 
const stringCGridWorkerNode::GetQueueName () const
 
const stringCGridWorkerNode::GetClientName () const
 
string CGridWorkerNode::GetAppName () const
 
TVersion CGridWorkerNode::GetAppVersion () const
 
const stringCGridWorkerNode::GetServiceName () const
 
CNetCacheAPI CGridWorkerNode::GetNetCacheAPI () const
 
CNetScheduleAPI CGridWorkerNode::GetNetScheduleAPI () const
 
CNetScheduleExecutor CGridWorkerNode::GetNSExecutor () const
 
static void CGridWorkerNode::DisableDefaultRequestEventLogging (EDisabledRequestEvents disabled_events=eDisableStartStop)
 
IWorkerNodeCleanupEventSourceCGridWorkerNode::GetCleanupEventSource ()
 
void CGridWorkerNode::Suspend (bool pullback, unsigned timeout)
 
void CGridWorkerNode::Resume ()
 
bool CGridWorkerNode::IsSuspended () const
 
virtual const char * CGridWorkerNodeException::GetErrCodeString (void) const override
 Get error code interpreted as text. More...
 
 CGridWorkerNodeException::NCBI_EXCEPTION_DEFAULT (CGridWorkerNodeException, CException)
 
 CNetScheduleAPI::CNetScheduleAPI (EVoid)
 
 CNetScheduleAPI::CNetScheduleAPI (SNetScheduleAPIImpl *impl)
 
CNetScheduleAPICNetScheduleAPI::operator= (SNetScheduleAPIImpl *impl)
 
 CNetScheduleAPI::operator SNetScheduleAPIImpl * ()
 
 CNetScheduleAPI::operator const SNetScheduleAPIImpl * () const
 
SNetScheduleAPIImplCNetScheduleAPI::operator-- (int)
 
const SNetScheduleAPIImplCNetScheduleAPI::operator-- (int) const
 
SNetScheduleAPIImplCNetScheduleAPI::operator-> ()
 
const SNetScheduleAPIImplCNetScheduleAPI::operator-> () const
 
 CNetScheduleAPI::CNetScheduleAPI ()
 
 CNetScheduleAPI::CNetScheduleAPI (EAppRegistry use_app_reg, const string &conf_section=kEmptyStr)
 Creates an instance of CNetScheduleAPI and initializes it with parameters read from the application registry. More...
 
 CNetScheduleAPI::CNetScheduleAPI (const IRegistry &reg, const string &conf_section=kEmptyStr)
 Constructs a CNetScheduleAPI object and initializes it with parameters read from the specified registry object. More...
 
 CNetScheduleAPI::CNetScheduleAPI (CConfig *conf, const string &conf_section=kEmptyStr)
 Constructs a CNetScheduleAPI object and initializes it with parameters read from the specified configuration object. More...
 
 CNetScheduleAPI::CNetScheduleAPI (const string &service_name, const string &client_name, const string &queue_name)
 Construct the client without linking it to any particular server. More...
 
void CNetScheduleAPI::SetProgramVersion (const string &pv)
 Set program version (like: MyProgram v. More...
 
const stringCNetScheduleAPI::GetProgramVersion () const
 Get program version string. More...
 
const stringCNetScheduleAPI::GetQueueName () const
 Return Queue name. More...
 
static string CNetScheduleAPI::StatusToString (EJobStatus status)
 Printable status type. More...
 
static EJobStatus CNetScheduleAPI::StringToStatus (const CTempString &status_str)
 Parse status string into enumerator value. More...
 
CNetScheduleSubmitter CNetScheduleAPI::GetSubmitter ()
 Create an instance of CNetScheduleSubmitter. More...
 
CNetScheduleExecutor CNetScheduleAPI::GetExecutor ()
 Create an instance of CNetScheduleExecutor. More...
 
CNetScheduleJobReader CNetScheduleAPI::GetJobReader (const string &group=kEmptyStr, const string &affinity=kEmptyStr)
 Create an instance of CNetScheduleJobReader. More...
 
CNetScheduleAdmin CNetScheduleAPI::GetAdmin ()
 
CNetService CNetScheduleAPI::GetService ()
 
const SServerParamsCNetScheduleAPI::GetServerParams ()
 
void CNetScheduleAPI::GetQueueParams (const string &queue_name, TQueueParams &queue_params)
 
void CNetScheduleAPI::GetQueueParams (TQueueParams &queue_params)
 
EJobStatus CNetScheduleAPI::GetJobDetails (CNetScheduleJob &job, time_t *job_exptime=NULL, ENetScheduleQueuePauseMode *pause_mode=NULL)
 Get job details. More...
 
void CNetScheduleAPI::GetProgressMsg (CNetScheduleJob &job)
 Update the progress_message field of the job structure. More...
 
void CNetScheduleAPI::SetCommunicationTimeout (const STimeout &to)
 
void CNetScheduleAPI::SetClientNode (const string &client_node)
 
void CNetScheduleAPI::SetClientSession (const string &client_session)
 
void CNetScheduleAPI::SetClientType (EClientType client_type)
 
static ENetScheduleWarningType CNetScheduleAPI::ExtractWarningType (string &warn_msg)
 
static const char * CNetScheduleAPI::WarningTypeToString (ENetScheduleWarningType warning_type)
 
 CNetScheduleNewJob::CNetScheduleNewJob (const string &_input=kEmptyStr, const string &_affinity=kEmptyStr, CNetScheduleAPI::TJobMask _mask=CNetScheduleAPI::eEmptyMask)
 
void CNetScheduleNewJob::Reset ()
 
 CNetScheduleJob::CNetScheduleJob (const string &_input=kEmptyStr, const string &_affinity=kEmptyStr, CNetScheduleAPI::TJobMask _mask=CNetScheduleAPI::eEmptyMask)
 
void CNetScheduleJob::Reset ()
 
 CNetScheduleSubmitter::CNetScheduleSubmitter (EVoid)
 
 CNetScheduleSubmitter::CNetScheduleSubmitter (SNetScheduleSubmitterImpl *impl)
 
CNetScheduleSubmitterCNetScheduleSubmitter::operator= (SNetScheduleSubmitterImpl *impl)
 
 CNetScheduleSubmitter::operator SNetScheduleSubmitterImpl * ()
 
 CNetScheduleSubmitter::operator const SNetScheduleSubmitterImpl * () const
 
SNetScheduleSubmitterImplCNetScheduleSubmitter::operator-- (int)
 
const SNetScheduleSubmitterImplCNetScheduleSubmitter::operator-- (int) const
 
SNetScheduleSubmitterImplCNetScheduleSubmitter::operator-> ()
 
const SNetScheduleSubmitterImplCNetScheduleSubmitter::operator-> () const
 
 CNetScheduleSubmitter::CNetScheduleSubmitter ()
 
string CNetScheduleSubmitter::SubmitJob (CNetScheduleNewJob &job)
 Submit job. More...
 
void CNetScheduleSubmitter::SubmitJobBatch (vector< CNetScheduleJob > &jobs, const string &job_group=kEmptyStr)
 Submit job batch. More...
 
bool CNetScheduleSubmitter::Read (string *job_id, string *auth_token, CNetScheduleAPI::EJobStatus *job_status, unsigned timeout=0, const string &job_group=kEmptyStr)
 Incremental retrieval of jobs that are done or failed. More...
 
void CNetScheduleSubmitter::ReadConfirm (const string &job_id, const string &auth_token)
 Mark the specified job as successfully retrieved. More...
 
void CNetScheduleSubmitter::ReadRollback (const string &job_id, const string &auth_token)
 Refuse from processing the results of the specified job. More...
 
void CNetScheduleSubmitter::ReadFail (const string &job_id, const string &auth_token, const string &error_message=kEmptyStr)
 Refuse from processing the results of the specified job and increase its counter of failed job result retrievals. More...
 
CNetScheduleAPI::EJobStatus CNetScheduleSubmitter::SubmitJobAndWait (CNetScheduleJob &job, unsigned wait_time)
 Submit job to server and wait for the result. More...
 
CNetScheduleAPI::EJobStatus CNetScheduleSubmitter::WaitForJob (const string &job_id, unsigned wait_time)
 Wait for job to finish its execution (done/failed/canceled). More...
 
void CNetScheduleSubmitter::CancelJob (const string &job_key)
 Cancel job. More...
 
void CNetScheduleSubmitter::CancelJobGroup (const string &job_group, const string &job_statuses=kEmptyStr)
 Cancel job group. More...
 
void CNetScheduleSubmitter::GetProgressMsg (CNetScheduleJob &job)
 Get progress message. More...
 
CNetScheduleAPI::EJobStatus CNetScheduleSubmitter::GetJobStatus (const string &job_key, time_t *job_exptime=NULL, ENetScheduleQueuePauseMode *pause_mode=NULL)
 Get the current status of the specified job. More...
 
CNetScheduleAPI::EJobStatus CNetScheduleSubmitter::GetJobDetails (CNetScheduleJob &job, time_t *job_exptime=NULL, ENetScheduleQueuePauseMode *pause_mode=NULL)
 Get full information about the specified job. More...
 
 CNetScheduleExecutor::CNetScheduleExecutor (EVoid)
 
 CNetScheduleExecutor::CNetScheduleExecutor (SNetScheduleExecutorImpl *impl)
 
CNetScheduleExecutorCNetScheduleExecutor::operator= (SNetScheduleExecutorImpl *impl)
 
 CNetScheduleExecutor::operator SNetScheduleExecutorImpl * ()
 
 CNetScheduleExecutor::operator const SNetScheduleExecutorImpl * () const
 
SNetScheduleExecutorImplCNetScheduleExecutor::operator-- (int)
 
const SNetScheduleExecutorImplCNetScheduleExecutor::operator-- (int) const
 
SNetScheduleExecutorImplCNetScheduleExecutor::operator-> ()
 
const SNetScheduleExecutorImplCNetScheduleExecutor::operator-> () const
 
 CNetScheduleExecutor::CNetScheduleExecutor ()
 
void CNetScheduleExecutor::SetAffinityPreference (EJobAffinityPreference aff_pref)
 Set preferred method of requesting jobs with affinities. More...
 
void CNetScheduleExecutor::SetJobGroup (const string &job_group)
 Retrieve jobs from the specified group only. More...
 
bool CNetScheduleExecutor::GetJob (CNetScheduleJob &job, const string &affinity_list=kEmptyStr, CDeadline *dealine=NULL)
 Get a pending job. More...
 
bool CNetScheduleExecutor::GetJob (CNetScheduleJob &job, unsigned wait_time, const string &affinity_list=kEmptyStr)
 The same as GetJob(CNetScheduleJob&, EJobAffinityPreference, const string&, CDeadline*), except it accepts integer wait time in seconds instead of CDeadline. More...
 
void CNetScheduleExecutor::PutResult (const CNetScheduleJob &job)
 Put job result (job should be received by GetJob() or WaitJob()) More...
 
void CNetScheduleExecutor::PutProgressMsg (const CNetScheduleJob &job)
 Put job interim (progress) message. More...
 
void CNetScheduleExecutor::GetProgressMsg (CNetScheduleJob &job)
 Get progress message. More...
 
void CNetScheduleExecutor::PutFailure (const CNetScheduleJob &job, bool no_retries=false)
 Submit job failure diagnostics. More...
 
void CNetScheduleExecutor::Reschedule (const CNetScheduleJob &job)
 Reschedule a job with new affinity and/or group information. More...
 
CNetScheduleAPI::EJobStatus CNetScheduleExecutor::GetJobStatus (const CNetScheduleJob &job, time_t *job_exptime=NULL, ENetScheduleQueuePauseMode *pause_mode=NULL)
 Get the current status of the specified job. More...
 
void CNetScheduleExecutor::ReturnJob (const CNetScheduleJob &job)
 Switch the job back to the "Pending" status so that it can be run again on a different worker node. More...
 
void CNetScheduleExecutor::JobDelayExpiration (const CNetScheduleJob &job, unsigned runtime_inc)
 Increment job execution timeout. More...
 
const CNetScheduleAPI::SServerParamsCNetScheduleExecutor::GetServerParams ()
 Retrieve queue parameters from the server. More...
 
void CNetScheduleExecutor::ClearNode ()
 Unregister client-listener. More...
 
void CNetScheduleExecutor::AddPreferredAffinities (const vector< string > &affs_to_add)
 
void CNetScheduleExecutor::DeletePreferredAffinities (const vector< string > &affs_to_del)
 
void CNetScheduleExecutor::ChangePreferredAffinities (const vector< string > *affs_to_add, const vector< string > *affs_to_delete)
 
const stringCNetScheduleExecutor::GetQueueName ()
 Return Queue name. More...
 
const stringCNetScheduleExecutor::GetClientName ()
 
const stringCNetScheduleExecutor::GetServiceName ()
 
 CNetScheduleJobReader::CNetScheduleJobReader (EVoid)
 
 CNetScheduleJobReader::CNetScheduleJobReader (SNetScheduleJobReaderImpl *impl)
 
CNetScheduleJobReaderCNetScheduleJobReader::operator= (SNetScheduleJobReaderImpl *impl)
 
 CNetScheduleJobReader::operator SNetScheduleJobReaderImpl * ()
 
 CNetScheduleJobReader::operator const SNetScheduleJobReaderImpl * () const
 
SNetScheduleJobReaderImplCNetScheduleJobReader::operator-- (int)
 
const SNetScheduleJobReaderImplCNetScheduleJobReader::operator-- (int) const
 
SNetScheduleJobReaderImplCNetScheduleJobReader::operator-> ()
 
const SNetScheduleJobReaderImplCNetScheduleJobReader::operator-> () const
 
 CNetScheduleJobReader::CNetScheduleJobReader ()
 
EReadNextJobResult CNetScheduleJobReader::ReadNextJob (CNetScheduleJob *job, CNetScheduleAPI::EJobStatus *job_status, const CTimeout *timeout=NULL)
 Wait and return the next completed job. More...
 
void CNetScheduleJobReader::InterruptReading ()
 Abort waiting for a completed job in the above method. More...
 
static CException::TErrCode CNetScheduleExceptionMap::GetCode (const string &name)
 
virtual const char * CNetScheduleException::GetErrCodeString () const override
 Get error code interpreted as text. More...
 
static const char * CNetScheduleException::GetErrCodeString (CException::TErrCode err_code)
 
unsigned CNetScheduleException::ErrCodeToHTTPStatusCode () const
 
static const char * CNetScheduleException::GetErrCodeDescription (CException::TErrCode err_code)
 
 CNetScheduleException::NCBI_EXCEPTION_DEFAULT (CNetScheduleException, CNetServiceException)
 
 CNetScheduleKey::CNetScheduleKey (const string &str_key, CCompoundIDPool::TInstance id_pool=NULL)
 Parse NetSchedule key; throw an exception if the key cannot be recognized. More...
 
 CNetScheduleKey::CNetScheduleKey ()
 Construct an empty object for use with ParseJobKey(). More...
 
bool CNetScheduleKey::ParseJobKey (const string &key_str, CCompoundIDPool::TInstance id_pool=NULL)
 
 CNetScheduleKeyGenerator::CNetScheduleKeyGenerator (const string &host, unsigned port, const string &queue_name)
 
string CNetScheduleKeyGenerator::Generate (unsigned id) const
 
void CNetScheduleKeyGenerator::Generate (string *key, unsigned id) const
 
string CNetScheduleKeyGenerator::GenerateCompoundID (unsigned id, CCompoundIDPool id_pool) const
 
 CGridCgiContext::CGridCgiContext (CHTMLPage &page, CCgiContext &ctx)
 
 CGridCgiContext::~CGridCgiContext ()
 
CHTMLPageCGridCgiContext::GetHTMLPage (void)
 Get an HTML page. More...
 
string CGridCgiContext::GetSelfURL (void) const
 Get Self URL. More...
 
const stringCGridCgiContext::GetJobKey (void) const
 Get Current job key. More...
 
const stringCGridCgiContext::GetJobProgressMessage (void) const
 Get current job progress message. More...
 
const stringCGridCgiContext::GetEntryValue (const string &entry_name) const
 Get a value from a CGI request. More...
 
void CGridCgiContext::PullUpPersistentEntry (const string &entry_name)
 Save this entry as a cookie add it to serf url. More...
 
void CGridCgiContext::DefinePersistentEntry (const string &entry_name, const string &value)
 
CCgiContextCGridCgiContext::GetCGIContext ()
 Get CGI Context. More...
 
void CGridCgiContext::SetCompleteResponse (CNcbiIstream &is)
 
bool CGridCgiContext::NeedRenderPage () const
 
string CGridCgiContext::GetHiddenFields () const
 
const stringCGridCgiContext::GetJobInput () const
 
const stringCGridCgiContext::GetJobOutput () const
 
void CGridCgiContext::Clear ()
 Remove all persisted entries from cookie and self url. More...
 
void CGridCgiContext::SetJobKey (const string &job_key)
 
void CGridCgiContext::SetJobProgressMessage (const string &msg)
 
void CGridCgiContext::SetJobInput (const string &input)
 
void CGridCgiContext::SetJobOutput (const string &output)
 
 CGridCgiContext::CGridCgiContext (const CGridCgiContext &)
 A copy constructor and an assignment operator are prohibited. More...
 
CGridCgiContextCGridCgiContext::operator= (const CGridCgiContext &)
 
virtual void CGridCgiApplication::Init (void)
 This method is called on the CGI application initialization – before starting to process a HTTP request or even receiving one. More...
 
virtual int CGridCgiApplication::ProcessRequest (CCgiContext &ctx)
 Do not override this method yourself! – it includes all the GRIDCGI specific machinery. More...
 
virtual string CGridCgiApplication::GetProgramVersion (void) const =0
 Get program version (like: MyProgram v. More...
 
virtual void CGridCgiApplication::ShowParamsPage (CGridCgiContext &ctx) const =0
 Show a page with input data. More...
 
virtual bool CGridCgiApplication::CollectParams (CGridCgiContext &ctx)=0
 Collect parameters from HTML form If this method returns false that means that input parameters were not specified (or were incorrect). More...
 
virtual void CGridCgiApplication::PrepareJobData (CGridClient &grid_client)=0
 This method is called when a job is ready to be send to a the queue. More...
 
virtual void CGridCgiApplication::OnJobSubmitted (CGridCgiContext &)
 This method is called just after a job has been submitted. More...
 
virtual void CGridCgiApplication::OnJobDone (CGridClient &grid_client, CGridCgiContext &ctx)=0
 This method is call when a worker node finishes its job and result is ready to be retrieved. More...
 
virtual void CGridCgiApplication::OnJobFailed (const string &, CGridCgiContext &)
 This method is called when worker node reported a failure. More...
 
virtual void CGridCgiApplication::OnJobCanceled (CGridCgiContext &)
 This method is called if job was canceled during its execution. More...
 
virtual void CGridCgiApplication::OnJobRunning (CGridCgiContext &)
 This method is call when a job is taken by a worker node to be processed. More...
 
virtual void CGridCgiApplication::OnJobPending (CGridCgiContext &)
 This method is call when a job is in NetSchedule queue and is waiting for a worker node. More...
 
virtual void CGridCgiApplication::OnEndProcessRequest (CGridCgiContext &)
 This method is call at the very end of the request processing. More...
 
virtual void CGridCgiApplication::OnBeginProcessRequest (CGridCgiContext &)
 This method is call at the very beginning of the request processing. More...
 
virtual void CGridCgiApplication::OnQueueIsBusy (CGridCgiContext &)
 This method is call when a job couldn't be submitted because of NetSchedule queue is full. More...
 
virtual string CGridCgiApplication::GetPageTitle (void) const =0
 Return page name. More...
 
virtual string CGridCgiApplication::GetPageTemplate (void) const =0
 Return a name of a file this HTML page template. More...
 
virtual bool CGridCgiApplication::JobStopRequested (void) const
 When job is still running this method is called to check if cancel has been requested via the user interface(HTML). More...
 
CGridClientCGridCgiApplication::GetGridClient (void)
 Get a Grid Client. More...
 
void CGridCgiApplication::InitGridClient ()
 Initialize grid client. More...
 
void CGridCgiApplication::RenderRefresh (CHTMLPage &page, const string &url, int delay)
 
virtual bool CGridCgiApplication::IsCachingNeeded (const CCgiRequest &request) const
 
bool CGridCgiApplication::x_JobStopRequested (const CGridCgiContext &) const
 
bool CGridCgiApplication::x_CheckJobStatus (CGridCgiContext &grid_ctx)
 
 CRemoteCgiApp::CRemoteCgiApp ()
 
virtual void CRemoteCgiApp::Init (void)
 This method is called on the CGI application initialization – before starting to process a HTTP request or even receiving one. More...
 
virtual int CRemoteCgiApp::Run (void)
 Do not override this method yourself! – it includes all the CGI specific machinery. More...
 
void CRemoteCgiApp::RequestShutdown (void)
 
virtual string CRemoteCgiApp::GetJobVersion () const
 
virtual void CRemoteCgiApp::SetupArgDescriptions (CArgDescriptions *arg_desc)
 Setup the command line argument descriptions. More...
 
void CRemoteCgiApp::PutProgressMessage (const string &msg, bool send_immediately=false)
 
int CRemoteCgiApp::RunJob (CNcbiIstream &is, CNcbiOstream &os, CWorkerNodeJobContext &)
 
 SInputValidator::SInputValidator ()
 
void SInputValidator::CheckEntry (const string &name, const string &value, bool is_requested=true)
 
void SInputValidator::AddAffinityEntry (string name)
 
static vector< stringSInputValidator::GetListenJobs (const string &value)
 
static CDeadline SInputValidator::GetDeadline (const string &value)
 
static void SInputValidator::CheckJobKey (const string &value)
 
static void SInputValidator::CheckCancel (const string &value)
 
static void SInputValidator::CheckCtgTime (const string &value)
 
static void SInputValidator::CheckGetResults (const string &value)
 
static void SInputValidator::CheckAffinity (const string &value)
 
template<class TF >
 SInputValidator::SEntry::SEntry (string n, TF f)
 
bool SInputValidator::SEntry::Check (const string &value)
 
 SExceptionMessage::SExceptionMessage (CNcbiRegistry *registry=nullptr)
 
string SExceptionMessage::operator() (const string &what)
 
 CGridCgiContext::CGridCgiContext (SInputValidator &input_validator, CHTMLPage &page, CHTMLPage &custom_http_header, CCgiContext &ctx)
 
string CGridCgiContext::GetSelfURL (bool include_entries=true) const
 
const stringCGridCgiContext::GetPersistentEntryValue (const string &entry_name) const
 
void CGridCgiContext::GetQueryStringEntryValue (const string &entry_name, string &value) const
 
void CGridCgiContext::GetRequestEntryValue (const string &entry_name, string &value) const
 
void CGridCgiContext::PullUpPersistentEntry (const string &entry_name, string &value, int pulling=eDefaultPulling)
 
const TPersistentEntriesCGridCgiContext::GetPersistentEntries () const
 
bool CGridCgiContext::HasCtgTime () const
 
void CGridCgiContext::LoadQueryStringTags (CHTMLPlainText::EEncodeMode encode_mode)
 
void CGridCgiContext::SelectView (const string &view_name)
 
void CGridCgiContext::NeedRenderPage (bool value)
 
bool CGridCgiContext::NeedMetaRefresh () const
 
stringCGridCgiContext::GetJobKey ()
 
stringCGridCgiContext::GetJqueryCallback ()
 
void CGridCgiContext::AddTagMap (const string &n, const string &v, CHTMLPlainText::EEncodeMode m=CHTMLPlainText::eHTMLEncode)
 
virtual void CCgi2RCgiApp::Init ()
 This method is called on the CGI application initialization – before starting to process a HTTP request or even receiving one. More...
 
virtual CCgiContextCCgi2RCgiApp::CreateContextWithFlags (CNcbiArguments *args, CNcbiEnvironment *env, CNcbiIstream *inp, CNcbiOstream *out, int ifd, int ofd, int flags)
 The same as CreateContext(), but allows for a custom set of flags to be specified in the CCgiRequest constructor. More...
 
virtual int CCgi2RCgiApp::ProcessRequest (CCgiContext &ctx)
 This is the method you should override. More...
 
void CCgi2RCgiApp::DefineRefreshTags (CGridCgiContext &grid_ctx, const string &url, int delay)
 
void CCgi2RCgiApp::ListenJobs (const string &job_ids_value, const string &timeout_value)
 
void CCgi2RCgiApp::CheckJob (CGridCgiContext &grid_ctx)
 
void CCgi2RCgiApp::SubmitJob (CCgiRequest &request, CGridCgiContext &grid_ctx)
 
void CCgi2RCgiApp::PopulatePage (CGridCgiContext &grid_ctx)
 
int CCgi2RCgiApp::RenderPage ()
 
CNetScheduleAPI::EJobStatus CCgi2RCgiApp::GetStatus (CGridCgiContext &)
 
CNetScheduleAPI::EJobStatus CCgi2RCgiApp::GetStatusAndCtgTime (CGridCgiContext &grid_ctx)
 
bool CCgi2RCgiApp::CheckIfJobDone (CGridCgiContext &, CNetScheduleAPI::EJobStatus)
 
void CCgi2RCgiApp::ReadJob (istream &, CGridCgiContext &)
 
void CCgi2RCgiApp::OnJobDone (CGridCgiContext &)
 
void CCgi2RCgiApp::OnJobFailed (const string &msg, CGridCgiContext &ctx)
 
 CRegexpTemplateFilter::CRegexpTemplateFilter (CHTMLPage *page)
 
virtual bool CRegexpTemplateFilter::TestAttribute (const string &attr_name, const string &test_pattern)
 
static void s_RemoveCallbackParameter (string *query_string)
 
bool s_IsPendingOrRunning (CNetScheduleAPI::EJobStatus job_status)
 
 SJob::SJob (const string &id)
 
CNcbiOstreamoperator<< (CNcbiOstream &out, SJobs jobs)
 
void s_GetCtgTime (CGridCgiContext &grid_ctx, string event)
 
int main (int argc, const char *argv[])
 

Variables

CGridClientCGridJobBatchSubmitter::m_GridClient
 
vector< CNetScheduleJobCGridJobBatchSubmitter::m_Jobs
 
size_t CGridJobBatchSubmitter::m_JobIndex
 
bool CGridJobBatchSubmitter::m_HasBeenSubmitted
 
SGridWrite CGridJobBatchSubmitter::m_GridWrite
 
CNetScheduleSubmitter CGridClient::m_NetScheduleSubmitter
 
CNetCacheAPI CGridClient::m_NetCacheAPI
 
CNetScheduleJob CGridClient::m_Job
 
SGridRead CGridClient::m_GridRead
 
SGridWrite CGridClient::m_GridWrite
 
CGridJobBatchSubmitter CGridClient::m_JobBatchSubmitter
 
size_t CGridClient::m_BlobSize = 0
 
bool CGridClient::m_AutoCleanUp
 
bool CGridClient::m_UseProgress
 
bool CGridClient::m_JobDetailsRead = false
 
unique_ptr< CGridClientCGridClientApp::m_GridClient
 
CNetRef< SWorkerNodeJobContextImplCWorkerNodeJobContext::m_Impl
 
CWorkerNodeIdleThreadCWorkerNodeIdleTaskContext::m_Thread
 
bool CWorkerNodeIdleTaskContext::m_RunAgain
 
const IWorkerNodeInitContextCSimpleJobFactory< TWorkerNodeJob >::m_WorkerNodeInitContext
 
static const char *const CSimpleJobFactory< TWorkerNodeJob >::m_JobVersion
 
static const char *const CSimpleJobFactory< TWorkerNodeJob >::m_AppName
 
unique_ptr< TWorkerNodeIdleTask > CSimpleJobFactoryEx< TWorkerNodeJob, TWorkerNodeIdleTask >::m_IdleTask
 
CNetRef< SGridWorkerNodeImplCGridWorkerNode::m_Impl
 
CNetRef< SNetScheduleAPIImplCNetScheduleAPI::m_Impl
 
size_t CNetScheduleAPI::SServerParams::max_input_size
 
size_t CNetScheduleAPI::SServerParams::max_output_size
 
string CNetScheduleNewJob::input
 Input data. More...
 
string CNetScheduleNewJob::affinity
 
string CNetScheduleNewJob::group
 
CNetScheduleAPI::TJobMask CNetScheduleNewJob::mask
 
string CNetScheduleNewJob::job_id
 Output job key. More...
 
string CNetScheduleJob::client_ip
 
string CNetScheduleJob::session_id
 
string CNetScheduleJob::page_hit_id
 
int CNetScheduleJob::ret_code
 Job return code. More...
 
string CNetScheduleJob::output
 Job result data. More...
 
string CNetScheduleJob::error_msg
 
string CNetScheduleJob::progress_msg
 
string CNetScheduleJob::auth_token
 
CNetServer CNetScheduleJob::server
 The server the job belongs to. More...
 
CNetRef< SNetScheduleSubmitterImplCNetScheduleSubmitter::m_Impl
 
CNetRef< SNetScheduleExecutorImplCNetScheduleExecutor::m_Impl
 
CNetRef< SNetScheduleJobReaderImplCNetScheduleJobReader::m_Impl
 
unsigned CNetScheduleKey::version
 Key version. More...
 
string CNetScheduleKey::host
 Server name. More...
 
unsigned short CNetScheduleKey::port
 TCP/IP port number. More...
 
string CNetScheduleKey::queue
 Queue name, optional. More...
 
unsigned CNetScheduleKey::id
 Job id. More...
 
bool CNetScheduleKeyGenerator::m_UseIPv4Addr
 
unsigned CNetScheduleKeyGenerator::m_HostIPv4Addr
 
string CNetScheduleKeyGenerator::m_HostName
 
unsigned short CNetScheduleKeyGenerator::m_Port
 
string CNetScheduleKeyGenerator::m_QueueName
 
string CNetScheduleKeyGenerator::m_V1HostPortQueue
 
CHTMLPageCGridCgiContext::m_Page
 
CCgiContextCGridCgiContext::m_CgiContext
 
TCgiEntries CGridCgiContext::m_ParsedQueryString
 
TPersistedEntries CGridCgiContext::m_PersistedEntries
 
string CGridCgiContext::m_ProgressMsg
 
string CGridCgiContext::m_JobInput
 
string CGridCgiContext::m_JobOutput
 
bool CGridCgiContext::m_NeedRenderPage
 
int CGridCgiApplication::m_RefreshDelay
 
int CGridCgiApplication::m_FirstDelay
 
CNetScheduleAPI CGridCgiApplication::m_NSClient
 
CNetCacheAPI CGridCgiApplication::m_NetCacheAPI
 
unique_ptr< CGridClientCGridCgiApplication::m_GridClient
 
CCgiResponseCGridCgiApplication::m_Response
 
CWorkerNodeJobContextCRemoteCgiApp::m_JobContext
 
unique_ptr< CGridWorkerNodeCRemoteCgiApp::m_AppImpl
 
vector< SEntrySInputValidator::m_Entries
 
string SInputValidator::SEntry::name
 
function< void(const string &)> SInputValidator::SEntry::m_Func
 
bool SInputValidator::SEntry::m_Validated = false
 
CNcbiRegistrySExceptionMessage::m_Registry
 
SInputValidatorCGridCgiContext::m_InputValidator
 
CHTMLPageCGridCgiContext::m_CustomHTTPHeader
 
TPersistentEntries CGridCgiContext::m_PersistentEntries
 
string CGridCgiContext::m_JobKey
 
string CGridCgiContext::m_JqueryCallback
 
bool CGridCgiContext::m_NeedMetaRefresh
 
int CCgi2RCgiApp::m_RefreshDelay
 
int CCgi2RCgiApp::m_RefreshWait
 
int CCgi2RCgiApp::m_FirstDelay
 
CNetScheduleAPIExt CCgi2RCgiApp::m_NetScheduleAPI
 
CNetCacheAPI CCgi2RCgiApp::m_NetCacheAPI
 
unique_ptr< CGridClientCCgi2RCgiApp::m_GridClient
 
CCgiResponseCCgi2RCgiApp::m_Response
 
string CCgi2RCgiApp::m_Title
 
string CCgi2RCgiApp::m_FallBackUrl
 
int CCgi2RCgiApp::m_FallBackDelay
 
int CCgi2RCgiApp::m_CancelGoBackDelay
 
string CCgi2RCgiApp::m_DateFormat
 
string CCgi2RCgiApp::m_ElapsedTimeFormat
 
bool CCgi2RCgiApp::m_InterceptJQueryCallback
 
bool CCgi2RCgiApp::m_AddJobIdToHeader
 
bool CCgi2RCgiApp::m_DisplayDonePage
 
unique_ptr< CHTMLPageCCgi2RCgiApp::m_Page
 
unique_ptr< CHTMLPageCCgi2RCgiApp::m_CustomHTTPHeader
 
string CCgi2RCgiApp::m_HtmlTemplate
 
vector< stringCCgi2RCgiApp::m_HtmlIncs
 
string CCgi2RCgiApp::m_AffinityName
 
int CCgi2RCgiApp::m_AffinitySource
 
int CCgi2RCgiApp::m_AffinitySetLimit
 
string CCgi2RCgiApp::m_ContentType
 
CHTMLPlainText::EEncodeMode CCgi2RCgiApp::m_TargetEncodeMode
 
bool CCgi2RCgiApp::m_HTMLPassThrough
 
bool CCgi2RCgiApp::m_PortAdded
 
SInputValidator CCgi2RCgiApp::m_InputValidator
 
SExceptionMessage CCgi2RCgiApp::m_ExceptionMessage
 
static const string kGridCgiForm
 
static const string kPlainTextView = "<@STAT_VIEW@>"
 
CHTMLPageCRegexpTemplateFilter::m_Page
 
CNetScheduleAPI::EJobStatus SJob::status = CNetScheduleAPI::ePending
 
bool SJob::progress_msg_truncated = false
 

Friends

class CGridJobBatchSubmitter::CGridClient
 Only CGridClient can create an instance of this class. More...
 
class CWorkerNodeIdleTaskContext::CWorkerNodeIdleThread
 
class CGridCgiContext::CGridCgiApplication
 
class CRemoteCgiApp::CCgiWorkerNodeJob
 
CNcbiOstreamSJobs::operator<< (CNcbiOstream &out, SJobs jobs)
 

Detailed Description

Macro Definition Documentation

◆ CALLBACK_PARAM

#define CALLBACK_PARAM   "callback="

Definition at line 786 of file cgi2rcgi.cpp.

◆ NCBI_DECLARE_WORKERNODE_FACTORY

#define NCBI_DECLARE_WORKERNODE_FACTORY (   TWorkerNodeJob,
  Version 
)
Value:
typedef CSimpleJobFactory<TWorkerNodeJob> TWorkerNodeJob##Factory; \
NCBI_DECLARE_WORKERNODE_FACTORY_IMPL(TWorkerNodeJob, Version)
static struct tagNamedScoreFactory Factory[]

Definition at line 496 of file grid_worker.hpp.

◆ NCBI_DECLARE_WORKERNODE_FACTORY_EX

#define NCBI_DECLARE_WORKERNODE_FACTORY_EX (   TWorkerNodeJob,
  TWorkerNodeIdleTask,
  Version 
)
Value:
TWorkerNodeJob##FactoryEx; \
NCBI_DECLARE_WORKERNODE_FACTORY_IMPL(TWorkerNodeJob, Version)

Definition at line 500 of file grid_worker.hpp.

◆ NCBI_DECLARE_WORKERNODE_FACTORY_IMPL

#define NCBI_DECLARE_WORKERNODE_FACTORY_IMPL (   TWorkerNodeJob,
  Version 
)
Value:
BEGIN_NCBI_SCOPE \
template <> \
#TWorkerNodeJob " version " NCBI_AS_STRING(Version); \
template <> \
const char* const CSimpleJobFactory<TWorkerNodeJob>::m_AppName = \
#TWorkerNodeJob; \
END_NCBI_SCOPE

Definition at line 486 of file grid_worker.hpp.

Typedef Documentation

◆ CNetScheduleExecuter

Definition at line 765 of file netschedule_api.hpp.

◆ TInstance [1/6]

Definition at line 197 of file grid_worker.hpp.

◆ TInstance [2/6]

Definition at line 540 of file grid_worker.hpp.

◆ TInstance [3/6]

Definition at line 87 of file netschedule_api.hpp.

◆ TInstance [4/6]

Definition at line 393 of file netschedule_api.hpp.

◆ TInstance [5/6]

Definition at line 587 of file netschedule_api.hpp.

◆ TInstance [6/6]

Definition at line 778 of file netschedule_api.hpp.

◆ TJobMask

typedef unsigned CNetScheduleAPI::TJobMask

Definition at line 212 of file netschedule_api.hpp.

◆ TPersistedEntries

Definition at line 115 of file grid_cgiapp.hpp.

◆ TPersistentEntries

Definition at line 277 of file cgi2rcgi.cpp.

◆ TQueueParams

Definition at line 241 of file netschedule_api.hpp.

◆ TVersion

Definition at line 590 of file grid_worker.hpp.

Enumeration Type Documentation

◆ EAppRegistry

Defines how this object must be initialized.

Enumerator
eAppRegistry 

Definition at line 90 of file netschedule_api.hpp.

◆ ECleanUp

Enumerator
eAutomaticCleanup 
eManualCleanup 

Definition at line 120 of file grid_client.hpp.

◆ EClientType

Enumerator
eCT_Auto 
eCT_Admin 
eCT_Submitter 
eCT_WorkerNode 
eCT_Reader 

Definition at line 263 of file netschedule_api.hpp.

◆ ECommitStatus

Enumerator
eCS_Done 
eCS_Failure 
eCS_Return 
eCS_Reschedule 
eCS_NotCommitted 
eCS_JobIsLost 

Definition at line 350 of file grid_worker.hpp.

◆ EDisabledRequestEvents

Disable the automatic logging of request-start and request-stop events by the framework itself.

Enumerator
eEnableStartStop 
eDisableStartStop 
eDisableStartOnly 

Definition at line 601 of file grid_worker.hpp.

◆ EErrCode [1/3]

Enumerator
eBatchAlreadySubmitted 

Definition at line 298 of file grid_client.hpp.

◆ EErrCode [2/3]

Enumerator
ePortBusy 
eJobIsLost 
eJobFactoryIsNotSet 
eExclusiveModeIsAlreadySet 

Definition at line 619 of file grid_worker.hpp.

◆ EErrCode [3/3]

Enumerator
eInternalError 
eProtocolSyntaxError 
eAuthenticationError 
eKeyFormatError 
eJobNotFound 
eGroupNotFound 
eAffinityNotFound 
eInvalidJobStatus 
eUnknownQueue 
eUnknownQueueClass 
eUnknownService 
eTooManyPendingJobs 
eDataTooLong 
eInvalidClient 
eClientDataVersionMismatch 
eAccessDenied 
eSubmitsDisabled 
eShuttingDown 
eDuplicateName 
eObsoleteCommand 
eInvalidParameter 
eInvalidAuthToken 
eTooManyPreferredAffinities 
ePrefAffExpired 
eTryAgain 

Definition at line 66 of file netschedule_api_expt.hpp.

◆ EEvent

Enumerator
eJobStarted 
eJobStopped 
eJobFailed 
eJobSucceeded 
eJobReturned 
eJobRescheduled 
eJobCanceled 
eJobLost 

Definition at line 510 of file grid_worker.hpp.

◆ EJobAffinityPreference

Affinity matching modes.

Note
Explicitly specified affinities are always searched first.
Enumerator
ePreferredAffsOrAnyJob 
ePreferredAffinities 
eClaimNewPreferredAffs 
eAnyJob 
eExplicitAffinitiesOnly 

Definition at line 593 of file netschedule_api.hpp.

◆ EJobMask

Job masks.

Enumerator
eEmptyMask 
eExclusiveJob 

Exclusive job - the node executes only this job, even if there are processor resources.

eOutOfOrder 

This jobs comes to the node before every regular jobs.

eForEachNode 

This job will be scheduled to every active node.

eSystemJob 

This job should be interpreted by client library, not client itself Can contain control information, e.g.

instruction for node to die

eUserMask 

User's masks start from here.

Definition at line 196 of file netschedule_api.hpp.

◆ EJobStatus

Job status codes.

Enumerator
eJobNotFound 

No such job.

ePending 

Waiting for execution.

eRunning 

Running on a worker node.

eCanceled 

Explicitly canceled.

eFailed 

Failed to run (execution timeout)

eDone 

Job is ready (computed successfully)

eReading 

Job has its output been reading.

eConfirmed 

Final state - read confirmed.

eReadFailed 

Final state - read failed.

eDeleted 

The job has been wiped out of the database.

eLastStatus 

Fake status (do not use)

Definition at line 160 of file netschedule_api.hpp.

◆ ENetScheduleWarningType

Enumerator
eWarnUnknown 
eWarnAffinityNotFound 
eWarnAffinityNotPreferred 
eWarnAffinityAlreadyPreferred 
eWarnGroupNotFound 
eWarnJobNotFound 
eWarnJobAlreadyCanceled 
eWarnJobAlreadyDone 
eWarnJobAlreadyFailed 
eWarnJobPassportOnlyMatch 
eWarnNoParametersChanged 
eWarnConfigFileNotChanged 
eWarnAlertNotFound 
eWarnAlertAlreadyAcknowledged 
eWarnSubmitsDisabledForServer 
eWarnQueueAlreadyPaused 
eWarnQueueNotPaused 
eWarnCommandObsolete 
eWarnJobNotRead 

Definition at line 273 of file netschedule_api.hpp.

◆ EProgressMsg

Enumerator
eProgressMsgOn 
eProgressMsgOff 

Definition at line 125 of file grid_client.hpp.

◆ EReadNextJobResult

Possible outcomes of ReadNextJob() calls.

Enumerator
eRNJ_JobReady 

A job is returned.

eRNJ_NotReady 

No matching jobs are ready for reading.

eRNJ_Timeout 
eRNJ_NoMoreJobs 

No matching jobs.

eRNJ_Interrupt 

ReadNextJob() has been interrupted.

Definition at line 781 of file netschedule_api.hpp.

◆ EWorkerNodeCleanupEvent

Event notifying of a safe clean-up point.

It is generated for a job after the job is finished (or the worker node is shutting down). It is also generated for the whole worker node – when it is shutting down.

Enumerator
eRegularCleanup 

For jobs – run from the same thread after Do() is done; for the whole WN – run from a separate (clean-up) thread after all jobs are done and cleaned up, and the whole worker node is shutting down.

eOnHardExit 

Called on emergency shutdown, always from a different (clean-up) thread, even for the jobs.

Definition at line 77 of file grid_worker.hpp.

Function Documentation

◆ AddAffinityEntry()

void SInputValidator::AddAffinityEntry ( string  name)

Definition at line 168 of file cgi2rcgi.cpp.

References SInputValidator::CheckAffinity(), and SInputValidator::m_Entries.

Referenced by CCgi2RCgiApp::Init().

◆ AddListener()

virtual void IWorkerNodeCleanupEventSource::AddListener ( IWorkerNodeCleanupEventListener listener)
pure virtual

◆ AddPreferredAffinities()

void CNetScheduleExecutor::AddPreferredAffinities ( const vector< string > &  affs_to_add)
inline

Definition at line 749 of file netschedule_api.hpp.

References CNetScheduleExecutor::ChangePreferredAffinities(), and NULL.

◆ AddTagMap()

void CGridCgiContext::AddTagMap ( const string n,
const string v,
CHTMLPlainText::EEncodeMode  m = CHTMLPlainText::eHTMLEncode 
)
inline

◆ CallEventHandlers()

virtual void IWorkerNodeCleanupEventSource::CallEventHandlers ( )
pure virtual

◆ CancelJob() [1/2]

void CGridClient::CancelJob ( const string job_key)

Cancel Job.

Parameters
job_keyJob key

Definition at line 70 of file grid_client.cpp.

References CNetScheduleSubmitter::CancelJob(), and CGridClient::m_NetScheduleSubmitter.

Referenced by CGridCgiApplication::ProcessRequest().

◆ CancelJob() [2/2]

void CNetScheduleSubmitter::CancelJob ( const string job_key)

Cancel job.

Parameters
job_keyJob key

Definition at line 590 of file netschedule_api_submitter.cpp.

References cmd, and g_AppendClientIPSessionIDHitID().

Referenced by CGridClient::CancelJob(), and CGridCommandLineInterfaceApp::Cmd_CancelJob().

◆ CancelJobGroup()

void CNetScheduleSubmitter::CancelJobGroup ( const string job_group,
const string job_statuses = kEmptyStr 
)

Cancel job group.

Parameters
job_groupGroup ID.
job_statusesOptional comma-separated list of job statuses

Definition at line 597 of file netschedule_api_submitter.cpp.

References cmd, and g_AppendClientIPSessionIDHitID().

Referenced by CGridCommandLineInterfaceApp::Cmd_CancelJob().

◆ CGridCgiContext() [1/3]

CGridCgiContext::CGridCgiContext ( CHTMLPage page,
CCgiContext ctx 
)

◆ CGridCgiContext() [2/3]

CGridCgiContext::CGridCgiContext ( const CGridCgiContext )
private

A copy constructor and an assignment operator are prohibited.

◆ CGridCgiContext() [3/3]

CGridCgiContext::CGridCgiContext ( SInputValidator input_validator,
CHTMLPage page,
CHTMLPage custom_http_header,
CCgiContext ctx 
)

◆ CGridClient() [1/3]

CGridClient::CGridClient ( CNetScheduleSubmitter::TInstance  ns_submitter,
CNetCacheAPI::TInstance  nc_client,
ECleanUp  cleanup,
EProgressMsg  progress_msg 
)

Constructor.

Parameters
ns_clientNetSchedule client - an instance of CNetScheduleSubmitter.
nc_clientNetCache client - an instance of CNetCacheAPI.
cleanupif true the grid client will automatically remove a job's input data from a storage when the job is done or canceled

Definition at line 52 of file grid_client.cpp.

◆ CGridClient() [2/3]

CGridClient::CGridClient ( CNetScheduleSubmitter::TInstance  ns_submitter,
IBlobStorage storage,
ECleanUp  cleanup,
EProgressMsg  progress_msg 
)

Constructor.

Parameters
ns_clientNetSchedule client - an instance of CNetScheduleSubmitter.
storageNetSchedule storage
cleanupif true the grid client will automatically remove a job's input data from a storage when the job is done or canceled

Definition at line 44 of file grid_client.cpp.

◆ CGridClient() [3/3]

CGridClient::CGridClient ( const CGridClient )
private

The copy constructor and the assignment operator are prohibited.

◆ CGridJobBatchSubmitter() [1/2]

CGridJobBatchSubmitter::CGridJobBatchSubmitter ( CGridClient grid_client)
explicitprivate

Definition at line 207 of file grid_client.cpp.

◆ CGridJobBatchSubmitter() [2/2]

CGridJobBatchSubmitter::CGridJobBatchSubmitter ( const CGridJobBatchSubmitter )
private

The copy constructor and the assignment operator are prohibited.

◆ CGridWorkerNode() [1/4]

CGridWorkerNode::CGridWorkerNode ( )
inline

Definition at line 540 of file grid_worker.hpp.

◆ CGridWorkerNode() [2/4]

CGridWorkerNode::CGridWorkerNode ( CNcbiApplicationAPI app,
IWorkerNodeJobFactory job_factory 
)

Construct a worker node using class factories.

Definition at line 363 of file grid_worker.cpp.

◆ CGridWorkerNode() [3/4]

CGridWorkerNode::CGridWorkerNode ( EVoid  )
inline

Definition at line 540 of file grid_worker.hpp.

◆ CGridWorkerNode() [4/4]

CGridWorkerNode::CGridWorkerNode ( SGridWorkerNodeImpl impl)
inline

Definition at line 540 of file grid_worker.hpp.

◆ ChangePreferredAffinities()

void CNetScheduleExecutor::ChangePreferredAffinities ( const vector< string > *  affs_to_add,
const vector< string > *  affs_to_delete 
)

◆ Check()

bool SInputValidator::SEntry::Check ( const string value)

◆ CheckAffinity()

void SInputValidator::CheckAffinity ( const string value)
staticprivate

Definition at line 219 of file cgi2rcgi.cpp.

References NStr::MatchesMask(), NCBI_THROW, and rapidjson::value.

Referenced by SInputValidator::AddAffinityEntry().

◆ CheckCancel()

void SInputValidator::CheckCancel ( const string value)
staticprivate

Definition at line 211 of file cgi2rcgi.cpp.

References NStr::MatchesMask(), NCBI_THROW, and rapidjson::value.

Referenced by SInputValidator::SInputValidator().

◆ CheckCtgTime()

static void SInputValidator::CheckCtgTime ( const string value)
inlinestaticprivate

Definition at line 96 of file cgi2rcgi.cpp.

References NStr::StringToInt(), and rapidjson::value.

Referenced by SInputValidator::SInputValidator().

◆ CheckEntry()

void SInputValidator::CheckEntry ( const string name,
const string value,
bool  is_requested = true 
)

◆ CheckGetResults()

static void SInputValidator::CheckGetResults ( const string value)
inlinestaticprivate

Definition at line 97 of file cgi2rcgi.cpp.

References NStr::StringToBool(), and rapidjson::value.

Referenced by SInputValidator::SInputValidator().

◆ CheckIfBatchAlreadySubmitted()

void CGridJobBatchSubmitter::CheckIfBatchAlreadySubmitted ( )
private

◆ CheckIfBatchSubmittedAndPrepareNextJob()

void CGridJobBatchSubmitter::CheckIfBatchSubmittedAndPrepareNextJob ( )
private

◆ CheckIfJobDone()

bool CCgi2RCgiApp::CheckIfJobDone ( CGridCgiContext grid_ctx,
CNetScheduleAPI::EJobStatus  status 
)
private

◆ CheckJob()

void CCgi2RCgiApp::CheckJob ( CGridCgiContext grid_ctx)
private

◆ CheckJobKey()

void SInputValidator::CheckJobKey ( const string value)
staticprivate

◆ Clear()

void CGridCgiContext::Clear ( void  )
private

Remove all persisted entries from cookie and self url.

Definition at line 452 of file cgi2rcgi.cpp.

References map_checker< Container >::clear(), and CGridCgiContext::m_PersistentEntries.

Referenced by CCgi2RCgiApp::CheckJob(), CGridCgiApplication::ProcessRequest(), and CCgi2RCgiApp::SubmitJob().

◆ ClearNode()

void CNetScheduleExecutor::ClearNode ( )

Unregister client-listener.

After this call, the server will not try to send any notification messages or maintain job affinity for the client.

Definition at line 155 of file netschedule_api_executor.cpp.

Referenced by CGridCommandLineInterfaceApp::Cmd_ClearNode().

◆ CloseStream()

void CGridClient::CloseStream ( )

◆ CloseStreams()

void CWorkerNodeJobContext::CloseStreams ( )

◆ CNetScheduleAPI() [1/7]

CNetScheduleAPI::CNetScheduleAPI ( )
inline

Definition at line 87 of file netschedule_api.hpp.

◆ CNetScheduleAPI() [2/7]

CNetScheduleAPI::CNetScheduleAPI ( CConfig conf,
const string conf_section = kEmptyStr 
)
explicit

Constructs a CNetScheduleAPI object and initializes it with parameters read from the specified configuration object.

Parameters
confA CConfig object to get the configuration parameters from.
conf_sectionName of the configuration section where to look for the parameters. If empty string is passed, then the section name "netschedule_api" will be used.

Definition at line 753 of file netschedule_api.cpp.

◆ CNetScheduleAPI() [3/7]

CNetScheduleAPI::CNetScheduleAPI ( const IRegistry reg,
const string conf_section = kEmptyStr 
)
explicit

Constructs a CNetScheduleAPI object and initializes it with parameters read from the specified registry object.

Parameters
regRegistry to get the configuration parameters from.
conf_sectionName of the registry section to look for the configuration parameters in. If empty string is passed, then the section name "netschedule_api" will be used.

Definition at line 747 of file netschedule_api.cpp.

◆ CNetScheduleAPI() [4/7]

CNetScheduleAPI::CNetScheduleAPI ( const string service_name,
const string client_name,
const string queue_name 
)

Construct the client without linking it to any particular server.

Actual server (host and port) will be extracted from the job key

Parameters
service_nameName of the service to connect to (format: LB service name or host:port)
client_nameName of the client program (project)
queue_nameName of the job queue

Definition at line 758 of file netschedule_api.cpp.

◆ CNetScheduleAPI() [5/7]

CNetScheduleAPI::CNetScheduleAPI ( CNetScheduleAPI::EAppRegistry  use_app_reg,
const string conf_section = kEmptyStr 
)
explicit

Creates an instance of CNetScheduleAPI and initializes it with parameters read from the application registry.

Parameters
use_app_regSelects this constructor. The parameter is not used otherwise.
conf_sectionName of the registry section to look for the configuration parameters in. If empty string is passed, then the section name "netschedule_api" will be used.

Definition at line 741 of file netschedule_api.cpp.

◆ CNetScheduleAPI() [6/7]

CNetScheduleAPI::CNetScheduleAPI ( EVoid  )
inline

Definition at line 87 of file netschedule_api.hpp.

◆ CNetScheduleAPI() [7/7]

CNetScheduleAPI::CNetScheduleAPI ( SNetScheduleAPIImpl impl)
inline

Definition at line 87 of file netschedule_api.hpp.

◆ CNetScheduleExecutor() [1/3]

CNetScheduleExecutor::CNetScheduleExecutor ( )
inline

Definition at line 587 of file netschedule_api.hpp.

◆ CNetScheduleExecutor() [2/3]

CNetScheduleExecutor::CNetScheduleExecutor ( EVoid  )
inline

Definition at line 587 of file netschedule_api.hpp.

◆ CNetScheduleExecutor() [3/3]

CNetScheduleExecutor::CNetScheduleExecutor ( SNetScheduleExecutorImpl impl)
inline

Definition at line 587 of file netschedule_api.hpp.

◆ CNetScheduleJob()

CNetScheduleJob::CNetScheduleJob ( const string _input = kEmptyStr,
const string _affinity = kEmptyStr,
CNetScheduleAPI::TJobMask  _mask = CNetScheduleAPI::eEmptyMask 
)
inlineexplicit

Definition at line 344 of file netschedule_api.hpp.

◆ CNetScheduleJobReader() [1/3]

CNetScheduleJobReader::CNetScheduleJobReader ( )
inline

Definition at line 778 of file netschedule_api.hpp.

◆ CNetScheduleJobReader() [2/3]

CNetScheduleJobReader::CNetScheduleJobReader ( EVoid  )
inline

Definition at line 778 of file netschedule_api.hpp.

◆ CNetScheduleJobReader() [3/3]

CNetScheduleJobReader::CNetScheduleJobReader ( SNetScheduleJobReaderImpl impl)
inline

Definition at line 778 of file netschedule_api.hpp.

◆ CNetScheduleKey() [1/2]

CNetScheduleKey::CNetScheduleKey ( )
inline

Construct an empty object for use with ParseJobKey().

Definition at line 71 of file netschedule_key.hpp.

◆ CNetScheduleKey() [2/2]

CNetScheduleKey::CNetScheduleKey ( const string str_key,
CCompoundIDPool::TInstance  id_pool = NULL 
)
explicit

Parse NetSchedule key; throw an exception if the key cannot be recognized.

Definition at line 52 of file netschedule_key.cpp.

References NCBI_THROW_FMT, and NStr::PrintableString().

◆ CNetScheduleKeyGenerator()

CNetScheduleKeyGenerator::CNetScheduleKeyGenerator ( const string host,
unsigned  port,
const string queue_name 
)

◆ CNetScheduleNewJob()

CNetScheduleNewJob::CNetScheduleNewJob ( const string _input = kEmptyStr,
const string _affinity = kEmptyStr,
CNetScheduleAPI::TJobMask  _mask = CNetScheduleAPI::eEmptyMask 
)
inlineexplicit

Definition at line 305 of file netschedule_api.hpp.

◆ CNetScheduleSubmitter() [1/3]

CNetScheduleSubmitter::CNetScheduleSubmitter ( )
inline

Definition at line 393 of file netschedule_api.hpp.

◆ CNetScheduleSubmitter() [2/3]

CNetScheduleSubmitter::CNetScheduleSubmitter ( EVoid  )
inline

Definition at line 393 of file netschedule_api.hpp.

◆ CNetScheduleSubmitter() [3/3]

CNetScheduleSubmitter::CNetScheduleSubmitter ( SNetScheduleSubmitterImpl impl)
inline

Definition at line 393 of file netschedule_api.hpp.

◆ CollectParams()

virtual bool CGridCgiApplication::CollectParams ( CGridCgiContext ctx)
protectedpure virtual

Collect parameters from HTML form If this method returns false that means that input parameters were not specified (or were incorrect).

In this case method ShowParamsPage will be called.

Implemented in CGridCgiSampleApplication.

Referenced by CGridCgiApplication::ProcessRequest().

◆ CommitJob()

void CWorkerNodeJobContext::CommitJob ( )

Confirm that a job is done and result is ready to be sent back to the client.

This method should be called at the end of the IWorkerNodeJob::Do() method.

Definition at line 182 of file wn_main_loop.cpp.

References CWorkerNodeJobContext::eCS_Done, and CWorkerNodeJobContext::m_Impl.

Referenced by CCgiWorkerNodeJob::Do().

◆ CommitJobWithFailure()

void CWorkerNodeJobContext::CommitJobWithFailure ( const string err_msg,
bool  no_retries = false 
)

Confirm that a job is finished, but an error has happened during its execution.

This method should be called at the end of the IWorkerNodeJob::Do() method.

Definition at line 188 of file wn_main_loop.cpp.

References CWorkerNodeJobContext::eCS_Failure, and CWorkerNodeJobContext::m_Impl.

Referenced by SOfflineJobContextImpl::x_RunJob().

◆ CreateContextWithFlags()

CCgiContext * CCgi2RCgiApp::CreateContextWithFlags ( CNcbiArguments args,
CNcbiEnvironment env,
CNcbiIstream inp,
CNcbiOstream out,
int  ifd,
int  ofd,
int  flags 
)
virtual

◆ CreateInstance() [1/2]

template<typename TWorkerNodeJob >
virtual IWorkerNodeJob* CSimpleJobFactory< TWorkerNodeJob >::CreateInstance ( void  )
inlinevirtual

Create a job.

Implements IWorkerNodeJobFactory.

Definition at line 449 of file grid_worker.hpp.

References CSimpleJobFactory< TWorkerNodeJob >::m_WorkerNodeInitContext.

◆ CreateInstance() [2/2]

virtual IWorkerNodeJob* IWorkerNodeJobFactory::CreateInstance ( void  )
pure virtual

◆ CRegexpTemplateFilter()

CRegexpTemplateFilter::CRegexpTemplateFilter ( CHTMLPage page)
inline

Definition at line 760 of file cgi2rcgi.cpp.

◆ CRemoteCgiApp()

CRemoteCgiApp::CRemoteCgiApp ( )

◆ CWorkerNodeIdleTaskContext() [1/2]

CWorkerNodeIdleTaskContext::CWorkerNodeIdleTaskContext ( const CWorkerNodeIdleTaskContext )
private

◆ CWorkerNodeIdleTaskContext() [2/2]

CWorkerNodeIdleTaskContext::CWorkerNodeIdleTaskContext ( CWorkerNodeIdleThread thread)
private

Definition at line 261 of file grid_worker.cpp.

◆ CWorkerNodeJobContext() [1/3]

CWorkerNodeJobContext::CWorkerNodeJobContext ( )
inline

Definition at line 197 of file grid_worker.hpp.

◆ CWorkerNodeJobContext() [2/3]

CWorkerNodeJobContext::CWorkerNodeJobContext ( EVoid  )
inline

Definition at line 197 of file grid_worker.hpp.

◆ CWorkerNodeJobContext() [3/3]

CWorkerNodeJobContext::CWorkerNodeJobContext ( SWorkerNodeJobContextImpl impl)
inline

Definition at line 197 of file grid_worker.hpp.

◆ DefinePersistentEntry()

void CGridCgiContext::DefinePersistentEntry ( const string entry_name,
const string value 
)

◆ DefineRefreshTags()

void CCgi2RCgiApp::DefineRefreshTags ( CGridCgiContext grid_ctx,
const string url,
int  delay 
)
private

◆ DeletePreferredAffinities()

void CNetScheduleExecutor::DeletePreferredAffinities ( const vector< string > &  affs_to_del)
inline

Definition at line 752 of file netschedule_api.hpp.

References CNetScheduleExecutor::ChangePreferredAffinities(), and NULL.

◆ DisableDefaultRequestEventLogging()

void CGridWorkerNode::DisableDefaultRequestEventLogging ( CGridWorkerNode::EDisabledRequestEvents  disabled_events = eDisableStartStop)
static

Definition at line 1060 of file grid_worker.cpp.

References s_ReqEventsDisabled.

◆ Do()

virtual int IWorkerNodeJob::Do ( CWorkerNodeJobContext context)
pure virtual

Execute the job.

Job is considered successfully done if the Do method calls CommitJob (see CWorkerNodeJobContext). If method does not call CommitJob job is considered unresolved and returned back to the queue. Method can throw an exception (derived from std::exception), in this case job is considered failed (error message will be redirected to the NetSchedule queue)

Parameters
contextContext where a job can get all required information like input/output steams, the job key etc.
Returns
Job exit code

Implemented in CCgiWorkerNodeJob, CSampleJob, CRemoteCgiJob, and CRemoteAppJob.

Referenced by SWorkerNodeJobContextImpl::x_RunJob(), and SOfflineJobContextImpl::x_RunJob().

◆ ErrCodeToHTTPStatusCode()

unsigned CNetScheduleException::ErrCodeToHTTPStatusCode ( ) const

◆ ExtractWarningType()

CNetScheduleAPI::ENetScheduleWarningType CNetScheduleAPI::ExtractWarningType ( string warn_msg)
static

◆ ForceSingleThread()

void CGridWorkerNode::ForceSingleThread ( )

Definition at line 1066 of file grid_worker.cpp.

References CGridWorkerNode::m_Impl.

◆ Generate() [1/2]

void CNetScheduleKeyGenerator::Generate ( string key,
unsigned  id 
) const

◆ Generate() [2/2]

string CNetScheduleKeyGenerator::Generate ( unsigned  id) const
inline

◆ GenerateCompoundID()

string CNetScheduleKeyGenerator::GenerateCompoundID ( unsigned  id,
CCompoundIDPool  id_pool 
) const

◆ GetAdmin()

CNetScheduleAdmin CNetScheduleAPI::GetAdmin ( )

◆ GetAppName() [1/3]

virtual string IWorkerNodeJobFactory::GetAppName ( void  ) const
inlinevirtual

◆ GetAppName() [2/3]

template<typename TWorkerNodeJob >
virtual string CSimpleJobFactory< TWorkerNodeJob >::GetAppName ( void  ) const
inlinevirtual

Reimplemented from IWorkerNodeJobFactory.

Definition at line 455 of file grid_worker.hpp.

References CSimpleJobFactory< TWorkerNodeJob >::m_AppName.

◆ GetAppName() [3/3]

string CGridWorkerNode::GetAppName ( void  ) const

Definition at line 1111 of file grid_worker.cpp.

References CGridWorkerNode::m_Impl.

Referenced by CGetStatisticsProcessor::Process().

◆ GetAppVersion() [1/2]

virtual string IWorkerNodeJobFactory::GetAppVersion ( void  ) const
inlinevirtual

Reimplemented in CCgiWorkerNodeJobFactory, and CRemoteAppJobFactory< TJob, TListener, kName >.

Definition at line 434 of file grid_worker.hpp.

References kEmptyStr.

◆ GetAppVersion() [2/2]

CGridWorkerNode::TVersion CGridWorkerNode::GetAppVersion ( void  ) const

◆ GetArgs()

virtual const CArgs& IWorkerNodeInitBaseContext::GetArgs ( ) const
pure virtual

Get command line arguments.

Implemented in SGridWorkerNodeImpl.

◆ GetBatch()

const vector<CNetScheduleJob>& CGridJobBatchSubmitter::GetBatch ( ) const
inline

◆ GetBlobSize()

size_t CGridClient::GetBlobSize ( ) const
inline

Get the size of an input stream.

Definition at line 197 of file grid_client.hpp.

References CGridClient::m_BlobSize.

◆ GetCGIContext()

CCgiContext& CGridCgiContext::GetCGIContext ( )
inline

Get CGI Context.

Definition at line 98 of file grid_cgiapp.hpp.

References CGridCgiContext::m_CgiContext.

Referenced by CGridCgiApplication::x_CheckJobStatus().

◆ GetCheckStatusPeriod()

unsigned CGridWorkerNode::GetCheckStatusPeriod ( ) const

Definition at line 1106 of file grid_worker.cpp.

References CGridWorkerNode::m_Impl.

◆ GetCleanupEventSource() [1/3]

IWorkerNodeCleanupEventSource * CWorkerNodeJobContext::GetCleanupEventSource ( )

Definition at line 114 of file wn_main_loop.cpp.

References CWorkerNodeJobContext::m_Impl.

◆ GetCleanupEventSource() [2/3]

IWorkerNodeCleanupEventSource * CGridWorkerNode::GetCleanupEventSource ( )

Definition at line 1145 of file grid_worker.cpp.

References CGridWorkerNode::m_Impl.

◆ GetCleanupEventSource() [3/3]

virtual IWorkerNodeCleanupEventSource* IWorkerNodeInitContext::GetCleanupEventSource ( ) const
pure virtual

Get interface for registering clean-up event listeners.

Implemented in SGridWorkerNodeImpl.

◆ GetClientName() [1/3]

const string & CNetScheduleExecutor::GetClientName ( )

Definition at line 638 of file netschedule_api_executor.cpp.

◆ GetClientName() [2/3]

const string & CWorkerNodeJobContext::GetClientName ( ) const

Get a node name.

Definition at line 144 of file wn_main_loop.cpp.

References CWorkerNodeJobContext::m_Impl.

◆ GetClientName() [3/3]

const string & CGridWorkerNode::GetClientName ( ) const

Definition at line 1160 of file grid_worker.cpp.

References CGridWorkerNode::m_Impl.

◆ GetCode()

CException::TErrCode CNetScheduleExceptionMap::GetCode ( const string name)
static

Definition at line 72 of file netschedule_api_expt.cpp.

References CException::eInvalid.

Referenced by CNetScheduleServerListener::OnErrorImpl().

◆ GetCommitJobInterval()

unsigned CGridWorkerNode::GetCommitJobInterval ( ) const

Definition at line 1101 of file grid_worker.cpp.

References CGridWorkerNode::m_Impl.

◆ GetCommitStatus()

CWorkerNodeJobContext::ECommitStatus CWorkerNodeJobContext::GetCommitStatus ( ) const

Definition at line 104 of file wn_main_loop.cpp.

References CWorkerNodeJobContext::m_Impl.

Referenced by SOfflineJobContextImpl::x_RunJob().

◆ GetCommitStatusDescription()

const char * CWorkerNodeJobContext::GetCommitStatusDescription ( CWorkerNodeJobContext::ECommitStatus  commit_status)
static

◆ GetConfig()

virtual const IRegistry& IWorkerNodeInitBaseContext::GetConfig ( ) const
pure virtual

Get a config file registry.

Implemented in SGridWorkerNodeImpl.

◆ GetDeadline()

CDeadline SInputValidator::GetDeadline ( const string value)
static

◆ GetEntryValue()

const string & CGridCgiContext::GetEntryValue ( const string entry_name) const

Get a value from a CGI request.

if there is no an entry with a given name it returns an empty string.

Definition at line 121 of file grid_cgiapp.cpp.

References map_checker< Container >::end(), map_checker< Container >::find(), kEmptyStr, and CGridCgiContext::m_PersistedEntries.

Referenced by CGridCgiContext::GetJobKey(), CGridCgiApplication::ProcessRequest(), and CGridCgiApplication::x_CheckJobStatus().

◆ GetEnvironment()

virtual const CNcbiEnvironment& IWorkerNodeInitBaseContext::GetEnvironment ( ) const
pure virtual

Get environment variables.

Implemented in SGridWorkerNodeImpl.

◆ GetErrCodeDescription()

const char * CNetScheduleException::GetErrCodeDescription ( CException::TErrCode  err_code)
static

◆ GetErrCodeString() [1/4]

const char * CNetScheduleException::GetErrCodeString ( void  ) const
overridevirtual

◆ GetErrCodeString() [2/4]

const char * CNetScheduleException::GetErrCodeString ( CException::TErrCode  err_code)
static

◆ GetErrCodeString() [3/4]

virtual const char* CGridClientException::GetErrCodeString ( void  ) const
inlineoverridevirtual

Get error code interpreted as text.

Reimplemented from CException.

Definition at line 302 of file grid_client.hpp.

References CGridClientException::eBatchAlreadySubmitted, CException::GetErrCode(), and CException::GetErrCodeString().

◆ GetErrCodeString() [4/4]

virtual const char* CGridWorkerNodeException::GetErrCodeString ( void  ) const
inlineoverridevirtual

◆ GetErrorMessage()

const string & CGridClient::GetErrorMessage ( )

◆ GetExecutor()

CNetScheduleExecutor CNetScheduleAPI::GetExecutor ( )

◆ GetGridClient() [1/2]

CGridClient& CGridClientApp::GetGridClient ( void  )
inline

◆ GetGridClient() [2/2]

CGridClient& CGridCgiApplication::GetGridClient ( void  )
inlineprotected

Get a Grid Client.

Definition at line 258 of file grid_cgiapp.hpp.

References CGridCgiApplication::m_GridClient.

Referenced by CGridCgiApplication::ProcessRequest(), and CGridCgiApplication::x_CheckJobStatus().

◆ GetHiddenFields()

string CGridCgiContext::GetHiddenFields ( ) const

◆ GetHTMLPage()

CHTMLPage& CGridCgiContext::GetHTMLPage ( void  )
inline

Get an HTML page.

Definition at line 75 of file grid_cgiapp.hpp.

References CGridCgiContext::m_Page.

Referenced by CCgi2RCgiApp::CheckIfJobDone(), CCgi2RCgiApp::GetStatus(), and CCgi2RCgiApp::PopulatePage().

◆ GetIdleTask() [1/2]

virtual IWorkerNodeIdleTask* IWorkerNodeJobFactory::GetIdleTask ( )
inlinevirtual

Get the Idle task.

Reimplemented in CRemoteAppJobFactory< TJob, TListener, kName >, and CSimpleJobFactoryEx< TWorkerNodeJob, TWorkerNodeIdleTask >.

Definition at line 438 of file grid_worker.hpp.

References NULL.

◆ GetIdleTask() [2/2]

template<typename TWorkerNodeJob , typename TWorkerNodeIdleTask >
virtual IWorkerNodeIdleTask* CSimpleJobFactoryEx< TWorkerNodeJob, TWorkerNodeIdleTask >::GetIdleTask ( )
inlinevirtual

Get the Idle task.

Reimplemented from IWorkerNodeJobFactory.

Definition at line 480 of file grid_worker.hpp.

References CSimpleJobFactoryEx< TWorkerNodeJob, TWorkerNodeIdleTask >::m_IdleTask.

◆ GetInputBlobSize()

size_t CWorkerNodeJobContext::GetInputBlobSize ( ) const

Get the size of an input stream.

Definition at line 78 of file wn_main_loop.cpp.

References CWorkerNodeJobContext::m_Impl.

◆ GetIStream() [1/2]

CNcbiIstream & CGridClient::GetIStream ( )

Get a stream with a job's result.

Stream is based on network data storage (NetCache). Size of the input data can be determined using GetInputBlobSize

Definition at line 253 of file grid_client.cpp.

References CGridClient::GetNetCacheAPI(), CGridClient::m_BlobSize, CGridClient::m_GridRead, CGridClient::m_Job, CNetScheduleJob::output, and CGridClient::x_GetJobDetails().

Referenced by CGridCgiSampleApplication::OnJobDone(), CRemoteAppClientSampleApp::PrintJobInfo(), CGridClientSampleApp::Run(), and CRemoteAppClientSampleApp::Run().

◆ GetIStream() [2/2]

CNcbiIstream & CWorkerNodeJobContext::GetIStream ( )

Get a stream with input data for a job.

Stream is based on network data storage (NetCache). Size of the input data can be determined using GetInputBlobSize.

Definition at line 154 of file wn_main_loop.cpp.

References CWorkerNodeJobContext::m_Impl.

Referenced by CCgiWorkerNodeJob::Do().

◆ GetJob() [1/5]

CNetScheduleJob& CGridClient::GetJob ( )
inline

◆ GetJob() [2/5]

CNetScheduleJob & CWorkerNodeJobContext::GetJob ( )

Definition at line 53 of file wn_main_loop.cpp.

References CWorkerNodeJobContext::m_Impl.

◆ GetJob() [3/5]

const CNetScheduleJob & CWorkerNodeJobContext::GetJob ( ) const

Get the associated job structure to access all of its fields.

Definition at line 48 of file wn_main_loop.cpp.

References CWorkerNodeJobContext::m_Impl.

Referenced by SGridWorkerNodeImpl::OfflineRun().

◆ GetJob() [4/5]

bool CNetScheduleExecutor::GetJob ( CNetScheduleJob job,
const string affinity_list = kEmptyStr,
CDeadline dealine = NULL 
)

Get a pending job.

When function returns TRUE, job information is written to the 'job' structure, and job status is changed to eRunning. This client (the worker node) becomes responsible for execution or returning of the job. If there are no jobs in the queue, the function returns FALSE immediately and this call has to be repeated.

Parameters
jobNetSchedule job description structure.
affinity_listComma-separated list of affinity tokens.
deadlineDeadline for waiting for a matching job to appear in the queue.
Returns
TRUE if job has been returned from the queue and its input fields are set. FALSE means queue is empty or for some other reason NetSchedule decided not to give a job to this node (e.g. no jobs with matching affinities).

Definition at line 282 of file netschedule_api_executor.cpp.

References CNetScheduleNewJob::affinity, cmd, CNetServer::ExecWithRetry(), g_AppendClientIPSessionIDHitID(), CNetScheduleNotificationHandler::MkBaseGETCmd(), NULL, CNetServer::SExecResult::response, s_ParseGetJobResponse(), and CNetScheduleJob::server.

Referenced by CGridCommandLineInterfaceApp::Cmd_RequestJob(), CGridCommandLineInterfaceApp::NetScheduleSanityCheck(), and CSampleNetScheduleNode::Run().

◆ GetJob() [5/5]

bool CNetScheduleExecutor::GetJob ( CNetScheduleJob job,
unsigned  wait_time,
const string affinity_list = kEmptyStr 
)

The same as GetJob(CNetScheduleJob&, EJobAffinityPreference, const string&, CDeadline*), except it accepts integer wait time in seconds instead of CDeadline.

Definition at line 330 of file netschedule_api_executor.cpp.

◆ GetJobBatchSubmitter()

CGridJobBatchSubmitter & CGridClient::GetJobBatchSubmitter ( )

Get a job submitter.

Definition at line 64 of file grid_client.cpp.

References CGridClient::m_JobBatchSubmitter, and CGridJobBatchSubmitter::Reset().

◆ GetJobDetails() [1/2]

CNetScheduleAPI::EJobStatus CNetScheduleAPI::GetJobDetails ( CNetScheduleJob job,
time_t *  job_exptime = NULL,
ENetScheduleQueuePauseMode pause_mode = NULL 
)

◆ GetJobDetails() [2/2]

CNetScheduleAPI::EJobStatus CNetScheduleSubmitter::GetJobDetails ( CNetScheduleJob job,
time_t *  job_exptime = NULL,
ENetScheduleQueuePauseMode pause_mode = NULL 
)

Get full information about the specified job.

Parameters
jobA reference to the job description structure. The job key is taken from the job_key field. Upon return, the structure will be filled with the current information about the job, including its input and output.
job_exptimeNumber of seconds since EPOCH when the job will expire on the server.
Returns
The current job status.

Definition at line 619 of file netschedule_api_submitter.cpp.

Referenced by CGridCommandLineInterfaceApp::Cmd_ReadJob(), CGridClient::GetStatus(), CGridCommandLineInterfaceApp::NetScheduleSanityCheck(), CSampleNetScheduleClient::Run(), and CGridClient::x_GetJobDetails().

◆ GetJobFactory()

IWorkerNodeJobFactory & CGridWorkerNode::GetJobFactory ( )

Definition at line 1071 of file grid_worker.cpp.

References CGridWorkerNode::m_Impl.

◆ GetJobInput() [1/3]

const string & CGridClient::GetJobInput ( )

◆ GetJobInput() [2/3]

const string & CWorkerNodeJobContext::GetJobInput ( ) const

Get a job input string.

This string can be used in two ways. 1. It can be an input data for a job (if that data is short) If it is so don't use GetIStream method. 2. It holds a key to a data stored in an external data storage. (NetCache) In this case use GetIStream method to get a stream with an input data for the job

Definition at line 63 of file wn_main_loop.cpp.

References CWorkerNodeJobContext::m_Impl.

◆ GetJobInput() [3/3]

const string& CGridCgiContext::GetJobInput ( ) const
inline

Definition at line 106 of file grid_cgiapp.hpp.

References CGridCgiContext::m_JobInput.

◆ GetJobKey() [1/3]

string& CGridCgiContext::GetJobKey ( void  )
inline

Definition at line 293 of file cgi2rcgi.cpp.

References CGridCgiContext::m_JobKey.

◆ GetJobKey() [2/3]

const string & CWorkerNodeJobContext::GetJobKey ( void  ) const

◆ GetJobKey() [3/3]

const string & CGridCgiContext::GetJobKey ( void  ) const

◆ GetJobMask()

CNetScheduleAPI::TJobMask CWorkerNodeJobContext::GetJobMask ( ) const

Definition at line 88 of file wn_main_loop.cpp.

References CWorkerNodeJobContext::m_Impl.

◆ GetJobNumber()

unsigned int CWorkerNodeJobContext::GetJobNumber ( ) const

◆ GetJobOutput() [1/3]

const string & CGridClient::GetJobOutput ( )

Get a job's output string.

This string can be used in two ways. 1. It can be an output data from a remote job (if that data is short) If it is so don't use GetIStream method. 2. It holds a key to a data stored in an external data storage. (NetCache) In this case use GetIStream method to get a stream with a job's result.

Definition at line 348 of file grid_client.cpp.

References CGridClient::m_Job, CNetScheduleJob::output, and CGridClient::x_GetJobDetails().

Referenced by CRemoteAppClientSampleApp::PrintJobInfo(), and CGridCgiApplication::x_CheckJobStatus().

◆ GetJobOutput() [2/3]

const string & CWorkerNodeJobContext::GetJobOutput ( ) const

Definition at line 83 of file wn_main_loop.cpp.

References CWorkerNodeJobContext::m_Impl.

◆ GetJobOutput() [3/3]

const string& CGridCgiContext::GetJobOutput ( ) const
inline

Definition at line 107 of file grid_cgiapp.hpp.

References CGridCgiContext::m_JobOutput.

◆ GetJobProgressMessage()

const string& CGridCgiContext::GetJobProgressMessage ( void  ) const
inline

Get current job progress message.

Definition at line 86 of file grid_cgiapp.hpp.

References CGridCgiContext::m_ProgressMsg.

◆ GetJobReader()

CNetScheduleJobReader CNetScheduleAPI::GetJobReader ( const string group = kEmptyStr,
const string affinity = kEmptyStr 
)

Create an instance of CNetScheduleJobReader.

Parameters
groupRestrict job retrieval to the specified job group name.
affinityRestrict job retrieval to the specified affinity.

Definition at line 896 of file netschedule_api.cpp.

References CNetScheduleAPI::m_Impl.

Referenced by CGridCommandLineInterfaceApp::Cmd_ReadJob().

◆ GetJobStatus() [1/2]

CNetScheduleAPI::EJobStatus CNetScheduleExecutor::GetJobStatus ( const CNetScheduleJob job,
time_t *  job_exptime = NULL,
ENetScheduleQueuePauseMode pause_mode = NULL 
)

Get the current status of the specified job.

Unlike the similar method from CNetScheduleSubmitter, this method does not prolong the lifetime of the job on the server.

Parameters
job_keyNetSchedule job key.
job_exptimeNumber of seconds since EPOCH when the job will expire on the server.
pause_modeQueue pause mode set by the administrator.
Returns
The current job status. eJobNotFound is returned if the job cannot be found (job record has expired).

Definition at line 553 of file netschedule_api_executor.cpp.

Referenced by CGridCommandLineInterfaceApp::Cmd_JobInfo(), and SWorkerNodeJobContextImpl::GetShutdownLevel().

◆ GetJobStatus() [2/2]

CNetScheduleAPI::EJobStatus CNetScheduleSubmitter::GetJobStatus ( const string job_key,
time_t *  job_exptime = NULL,
ENetScheduleQueuePauseMode pause_mode = NULL 
)

Get the current status of the specified job.

Unlike the similar method from CNetScheduleExecutor, this method prolongs the lifetime of the job on the server.

Parameters
job_keyNetSchedule job key.
job_exptimeNumber of seconds since EPOCH when the job will expire on the server.
pause_modeQueue pause mode set by the administrator.
Returns
The current job status. eJobNotFound is returned if the job cannot be found (job record has expired).

Definition at line 610 of file netschedule_api_submitter.cpp.

References CNetScheduleNewJob::job_id.

Referenced by CGridCommandLineInterfaceApp::Cmd_JobInfo().

◆ GetJobVersion() [1/3]

template<typename TWorkerNodeJob >
virtual string CSimpleJobFactory< TWorkerNodeJob >::GetJobVersion ( ) const
inlinevirtual

Get the job version.

Implements IWorkerNodeJobFactory.

Definition at line 454 of file grid_worker.hpp.

References CSimpleJobFactory< TWorkerNodeJob >::m_JobVersion.

◆ GetJobVersion() [2/3]

string CRemoteCgiApp::GetJobVersion ( ) const
virtual

Definition at line 167 of file remote_cgiapp.cpp.

References GRID_APP_VERSION_INFO.

◆ GetJobVersion() [3/3]

virtual string IWorkerNodeJobFactory::GetJobVersion ( ) const
pure virtual

◆ GetJqueryCallback()

string& CGridCgiContext::GetJqueryCallback ( )
inline

Definition at line 294 of file cgi2rcgi.cpp.

References CGridCgiContext::m_JqueryCallback.

Referenced by CCgi2RCgiApp::ProcessRequest().

◆ GetListenJobs()

vector< string > SInputValidator::GetListenJobs ( const string value)
static

◆ GetMaxServerInputSize()

size_t CGridClient::GetMaxServerInputSize ( )

◆ GetMaxThreads()

unsigned CGridWorkerNode::GetMaxThreads ( ) const

Get the maximum threads running simultaneously.

Definition at line 1076 of file grid_worker.cpp.

References CGridWorkerNode::m_Impl.

Referenced by CGetStatisticsProcessor::Process(), and CGetLoadProcessor::Process().

◆ GetNetCacheAPI() [1/3]

CNetCacheAPI& CGridClient::GetNetCacheAPI ( )
inline

◆ GetNetCacheAPI() [2/3]

CNetCacheAPI CGridWorkerNode::GetNetCacheAPI ( ) const

Definition at line 1130 of file grid_worker.cpp.

References CGridWorkerNode::m_Impl.

Referenced by CGetStatisticsProcessor::Process().

◆ GetNetCacheAPI() [3/3]

virtual CNetCacheAPI IWorkerNodeInitContext::GetNetCacheAPI ( ) const
pure virtual

Get the shared NetCacheAPI object used by the worker node framework.

Implemented in SGridWorkerNodeImpl.

◆ GetNetScheduleAPI() [1/2]

CNetScheduleAPI CGridWorkerNode::GetNetScheduleAPI ( ) const

Definition at line 1135 of file grid_worker.cpp.

References CGridWorkerNode::m_Impl.

Referenced by CGetStatisticsProcessor::Process().

◆ GetNetScheduleAPI() [2/2]

virtual CNetScheduleAPI IWorkerNodeInitContext::GetNetScheduleAPI ( ) const
pure virtual

Get the shared NetScheduleAPI object used by the worker node framework.

Implemented in SGridWorkerNodeImpl.

Referenced by CRemoteAppJobFactory< TJob, TListener, kName >::GetJobVersion().

◆ GetNetScheduleSubmitter()

CNetScheduleSubmitter CGridClient::GetNetScheduleSubmitter ( )
inline

◆ GetNSExecutor()

CNetScheduleExecutor CGridWorkerNode::GetNSExecutor ( ) const

◆ GetOStream() [1/3]

CNcbiOstream & CGridJobBatchSubmitter::GetOStream ( )

◆ GetOStream() [2/3]

CNcbiOstream & CGridClient::GetOStream ( )

◆ GetOStream() [3/3]

CNcbiOstream & CWorkerNodeJobContext::GetOStream ( )

Get a stream where a job can write its result.

Definition at line 164 of file wn_main_loop.cpp.

References CWorkerNodeJobContext::m_Impl.

Referenced by CCgiWorkerNodeJob::Do().

◆ GetPageTemplate()

virtual string CGridCgiApplication::GetPageTemplate ( void  ) const
protectedpure virtual

Return a name of a file this HTML page template.

It is used when an instance of CHTMLPage class is created.

Implemented in CGridCgiSampleApplication.

Referenced by CGridCgiApplication::ProcessRequest().

◆ GetPageTitle()

virtual string CGridCgiApplication::GetPageTitle ( void  ) const
protectedpure virtual

Return page name.

It is used when an instance of CHTMLPage class is created.

Implemented in CGridCgiSampleApplication.

Referenced by CGridCgiApplication::ProcessRequest().

◆ GetPersistentEntries()

const TPersistentEntries& CGridCgiContext::GetPersistentEntries ( ) const
inline

Definition at line 282 of file cgi2rcgi.cpp.

References CGridCgiContext::m_PersistentEntries.

Referenced by CCgi2RCgiApp::PopulatePage().

◆ GetPersistentEntryValue()

const string & CGridCgiContext::GetPersistentEntryValue ( const string entry_name) const

◆ GetProgramVersion() [1/3]

const string & CNetScheduleAPI::GetProgramVersion ( void  ) const

Get program version string.

Definition at line 771 of file netschedule_api.cpp.

References CNetScheduleAPI::m_Impl.

Referenced by CRemoteAppJobFactory< TJob, TListener, kName >::GetJobVersion().

◆ GetProgramVersion() [2/3]

virtual string CGridClientApp::GetProgramVersion ( void  ) const
pure virtual

Get program version (like: MyProgram v.

1.2.3)

Program version is passed to NetSchedule queue so queue controls versions and does not allow obsolete clients to connect and submit or execute jobs

Implemented in CRemoteAppClientSampleApp, and CGridClientSampleApp.

Referenced by CGridClientApp::Init().

◆ GetProgramVersion() [3/3]

virtual string CGridCgiApplication::GetProgramVersion ( void  ) const
pure virtual

Get program version (like: MyProgram v.

1.2.3)

Program version is passed to NetSchedule queue so queue controls versions and does not allow obsolete clients to connect and submit or execute jobs

Implemented in CGridCgiSampleApplication.

Referenced by CGridCgiApplication::InitGridClient().

◆ GetProgressMessage()

string CGridClient::GetProgressMessage ( )

◆ GetProgressMsg() [1/3]

void CNetScheduleAPI::GetProgressMsg ( CNetScheduleJob job)

Update the progress_message field of the job structure.

Prior to calling this method, the caller must set the id field of the job structure.

Definition at line 1124 of file netschedule_api.cpp.

References cmd, g_AppendClientIPSessionIDHitID(), CNetScheduleNewJob::job_id, NStr::ParseEscapes(), and CNetScheduleJob::progress_msg.

Referenced by CGridCommandLineInterfaceApp::Cmd_JobInfo().

◆ GetProgressMsg() [2/3]

void CNetScheduleSubmitter::GetProgressMsg ( CNetScheduleJob job)

Get progress message.

Parameters
jobNetSchedule job description structure. The message is taken from the progress_msg field.
See also
PutProgressMsg

Definition at line 626 of file netschedule_api_submitter.cpp.

Referenced by CGridClient::GetProgressMessage(), and CGridClient::x_CheckAllJobBlobs().

◆ GetProgressMsg() [3/3]

void CNetScheduleExecutor::GetProgressMsg ( CNetScheduleJob job)

Get progress message.

Parameters
jobNetSchedule job description structure. The message is taken from progress_msg filed
See also
PutProgressMsg

Definition at line 488 of file netschedule_api_executor.cpp.

Referenced by SWorkerNodeJobContextImpl::PutProgressMessage().

◆ GetQueryStringEntryValue()

void CGridCgiContext::GetQueryStringEntryValue ( const string entry_name,
string value 
) const

◆ GetQueueName() [1/4]

const string & CNetScheduleExecutor::GetQueueName ( )

Return Queue name.

Definition at line 633 of file netschedule_api_executor.cpp.

◆ GetQueueName() [2/4]

const string & CWorkerNodeJobContext::GetQueueName ( ) const

Get a name of a queue where this node is connected to.

Definition at line 140 of file wn_main_loop.cpp.

References CWorkerNodeJobContext::m_Impl.

Referenced by CRemoteAppLauncher::ExecRemoteApp().

◆ GetQueueName() [3/4]

const string & CGridWorkerNode::GetQueueName ( ) const

Definition at line 1155 of file grid_worker.cpp.

References CGridWorkerNode::m_Impl.

◆ GetQueueName() [4/4]

const string & CNetScheduleAPI::GetQueueName ( ) const

◆ GetQueueParams() [1/2]

void CNetScheduleAPI::GetQueueParams ( const string queue_name,
TQueueParams queue_params 
)

Definition at line 1100 of file netschedule_api.cpp.

◆ GetQueueParams() [2/2]

void CNetScheduleAPI::GetQueueParams ( TQueueParams queue_params)

Definition at line 1119 of file netschedule_api.cpp.

◆ GetQueueTimeout()

unsigned CGridWorkerNode::GetQueueTimeout ( ) const

Definition at line 1096 of file grid_worker.cpp.

References CGridWorkerNode::m_Impl.

◆ GetRequestEntryValue()

void CGridCgiContext::GetRequestEntryValue ( const string entry_name,
string value 
) const

◆ GetReturnCode()

int CGridClient::GetReturnCode ( )

Get a job's return code.

Definition at line 359 of file grid_client.cpp.

References CGridClient::m_Job, CNetScheduleJob::ret_code, and CGridClient::x_GetJobDetails().

◆ GetSelfURL() [1/2]

string CGridCgiContext::GetSelfURL ( bool  include_entries = true) const

◆ GetSelfURL() [2/2]

string CGridCgiContext::GetSelfURL ( void  ) const

◆ GetServerOutputSize()

size_t CGridWorkerNode::GetServerOutputSize ( )

Definition at line 760 of file wn_main_loop.cpp.

References CMainLoopThread::m_Impl.

◆ GetServerParams() [1/2]

const CNetScheduleAPI::SServerParams & CNetScheduleAPI::GetServerParams ( )

◆ GetServerParams() [2/2]

const CNetScheduleAPI::SServerParams & CNetScheduleExecutor::GetServerParams ( )

Retrieve queue parameters from the server.

Definition at line 150 of file netschedule_api_executor.cpp.

◆ GetService()

CNetService CNetScheduleAPI::GetService ( )

◆ GetServiceName() [1/2]

const string & CNetScheduleExecutor::GetServiceName ( )

Definition at line 643 of file netschedule_api_executor.cpp.

◆ GetServiceName() [2/2]

const string & CGridWorkerNode::GetServiceName ( ) const

Definition at line 1165 of file grid_worker.cpp.

References CGridWorkerNode::m_Impl.

◆ GetShutdownLevel()

CNetScheduleAdmin::EShutdownLevel CWorkerNodeJobContext::GetShutdownLevel ( void  )

Check if job processing must be aborted.

This method must be called periodically from within the Do() method to check whether it needs to stop processing the current job. If GetShutdownLevel() returns eShutdownImmediate or eDie, the Do() method must immediately return its job to the server by calling context.ReturnJob() and return a non-zero integer to the caller.

If GetShutdownLevel() returns eNormalShutdown, the Do() method is free to decide whether the job processing must be aborted or completed.

Aside from the natural reason for GetShutdownLevel() to return eNormalShutdown, eShutdownImmediate, or eDie, (that is, when a worker node shutdown has been requested), this method can also return eShutdownImmediate when the NetSchedule server is not expecting the current job to complete. This can happen due to multiple reasons: 1. The job has been explicitly cancelled by the submitter or administrator. 2. The job was rescheduled to another worker node and has been successfully finished. 3. The job has expired.

Definition at line 282 of file wn_main_loop.cpp.

References CWorkerNodeJobContext::m_Impl.

Referenced by CJobContextProcessWatcher::OnStart(), CJobContextProcessWatcher::Watch(), and SWorkerNodeJobContextImpl::x_RunJob().

◆ GetStartupTime()

time_t CGridWorkerNode::GetStartupTime ( ) const

Definition at line 1091 of file grid_worker.cpp.

References CGridWorkerNode::m_Impl.

◆ GetStatus() [1/2]

CNetScheduleAPI::EJobStatus CGridClient::GetStatus ( void  )

◆ GetStatus() [2/2]

CNetScheduleAPI::EJobStatus CCgi2RCgiApp::GetStatus ( CGridCgiContext grid_ctx)
private

◆ GetStatusAndCtgTime()

CNetScheduleAPI::EJobStatus CCgi2RCgiApp::GetStatusAndCtgTime ( CGridCgiContext grid_ctx)
private

◆ GetSubmitter()

CNetScheduleSubmitter CNetScheduleAPI::GetSubmitter ( )

◆ GetTotalMemoryLimit()

Uint8 CGridWorkerNode::GetTotalMemoryLimit ( ) const

Get total memory limit (automatic restart if node grows more than that)

Definition at line 1081 of file grid_worker.cpp.

References CGridWorkerNode::m_Impl.

Referenced by CWNJobWatcher::Notify().

◆ GetTotalTimeLimit()

unsigned CGridWorkerNode::GetTotalTimeLimit ( ) const

Get total time limit (automatic restart after that)

Definition at line 1086 of file grid_worker.cpp.

References CGridWorkerNode::m_Impl.

◆ GetWorkerNode()

CGridWorkerNode CWorkerNodeJobContext::GetWorkerNode ( ) const

Definition at line 119 of file wn_main_loop.cpp.

References CWorkerNodeJobContext::m_Impl.

Referenced by CWNJobWatcher::Notify().

◆ HandleEvent()

virtual void IWorkerNodeCleanupEventListener::HandleEvent ( EWorkerNodeCleanupEvent  cleanup_event)
pure virtual

Implemented in CSampleJobCleanupListener.

◆ HasCtgTime()

bool CGridCgiContext::HasCtgTime ( ) const
inline

◆ Init() [1/8]

void CGridWorkerNode::Init ( void  )

Definition at line 411 of file grid_worker.cpp.

References CGridWorkerNode::m_Impl.

Referenced by CGridWorkerApp::Init().

◆ Init() [2/8]

void CCgi2RCgiApp::Init ( void  )
virtual

This method is called on the CGI application initialization – before starting to process a HTTP request or even receiving one.

No HTTP request (or context) is available at the time of call.

If you decide to override it, remember to call CCgiApplication::Init().

Reimplemented from CCgiApplicationCached.

Definition at line 549 of file cgi2rcgi.cpp.

References SInputValidator::AddAffinityEntry(), CGridClient::eAutomaticCleanup, CHTMLPlainText::eHTMLEncode, CHTMLPlainText::eJSONEncode, CGridClient::eManualCleanup, CHTMLPlainText::eNoEncode, CGridClient::eProgressMsgOff, CGridClient::eProgressMsgOn, IRegistry::eReturn, CArgDescriptions::eString, eUseQueryString, eUseRequestContent, CCgiRequest::fCaseInsensitiveArgs, CCgiRequest::fDoNotParseContent, flags, NStr::fSplit_MergeDelimiters, NStr::fSplit_Truncate, CNcbiApplicationAPI::GetArguments(), CNcbiApplicationAPI::GetRWConfig(), CNetScheduleAPI::GetSubmitter(), incs, CCgiApplicationCached::Init(), kEmptyStr, CCgi2RCgiApp::m_AddJobIdToHeader, CCgi2RCgiApp::m_AffinityName, CCgi2RCgiApp::m_AffinitySetLimit, CCgi2RCgiApp::m_AffinitySource, CCgi2RCgiApp::m_CancelGoBackDelay, CCgi2RCgiApp::m_ContentType, CCgi2RCgiApp::m_DateFormat, CCgi2RCgiApp::m_DisplayDonePage, CCgi2RCgiApp::m_ElapsedTimeFormat, CCgi2RCgiApp::m_ExceptionMessage, CCgi2RCgiApp::m_FallBackDelay, CCgi2RCgiApp::m_FallBackUrl, CCgi2RCgiApp::m_FirstDelay, CCgi2RCgiApp::m_GridClient, CCgi2RCgiApp::m_HtmlIncs, CCgi2RCgiApp::m_HTMLPassThrough, CCgi2RCgiApp::m_HtmlTemplate, CCgi2RCgiApp::m_InputValidator, CCgi2RCgiApp::m_InterceptJQueryCallback, CCgi2RCgiApp::m_NetCacheAPI, CCgi2RCgiApp::m_NetScheduleAPI, CCgi2RCgiApp::m_PortAdded, CCgi2RCgiApp::m_RefreshDelay, CCgi2RCgiApp::m_RefreshWait, CCgi2RCgiApp::m_TargetEncodeMode, CCgi2RCgiApp::m_Title, NCBI_THROW_FMT, CCgiApplication::RegisterDiagFactory(), CCgiApplication::SetRequestFlags(), CCgiApplication::SetupArgDescriptions(), and NStr::Split().

◆ Init() [3/8]

virtual void IWorkerNodeJobFactory::Init ( const IWorkerNodeInitContext )
inlinevirtual

◆ Init() [4/8]

template<typename TWorkerNodeJob >
virtual void CSimpleJobFactory< TWorkerNodeJob >::Init ( const IWorkerNodeInitContext )
inlinevirtual

Initialize a worker node factory.

Reimplemented from IWorkerNodeJobFactory.

Reimplemented in CSimpleJobFactoryEx< TWorkerNodeJob, TWorkerNodeIdleTask >.

Definition at line 445 of file grid_worker.hpp.

References context, and CSimpleJobFactory< TWorkerNodeJob >::m_WorkerNodeInitContext.

◆ Init() [5/8]

template<typename TWorkerNodeJob , typename TWorkerNodeIdleTask >
virtual void CSimpleJobFactoryEx< TWorkerNodeJob, TWorkerNodeIdleTask >::Init ( const IWorkerNodeInitContext )
inlinevirtual

◆ Init() [6/8]

void CGridClientApp::Init ( void  )
virtual

◆ Init() [7/8]

void CGridCgiApplication::Init ( void  )
virtual

This method is called on the CGI application initialization – before starting to process a HTTP request or even receiving one.

If you decide to override it, remember to call CGridCgiApplication::Init().

Reimplemented from CCgiApplicationCached.

Reimplemented in CGridCgiSampleApplication.

Definition at line 180 of file grid_cgiapp.cpp.

References CCgiApplicationCached::Init(), and CGridCgiApplication::InitGridClient().

Referenced by CGridCgiSampleApplication::Init().

◆ Init() [8/8]

void CRemoteCgiApp::Init ( void  )
virtual

This method is called on the CGI application initialization – before starting to process a HTTP request or even receiving one.

No HTTP request (or context) is available at the time of call.

If you decide to override it, remember to call CCgiApplication::Init().

Reimplemented from CCgiApplication.

Reimplemented in CCgiSampleApplication, CCgiSampleApplication, CCgiSampleApplication, and CCgiSampleApplication.

Definition at line 129 of file remote_cgiapp.cpp.

References CNcbiApplicationAPI::GetArguments(), CNcbiApplicationAPI::GetRWConfig(), CCgiApplication::Init(), CRemoteCgiApp::m_AppImpl, IRWRegistry::Set(), and CRemoteCgiApp::SetupArgDescriptions().

◆ InitGridClient()

void CGridCgiApplication::InitGridClient ( )
protected

◆ InterruptReading()

void CNetScheduleJobReader::InterruptReading ( )

Abort waiting for a completed job in the above method.

Can be called from a signal handler or a parallel thread.

Definition at line 263 of file netschedule_api_reader.cpp.

References _ASSERT, and SNetScheduleJobReaderImpl::m_Impl.

◆ IsCachingNeeded()

bool CGridCgiApplication::IsCachingNeeded ( const CCgiRequest request) const
protectedvirtual

Reimplemented from CCgiApplication.

Definition at line 187 of file grid_cgiapp.cpp.

References eCgi_QueryString, entries, CCgiRequest::GetProperty(), and CCgiRequest::ParseEntries().

◆ IsHostInAdminHostsList()

bool CGridWorkerNode::IsHostInAdminHostsList ( const string host) const

◆ IsJobCommitted()

bool CWorkerNodeJobContext::IsJobCommitted ( ) const

◆ IsJobLost()

bool CWorkerNodeJobContext::IsJobLost ( ) const

◆ IsLogRequested()

bool CWorkerNodeJobContext::IsLogRequested ( ) const

Check if logging was requested in config file.

Definition at line 277 of file wn_main_loop.cpp.

References CWorkerNodeJobContext::m_Impl.

Referenced by CMonitoredProcessWatcher::MonitorRun(), and SOfflineJobContextImpl::x_RunJob().

◆ IsShutdownRequested()

bool CWorkerNodeIdleTaskContext::IsShutdownRequested ( ) const

◆ IsSuspended()

bool CGridWorkerNode::IsSuspended ( ) const

Definition at line 1150 of file grid_worker.cpp.

References CGridWorkerNode::m_Impl.

Referenced by CGetStatisticsProcessor::Process().

◆ JobDelayExpiration() [1/2]

void CNetScheduleExecutor::JobDelayExpiration ( const CNetScheduleJob job,
unsigned  runtime_inc 
)

Increment job execution timeout.

When node picks up the job for execution it may periodically communicate to the server that job is still alive and prolong job execution timeout, so job server does not try to reschedule.

Parameters
runtime_incEstimated time in seconds(from the current moment) to finish the job.

Definition at line 118 of file netschedule_api_executor.cpp.

References cmd, eOn, g_AppendClientIPSessionIDHitID(), CNetScheduleNewJob::job_id, and NStr::NumericToString().

Referenced by CGridCommandLineInterfaceApp::Cmd_UpdateJob(), and SWorkerNodeJobContextImpl::JobDelayExpiration().

◆ JobDelayExpiration() [2/2]

void CWorkerNodeJobContext::JobDelayExpiration ( unsigned  runtime_inc)

Increment job execution timeout.

When node picks up the job for execution it may periodically communicate to the server that job is still alive and prolong job execution timeout, so job server does not try to reschedule.

Parameters
runtime_incEstimated time in seconds(from the current moment) to finish the job.

Definition at line 260 of file wn_main_loop.cpp.

References CWorkerNodeJobContext::m_Impl.

Referenced by CJobContextProcessWatcher::Watch().

◆ JobStopRequested()

virtual bool CGridCgiApplication::JobStopRequested ( void  ) const
inlineprotectedvirtual

When job is still running this method is called to check if cancel has been requested via the user interface(HTML).

If so the job will be canceled.

Reimplemented in CGridCgiSampleApplication.

Definition at line 254 of file grid_cgiapp.hpp.

Referenced by CGridCgiApplication::x_JobStopRequested().

◆ ListenJobs()

void CCgi2RCgiApp::ListenJobs ( const string job_ids_value,
const string timeout_value 
)
private

◆ LoadQueryStringTags()

void CGridCgiContext::LoadQueryStringTags ( CHTMLPlainText::EEncodeMode  encode_mode)

◆ main()

int main ( int  argc,
const char *  argv[] 
)

◆ NCBI_EXCEPTION_DEFAULT() [1/3]

CGridClientException::NCBI_EXCEPTION_DEFAULT ( CGridClientException  ,
CException   
)

◆ NCBI_EXCEPTION_DEFAULT() [2/3]

CGridWorkerNodeException::NCBI_EXCEPTION_DEFAULT ( CGridWorkerNodeException  ,
CException   
)

◆ NCBI_EXCEPTION_DEFAULT() [3/3]

CNetScheduleException::NCBI_EXCEPTION_DEFAULT ( CNetScheduleException  ,
CNetServiceException   
)

◆ NeedMetaRefresh()

bool CGridCgiContext::NeedMetaRefresh ( ) const
inline

Definition at line 291 of file cgi2rcgi.cpp.

References CGridCgiContext::m_NeedMetaRefresh.

Referenced by CCgi2RCgiApp::DefineRefreshTags().

◆ NeedRenderPage() [1/2]

bool CGridCgiContext::NeedRenderPage ( ) const
inline

◆ NeedRenderPage() [2/2]

void CGridCgiContext::NeedRenderPage ( bool  value)
inline

Definition at line 290 of file cgi2rcgi.cpp.

References CGridCgiContext::m_NeedRenderPage, and rapidjson::value.

◆ NeedRunAgain()

bool CWorkerNodeIdleTaskContext::NeedRunAgain ( ) const
inline

Definition at line 381 of file grid_worker.hpp.

References CWorkerNodeIdleTaskContext::m_RunAgain.

◆ Notify()

virtual void IWorkerNodeJobWatcher::Notify ( const CWorkerNodeJobContext job,
EEvent  event 
)
pure virtual

Implemented in CWNJobWatcher, and CIdleWatcher.

◆ OnBeginProcessRequest()

virtual void CGridCgiApplication::OnBeginProcessRequest ( CGridCgiContext )
inlineprotectedvirtual

This method is call at the very beginning of the request processing.

Definition at line 233 of file grid_cgiapp.hpp.

Referenced by CGridCgiApplication::ProcessRequest().

◆ OnEndProcessRequest()

virtual void CGridCgiApplication::OnEndProcessRequest ( CGridCgiContext )
inlineprotectedvirtual

This method is call at the very end of the request processing.

Reimplemented in CGridCgiSampleApplication.

Definition at line 229 of file grid_cgiapp.hpp.

Referenced by CGridCgiApplication::ProcessRequest().

◆ OnJobCanceled()

virtual void CGridCgiApplication::OnJobCanceled ( CGridCgiContext )
inlineprotectedvirtual

This method is called if job was canceled during its execution.

Override this message to show a job cancellation message.

Reimplemented in CGridCgiSampleApplication.

Definition at line 215 of file grid_cgiapp.hpp.

Referenced by CGridCgiApplication::x_CheckJobStatus().

◆ OnJobDone() [1/2]

void CCgi2RCgiApp::OnJobDone ( CGridCgiContext ctx)
private

◆ OnJobDone() [2/2]

virtual void CGridCgiApplication::OnJobDone ( CGridClient grid_client,
CGridCgiContext ctx 
)
protectedpure virtual

This method is call when a worker node finishes its job and result is ready to be retrieved.

Override this method to get a result from a worker node and render a result HTML page

Implemented in CGridCgiSampleApplication.

Referenced by CGridCgiApplication::x_CheckJobStatus().

◆ OnJobFailed() [1/2]

virtual void CGridCgiApplication::OnJobFailed ( const string ,
CGridCgiContext  
)
inlineprotectedvirtual

This method is called when worker node reported a failure.

Override this method to get a error message and render a error HTML page.

Reimplemented in CGridCgiSampleApplication.

Definition at line 210 of file grid_cgiapp.hpp.

Referenced by CGridCgiApplication::OnQueueIsBusy(), CGridCgiApplication::ProcessRequest(), and CGridCgiApplication::x_CheckJobStatus().

◆ OnJobFailed() [2/2]

void CCgi2RCgiApp::OnJobFailed ( const string msg,
CGridCgiContext ctx 
)
private

◆ OnJobPending()

virtual void CGridCgiApplication::OnJobPending ( CGridCgiContext )
inlineprotectedvirtual

This method is call when a job is in NetSchedule queue and is waiting for a worker node.

Reimplemented in CGridCgiSampleApplication.

Definition at line 225 of file grid_cgiapp.hpp.

Referenced by CGridCgiApplication::x_CheckJobStatus().

◆ OnJobRunning()

virtual void CGridCgiApplication::OnJobRunning ( CGridCgiContext )
inlineprotectedvirtual

This method is call when a job is taken by a worker node to be processed.

Reimplemented in CGridCgiSampleApplication.

Definition at line 220 of file grid_cgiapp.hpp.

Referenced by CGridCgiApplication::x_CheckJobStatus().

◆ OnJobSubmitted()

virtual void CGridCgiApplication::OnJobSubmitted ( CGridCgiContext )
inlineprotectedvirtual

This method is called just after a job has been submitted.

Override this method to render information HTML page.

Reimplemented in CGridCgiSampleApplication.

Definition at line 197 of file grid_cgiapp.hpp.

Referenced by CGridCgiApplication::ProcessRequest().

◆ OnQueueIsBusy()

void CGridCgiApplication::OnQueueIsBusy ( CGridCgiContext ctx)
protectedvirtual

This method is call when a job couldn't be submitted because of NetSchedule queue is full.

Definition at line 233 of file grid_cgiapp.cpp.

References ctx, and CGridCgiApplication::OnJobFailed().

Referenced by CGridCgiApplication::ProcessRequest().

◆ operator const SGridWorkerNodeImpl *()

CGridWorkerNode::operator const SGridWorkerNodeImpl * ( ) const
inline

Definition at line 540 of file grid_worker.hpp.

◆ operator const SNetScheduleAPIImpl *()

CNetScheduleAPI::operator const SNetScheduleAPIImpl * ( ) const
inline

Definition at line 87 of file netschedule_api.hpp.

◆ operator const SNetScheduleExecutorImpl *()

CNetScheduleExecutor::operator const SNetScheduleExecutorImpl * ( ) const
inline

Definition at line 587 of file netschedule_api.hpp.

◆ operator const SNetScheduleJobReaderImpl *()

CNetScheduleJobReader::operator const SNetScheduleJobReaderImpl * ( ) const
inline

Definition at line 778 of file netschedule_api.hpp.

◆ operator const SNetScheduleSubmitterImpl *()

CNetScheduleSubmitter::operator const SNetScheduleSubmitterImpl * ( ) const
inline

Definition at line 393 of file netschedule_api.hpp.

◆ operator const SWorkerNodeJobContextImpl *()

CWorkerNodeJobContext::operator const SWorkerNodeJobContextImpl * ( ) const
inline

Definition at line 197 of file grid_worker.hpp.

◆ operator SGridWorkerNodeImpl *()

CGridWorkerNode::operator SGridWorkerNodeImpl * ( )
inline

Definition at line 540 of file grid_worker.hpp.

◆ operator SNetScheduleAPIImpl *()

CNetScheduleAPI::operator SNetScheduleAPIImpl * ( )
inline

Definition at line 87 of file netschedule_api.hpp.

◆ operator SNetScheduleExecutorImpl *()

CNetScheduleExecutor::operator SNetScheduleExecutorImpl * ( )
inline

Definition at line 587 of file netschedule_api.hpp.

◆ operator SNetScheduleJobReaderImpl *()

CNetScheduleJobReader::operator SNetScheduleJobReaderImpl * ( )
inline

Definition at line 778 of file netschedule_api.hpp.

◆ operator SNetScheduleSubmitterImpl *()

CNetScheduleSubmitter::operator SNetScheduleSubmitterImpl * ( )
inline

Definition at line 393 of file netschedule_api.hpp.

◆ operator SWorkerNodeJobContextImpl *()

CWorkerNodeJobContext::operator SWorkerNodeJobContextImpl * ( )
inline

Definition at line 197 of file grid_worker.hpp.

◆ operator()()

string SExceptionMessage::operator() ( const string what)
inline

Definition at line 231 of file cgi2rcgi.cpp.

References _ASSERT, IRegistry::GetString(), and SExceptionMessage::m_Registry.

◆ operator--() [1/12]

SWorkerNodeJobContextImpl& CWorkerNodeJobContext::operator-- ( int  )
inline

Definition at line 197 of file grid_worker.hpp.

◆ operator--() [2/12]

SGridWorkerNodeImpl& CGridWorkerNode::operator-- ( int  )
inline

Definition at line 540 of file grid_worker.hpp.

◆ operator--() [3/12]

SNetScheduleAPIImpl& CNetScheduleAPI::operator-- ( int  )
inline

Definition at line 87 of file netschedule_api.hpp.

◆ operator--() [4/12]

SNetScheduleSubmitterImpl& CNetScheduleSubmitter::operator-- ( int  )
inline

Definition at line 393 of file netschedule_api.hpp.

◆ operator--() [5/12]

SNetScheduleExecutorImpl& CNetScheduleExecutor::operator-- ( int  )
inline

Definition at line 587 of file netschedule_api.hpp.

◆ operator--() [6/12]

SNetScheduleJobReaderImpl& CNetScheduleJobReader::operator-- ( int  )
inline

Definition at line 778 of file netschedule_api.hpp.

◆ operator--() [7/12]

const SWorkerNodeJobContextImpl& CWorkerNodeJobContext::operator-- ( int  ) const
inline

Definition at line 197 of file grid_worker.hpp.

◆ operator--() [8/12]

const SGridWorkerNodeImpl& CGridWorkerNode::operator-- ( int  ) const
inline

Definition at line 540 of file grid_worker.hpp.

◆ operator--() [9/12]

const SNetScheduleAPIImpl& CNetScheduleAPI::operator-- ( int  ) const
inline

Definition at line 87 of file netschedule_api.hpp.

◆ operator--() [10/12]

const SNetScheduleSubmitterImpl& CNetScheduleSubmitter::operator-- ( int  ) const
inline

Definition at line 393 of file netschedule_api.hpp.

◆ operator--() [11/12]

const SNetScheduleExecutorImpl& CNetScheduleExecutor::operator-- ( int  ) const
inline

Definition at line 587 of file netschedule_api.hpp.

◆ operator--() [12/12]

const SNetScheduleJobReaderImpl& CNetScheduleJobReader::operator-- ( int  ) const
inline

Definition at line 778 of file netschedule_api.hpp.

◆ operator->() [1/12]

SWorkerNodeJobContextImpl* CWorkerNodeJobContext::operator-> ( void  )
inline

Definition at line 197 of file grid_worker.hpp.

◆ operator->() [2/12]

SGridWorkerNodeImpl* CGridWorkerNode::operator-> ( void  )
inline

Definition at line 540 of file grid_worker.hpp.

◆ operator->() [3/12]

SNetScheduleAPIImpl* CNetScheduleAPI::operator-> ( void  )
inline

Definition at line 87 of file netschedule_api.hpp.

◆ operator->() [4/12]

SNetScheduleSubmitterImpl* CNetScheduleSubmitter::operator-> ( void  )
inline

Definition at line 393 of file netschedule_api.hpp.

◆ operator->() [5/12]

SNetScheduleExecutorImpl* CNetScheduleExecutor::operator-> ( void  )
inline

Definition at line 587 of file netschedule_api.hpp.

◆ operator->() [6/12]

SNetScheduleJobReaderImpl* CNetScheduleJobReader::operator-> ( void  )
inline

Definition at line 778 of file netschedule_api.hpp.

◆ operator->() [7/12]

const SWorkerNodeJobContextImpl* CWorkerNodeJobContext::operator-> ( void  ) const
inline

Definition at line 197 of file grid_worker.hpp.

◆ operator->() [8/12]

const SGridWorkerNodeImpl* CGridWorkerNode::operator-> ( void  ) const
inline

Definition at line 540 of file grid_worker.hpp.

◆ operator->() [9/12]

const SNetScheduleAPIImpl* CNetScheduleAPI::operator-> ( void  ) const
inline

Definition at line 87 of file netschedule_api.hpp.

◆ operator->() [10/12]

const SNetScheduleSubmitterImpl* CNetScheduleSubmitter::operator-> ( void  ) const
inline

Definition at line 393 of file netschedule_api.hpp.

◆ operator->() [11/12]

const SNetScheduleExecutorImpl* CNetScheduleExecutor::operator-> ( void  ) const
inline

Definition at line 587 of file netschedule_api.hpp.

◆ operator->() [12/12]

const SNetScheduleJobReaderImpl* CNetScheduleJobReader::operator-> ( void  ) const
inline

Definition at line 778 of file netschedule_api.hpp.

◆ operator<<()

CNcbiOstream& operator<< ( CNcbiOstream out,
SJobs  jobs 
)

◆ operator=() [1/10]

CGridJobBatchSubmitter& CGridJobBatchSubmitter::operator= ( CGridJobBatchSubmitter )
private

◆ operator=() [2/10]

CGridCgiContext& CGridCgiContext::operator= ( const CGridCgiContext )
private

◆ operator=() [3/10]

CGridClient& CGridClient::operator= ( const CGridClient )
private

◆ operator=() [4/10]

CWorkerNodeIdleTaskContext& CWorkerNodeIdleTaskContext::operator= ( const CWorkerNodeIdleTaskContext )
private

◆ operator=() [5/10]

CGridWorkerNode& CGridWorkerNode::operator= ( SGridWorkerNodeImpl impl)
inline

Definition at line 540 of file grid_worker.hpp.

◆ operator=() [6/10]

CNetScheduleAPI& CNetScheduleAPI::operator= ( SNetScheduleAPIImpl impl)
inline

Definition at line 87 of file netschedule_api.hpp.

Referenced by CNetScheduleAPIExt::operator=().

◆ operator=() [7/10]

CNetScheduleExecutor& CNetScheduleExecutor::operator= ( SNetScheduleExecutorImpl impl)
inline

Definition at line 587 of file netschedule_api.hpp.

◆ operator=() [8/10]

CNetScheduleJobReader& CNetScheduleJobReader::operator= ( SNetScheduleJobReaderImpl impl)
inline

Definition at line 778 of file netschedule_api.hpp.

◆ operator=() [9/10]

CNetScheduleSubmitter& CNetScheduleSubmitter::operator= ( SNetScheduleSubmitterImpl impl)
inline

Definition at line 393 of file netschedule_api.hpp.

◆ operator=() [10/10]

CWorkerNodeJobContext& CWorkerNodeJobContext::operator= ( SWorkerNodeJobContextImpl impl)
inline

Definition at line 197 of file grid_worker.hpp.

◆ ParseJobKey()

bool CNetScheduleKey::ParseJobKey ( const string key_str,
CCompoundIDPool::TInstance  id_pool = NULL 
)

◆ PopulatePage()

void CCgi2RCgiApp::PopulatePage ( CGridCgiContext grid_ctx)
private

◆ PrepareJobData()

virtual void CGridCgiApplication::PrepareJobData ( CGridClient grid_client)
protectedpure virtual

This method is called when a job is ready to be send to a the queue.

Override this method to prepare input data for the worker node.

Implemented in CGridCgiSampleApplication.

Referenced by CGridCgiApplication::ProcessRequest().

◆ PrepareNextJob()

void CGridJobBatchSubmitter::PrepareNextJob ( )

◆ ProcessRequest() [1/2]

int CGridCgiApplication::ProcessRequest ( CCgiContext ctx)
virtual

◆ ProcessRequest() [2/2]

int CCgi2RCgiApp::ProcessRequest ( CCgiContext context)
virtual

◆ PullUpPersistentEntry() [1/2]

void CGridCgiContext::PullUpPersistentEntry ( const string entry_name)

Save this entry as a cookie add it to serf url.

Definition at line 405 of file cgi2rcgi.cpp.

References kEmptyStr, and rapidjson::value.

Referenced by CGridCgiApplication::ProcessRequest(), CCgi2RCgiApp::ProcessRequest(), and CCgi2RCgiApp::SubmitJob().

◆ PullUpPersistentEntry() [2/2]

void CGridCgiContext::PullUpPersistentEntry ( const string entry_name,
string value,
int  pulling = eDefaultPulling 
)

◆ PutFailure()

void CNetScheduleExecutor::PutFailure ( const CNetScheduleJob job,
bool  no_retries = false 
)

Submit job failure diagnostics.

This method indicates that job failed because of some fatal, unrecoverable error.

Parameters
jobNetSchedule job description structure. its error_msg and optionally ret_code and output fields should be set
no_retriesInstruct NetSchedule to fail the job permanently. The job will not be rerun regardless of whether retries are enabled for the queue or not.

Definition at line 493 of file netschedule_api_executor.cpp.

References CNetScheduleJob::auth_token, cmd, CNetScheduleJob::error_msg, g_AppendClientIPSessionIDHitID(), CNetScheduleNewJob::job_id, kNetScheduleMaxDBErrSize, NCBI_THROW, NStr::NumericToString(), CNetScheduleJob::output, NStr::PrintableString(), CNetScheduleJob::ret_code, and s_CheckOutputSize().

Referenced by CGridCommandLineInterfaceApp::Cmd_CommitJob(), CGridCommandLineInterfaceApp::NetScheduleSanityCheck(), CJobCommitterThread::x_CommitJob(), and CWNJobWatcher::x_KillNode().

◆ PutProgressMessage() [1/2]

void CRemoteCgiApp::PutProgressMessage ( const string msg,
bool  send_immediately = false 
)
protected

◆ PutProgressMessage() [2/2]

void CWorkerNodeJobContext::PutProgressMessage ( const string msg,
bool  send_immediately = false,
bool  overwrite = true 
)

Put progress message.

Definition at line 212 of file wn_main_loop.cpp.

References CWorkerNodeJobContext::m_Impl.

Referenced by CMonitoredProcessWatcher::MonitorRun(), and CRemoteAppTimeoutReporter::Report().

◆ PutProgressMsg()

void CNetScheduleExecutor::PutProgressMsg ( const CNetScheduleJob job)

Put job interim (progress) message.

Note
The progress message must be first saved to a NetCache blob, then (using this method) the key of that blob must be set as the job progress message. The blob can be overwritten then in NetCache directly without notifying the NetSchedule server.
Parameters
jobNetSchedule job description structure. its progerss_msg field should be set to a NetCache key that contains the actual progress message.
See also
GetProgressMsg

Definition at line 474 of file netschedule_api_executor.cpp.

References cmd, g_AppendClientIPSessionIDHitID(), CNetScheduleNewJob::job_id, kNetScheduleMaxDBDataSize, NCBI_THROW, NStr::PrintableString(), and CNetScheduleJob::progress_msg.

Referenced by CGridCommandLineInterfaceApp::Cmd_UpdateJob(), and SWorkerNodeJobContextImpl::PutProgressMessage().

◆ PutResult()

void CNetScheduleExecutor::PutResult ( const CNetScheduleJob job)

◆ Read()

bool CNetScheduleSubmitter::Read ( string job_id,
string auth_token,
CNetScheduleAPI::EJobStatus job_status,
unsigned  timeout = 0,
const string job_group = kEmptyStr 
)

Incremental retrieval of jobs that are done or failed.

Parameters
job_idPlaceholder for storing the identifier of the job that's done or failed.
auth_tokenPlaceholder for storing a reading reservation token, which guarantees that no other caller will be given the same job for reading.
job_statusPlaceholder for storing the status of the job, either eDone or eFailed.
timeoutNumber of seconds to wait before the status of jobs is automatically reverted to the original one ('Done' or 'Failed'). If zero, the default timeout of the NetSchedule queue will be used instead.
job_groupOnly consider jobs belonging to the specified group.
Returns
True if a job that's done or failed has been returned via the job_id references. False if no servers reported jobs marked as either done or failed.

Definition at line 298 of file netschedule_api_submitter.cpp.

References cmd, CNetService::eRandomize, g_AppendClientIPSessionIDHitID(), NULL, and NStr::UIntToString().

◆ ReadConfirm()

void CNetScheduleSubmitter::ReadConfirm ( const string job_id,
const string auth_token 
)

Mark the specified job as successfully retrieved.

The job will change its status to 'Confirmed' after this operation.

Parameters
job_idJob key returned by Read().
auth_tokenReservation token returned by Read().

Definition at line 342 of file netschedule_api_submitter.cpp.

References kEmptyStr.

Referenced by CGridCommandLineInterfaceApp::Cmd_ReadJob().

◆ ReadFail()

void CNetScheduleSubmitter::ReadFail ( const string job_id,
const string auth_token,
const string error_message = kEmptyStr 
)

Refuse from processing the results of the specified job and increase its counter of failed job result retrievals.

If this counter exceeds the failed_read_retries parameter specified in the configuration file, the job will permanently change its status to 'ReadFailed'.

Parameters
job_idJob key returned by Read().
auth_tokenReservation token returned by Read().
error_messageThis message can be used to describe the cause why the job results could not be read.

Definition at line 356 of file netschedule_api_submitter.cpp.

Referenced by CGridCommandLineInterfaceApp::Cmd_ReadJob().

◆ ReadJob()

void CCgi2RCgiApp::ReadJob ( istream &  is,
CGridCgiContext ctx 
)
private

◆ ReadNextJob()

CNetScheduleJobReader::EReadNextJobResult CNetScheduleJobReader::ReadNextJob ( CNetScheduleJob job,
CNetScheduleAPI::EJobStatus job_status,
const CTimeout timeout = NULL 
)

Wait and return the next completed job.

Parameters
jobStructure to fill with information about the job. The following fields of the structure will be filled:
  • job_id
  • auth_token
  • affinity
  • client_ip
  • session_id
  • page_hit_id
job_statusPointer to a variable where to store the final status of the job.
timeoutTimeout to wait for job completion. If NULL, the method returns immediately.

Definition at line 254 of file netschedule_api_reader.cpp.

References _ASSERT, and SNetScheduleJobReaderImpl::m_Impl.

Referenced by CGridCommandLineInterfaceApp::Cmd_ReadJob().

◆ ReadRollback()

void CNetScheduleSubmitter::ReadRollback ( const string job_id,
const string auth_token 
)

Refuse from processing the results of the specified job.

The job will change its status back to the original one ('Done' or 'Failed') after this operation.

Parameters
job_idJob key returned by Read().
auth_tokenReservation token returned by Read().

Definition at line 349 of file netschedule_api_submitter.cpp.

References kEmptyStr.

Referenced by CGridCommandLineInterfaceApp::Cmd_ReadJob().

◆ RemoveDataBlob()

void CGridClient::RemoveDataBlob ( const string data_key)
private

◆ RemoveListener()

virtual void IWorkerNodeCleanupEventSource::RemoveListener ( IWorkerNodeCleanupEventListener listener)
pure virtual

◆ RenderPage()

int CCgi2RCgiApp::RenderPage ( )
private

◆ RenderRefresh()

void CGridCgiApplication::RenderRefresh ( CHTMLPage page,
const string url,
int  delay 
)
protected

◆ RequestExclusiveMode()

void CWorkerNodeJobContext::RequestExclusiveMode ( )

Instruct the system that this job requires all system's resources If this method is call, the node will not accept any other jobs until this one is done.

In the event if the mode has already been requested by another job this job will be returned back to the queue.

Definition at line 359 of file wn_main_loop.cpp.

References CWorkerNodeJobContext::m_Impl, and NCBI_THROW.

◆ RequestShutdown() [1/3]

void CWorkerNodeIdleTaskContext::RequestShutdown ( void  )

◆ RequestShutdown() [2/3]

void CGridWorkerNode::RequestShutdown ( void  )

◆ RequestShutdown() [3/3]

void CRemoteCgiApp::RequestShutdown ( void  )

Definition at line 161 of file remote_cgiapp.cpp.

References CRemoteCgiApp::m_AppImpl.

◆ Reschedule()

void CNetScheduleExecutor::Reschedule ( const CNetScheduleJob job)

Reschedule a job with new affinity and/or group information.

This method requires that the following fields of the specified CNetScheduleJob structure are filled: 'job_id', 'auth_token', 'affinity' and/or 'group'.

Definition at line 527 of file netschedule_api_executor.cpp.

References CNetScheduleNewJob::affinity, CNetScheduleJob::auth_token, cmd, g_AppendClientIPSessionIDHitID(), CNetScheduleNewJob::group, CNetScheduleNewJob::job_id, and NStr::PrintableString().

Referenced by CJobCommitterThread::x_CommitJob().

◆ RescheduleJob()

void CWorkerNodeJobContext::RescheduleJob ( const string affinity,
const string group = kEmptyStr 
)

Put the job back in the queue with the specified affinity and group.

This method should be called before exiting IWorkerNodeJob::Do().

Definition at line 203 of file wn_main_loop.cpp.

References CWorkerNodeJobContext::eCS_Reschedule, and CWorkerNodeJobContext::m_Impl.

◆ Reset() [1/4]

void CGridJobBatchSubmitter::Reset ( void  )

◆ Reset() [2/4]

void CWorkerNodeIdleTaskContext::Reset ( void  )

Definition at line 270 of file grid_worker.cpp.

References CWorkerNodeIdleTaskContext::m_RunAgain.

Referenced by CWorkerNodeIdleThread::Main().

◆ Reset() [3/4]

void CNetScheduleNewJob::Reset ( void  )
inline

◆ Reset() [4/4]

void CNetScheduleJob::Reset ( void  )
inline

◆ Resume()

void CGridWorkerNode::Resume ( )

Definition at line 429 of file grid_worker.cpp.

References CGridWorkerNode::m_Impl.

Referenced by CResumeProcessor::Process().

◆ ReturnJob() [1/2]

void CWorkerNodeJobContext::ReturnJob ( )

Schedule the job for return.

This method should be called before exiting IWorkerNodeJob::Do() if the job is not needed anymore (canceled, expired or already executed elsewhere), or if the worker node is shutting down and the execution of this job should be gracefully (yet urgently) aborted and the job returned back to the network queue for execution by other worker node instances. Use the GetShutdownLevel() method to detect whether the job is not needed anymore.

See also
GetShutdownLevel()

Definition at line 197 of file wn_main_loop.cpp.

References CWorkerNodeJobContext::eCS_Return, and CWorkerNodeJobContext::m_Impl.

Referenced by CMonitoredProcessWatcher::MonitorRun(), and CJobContextProcessWatcher::Watch().

◆ ReturnJob() [2/2]

void CNetScheduleExecutor::ReturnJob ( const CNetScheduleJob job)

Switch the job back to the "Pending" status so that it can be run again on a different worker node.

The node may decide to return the job if it cannot be processed at the moment (not enough resources, the node is shutting down, etc.)

Definition at line 577 of file netschedule_api_executor.cpp.

Referenced by CGridCommandLineInterfaceApp::Cmd_ReturnJob(), CGridCommandLineInterfaceApp::NetScheduleSanityCheck(), CJobCommitterThread::x_CommitJob(), CMainLoopThread::x_GetNextJob(), and CWNJobWatcher::x_KillNode().

◆ Run() [1/3]

virtual void IWorkerNodeIdleTask::Run ( CWorkerNodeIdleTaskContext )
pure virtual

Do the Idle task here.

It should not take a lot time, because while it is running no real jobs will be processed.

Implemented in CSampleIdleTask, and CRemoteAppIdleTask.

Referenced by CWorkerNodeIdleThread::Main().

◆ Run() [2/3]

int CGridWorkerNode::Run ( ESwitch  daemonize = eDefault,
string  procinfo_file_name = string() 
)

Start job execution loop.

Definition at line 537 of file grid_worker.cpp.

References CGridWorkerNode::m_Impl, and NCBI_OS_UNIX.

Referenced by CGridWorkerApp::Run().

◆ Run() [3/3]

int CRemoteCgiApp::Run ( void  )
virtual

Do not override this method yourself! – it includes all the CGI specific machinery.

If you override it, do call CCgiApplication::Run() from inside your overriding method.

See also
ProcessRequest

Reimplemented from CCgiApplication.

Definition at line 155 of file remote_cgiapp.cpp.

References CRemoteCgiApp::m_AppImpl.

◆ RunJob()

int CRemoteCgiApp::RunJob ( CNcbiIstream is,
CNcbiOstream os,
CWorkerNodeJobContext job_context 
)
private

◆ s_GetCtgTime()

void s_GetCtgTime ( CGridCgiContext grid_ctx,
string  event 
)

◆ s_IsPendingOrRunning()

bool s_IsPendingOrRunning ( CNetScheduleAPI::EJobStatus  job_status)
inline

◆ s_RemoveCallbackParameter()

static void s_RemoveCallbackParameter ( string query_string)
static

Definition at line 788 of file cgi2rcgi.cpp.

References CALLBACK_PARAM, NStr::Find(), NPOS, and NULL.

Referenced by CCgi2RCgiApp::ProcessRequest().

◆ SelectView()

void CGridCgiContext::SelectView ( const string view_name)

◆ SEntry()

template<class TF >
SInputValidator::SEntry::SEntry ( string  n,
TF  f 
)
inline

Definition at line 109 of file cgi2rcgi.cpp.

◆ SetAffinityPreference()

void CNetScheduleExecutor::SetAffinityPreference ( CNetScheduleExecutor::EJobAffinityPreference  aff_pref)

Set preferred method of requesting jobs with affinities.

Definition at line 160 of file netschedule_api_executor.cpp.

Referenced by CGridCommandLineInterfaceApp::Cmd_RequestJob().

◆ SetClientNode()

void CNetScheduleAPI::SetClientNode ( const string client_node)

Definition at line 1132 of file netschedule_api.cpp.

References NCBI_THROW_FMT.

Referenced by SGridWorkerNodeImpl::Run().

◆ SetClientSession()

void CNetScheduleAPI::SetClientSession ( const string client_session)

Definition at line 1147 of file netschedule_api.cpp.

References NCBI_THROW_FMT.

◆ SetClientType()

void CNetScheduleAPI::SetClientType ( CNetScheduleAPI::EClientType  client_type)

◆ SetCommunicationTimeout()

void CNetScheduleAPI::SetCommunicationTimeout ( const STimeout to)
inline

◆ SetCompleteResponse()

void CGridCgiContext::SetCompleteResponse ( CNcbiIstream is)

◆ SetJobAffinity() [1/2]

void CGridJobBatchSubmitter::SetJobAffinity ( const string affinity)

◆ SetJobAffinity() [2/2]

void CGridClient::SetJobAffinity ( const string affinity)
inline

Definition at line 223 of file grid_client.hpp.

References CNetScheduleNewJob::affinity, and CGridClient::m_Job.

◆ SetJobGroup() [1/2]

void CGridClient::SetJobGroup ( const string group)
inline

Definition at line 221 of file grid_client.hpp.

References CNetScheduleNewJob::group, and CGridClient::m_Job.

◆ SetJobGroup() [2/2]

void CNetScheduleExecutor::SetJobGroup ( const string job_group)

Retrieve jobs from the specified group only.

Definition at line 166 of file netschedule_api_executor.cpp.

Referenced by CGridCommandLineInterfaceApp::SetUp_NetScheduleCmd().

◆ SetJobInput() [1/3]

void CGridJobBatchSubmitter::SetJobInput ( const string input)

Set a job's input This string will be sent to then the job is submitted.

This method can be used to send a short data to the worker node. To send a large data use GetOStream method. Don't call this method after GetOStream method is called.

Definition at line 151 of file grid_client.cpp.

References CGridJobBatchSubmitter::CheckIfBatchSubmittedAndPrepareNextJob(), input(), CGridJobBatchSubmitter::m_JobIndex, and CGridJobBatchSubmitter::m_Jobs.

◆ SetJobInput() [2/3]

void CGridClient::SetJobInput ( const string input)

Set a job's input This string will be sent to then the job is submitted.

This method can be used to send a short data to the worker node. To send a large data use GetOStream method. Don't call this method after GetOStream method is called.

Definition at line 88 of file grid_client.cpp.

References CNetScheduleNewJob::input, input(), and CGridClient::m_Job.

◆ SetJobInput() [3/3]

void CGridCgiContext::SetJobInput ( const string input)
inlineprivate

Definition at line 121 of file grid_cgiapp.hpp.

References input(), and CGridCgiContext::m_JobInput.

Referenced by CGridCgiApplication::x_CheckJobStatus().

◆ SetJobKey() [1/2]

void CGridClient::SetJobKey ( const string job_key)

◆ SetJobKey() [2/2]

void CGridCgiContext::SetJobKey ( const string job_key)
private

◆ SetJobMask() [1/2]

void CGridJobBatchSubmitter::SetJobMask ( CNetScheduleAPI::TJobMask  mask)

◆ SetJobMask() [2/2]

void CGridClient::SetJobMask ( CNetScheduleAPI::TJobMask  mask)
inline

Definition at line 219 of file grid_client.hpp.

References CGridClient::m_Job, CNetScheduleNewJob::mask, and mask.

◆ SetJobOutput() [1/2]

void CWorkerNodeJobContext::SetJobOutput ( const string output)

Set a job's output.

This string will be sent to the queue when job is done.

This method can be used to send a short data back to the client. To send a large result use GetOStream method. Don't call this method after GetOStream method is called.

Definition at line 68 of file wn_main_loop.cpp.

References CWorkerNodeJobContext::m_Impl, and output.

◆ SetJobOutput() [2/2]

void CGridCgiContext::SetJobOutput ( const string output)
inlineprivate

Definition at line 122 of file grid_cgiapp.hpp.

References CGridCgiContext::m_JobOutput, and output.

Referenced by CGridCgiApplication::x_CheckJobStatus().

◆ SetJobProgressMessage()

void CGridCgiContext::SetJobProgressMessage ( const string msg)
inlineprivate

◆ SetJobRetCode()

void CWorkerNodeJobContext::SetJobRetCode ( int  ret_code)

Set the return code of the job.

Definition at line 73 of file wn_main_loop.cpp.

References CWorkerNodeJobContext::m_Impl.

Referenced by SOfflineJobContextImpl::x_RunJob().

◆ SetListener()

void CGridWorkerNode::SetListener ( IGridWorkerNodeApp_Listener listener)

Definition at line 946 of file grid_worker.cpp.

References CGridWorkerNode::m_Impl.

Referenced by CGridWorkerApp::SetListener().

◆ SetProgramVersion()

void CNetScheduleAPI::SetProgramVersion ( const string pv)

Set program version (like: MyProgram v.

1.2.3)

Program version is passed to NetSchedule queue so queue controls versions and does not allow obsolete clients to connect and submit or execute jobs

Definition at line 764 of file netschedule_api.cpp.

References CNetScheduleAPI::m_Impl.

Referenced by CGI2GRID_ComposeHtmlPage(), CGridClientApp::Init(), CGridCgiApplication::InitGridClient(), and SGridWorkerNodeImpl::Run().

◆ SetRunAgain()

void CWorkerNodeIdleTaskContext::SetRunAgain ( )
inline

Definition at line 380 of file grid_worker.hpp.

References CWorkerNodeIdleTaskContext::m_RunAgain.

◆ SetupArgDescriptions()

void CRemoteCgiApp::SetupArgDescriptions ( CArgDescriptions arg_desc)
protectedvirtual

Setup the command line argument descriptions.

Call from the Init() method. The passed "arg_desc" will be owned by this class, and it will be deleted by ~CNcbiApplicationAPI(), or if SetupArgDescriptions() is called again.

Reimplemented from CCgiApplication.

Definition at line 145 of file remote_cgiapp.cpp.

References CArgDescriptions::AddOptionalKey(), CArgDescriptions::eInteger, and CCgiApplication::SetupArgDescriptions().

Referenced by CRemoteCgiApp::Init().

◆ SExceptionMessage()

SExceptionMessage::SExceptionMessage ( CNcbiRegistry registry = nullptr)
inline

Definition at line 229 of file cgi2rcgi.cpp.

◆ ShowParamsPage()

virtual void CGridCgiApplication::ShowParamsPage ( CGridCgiContext ctx) const
protectedpure virtual

Show a page with input data.

Implemented in CGridCgiSampleApplication.

Referenced by CGridCgiApplication::ProcessRequest().

◆ SInputValidator()

SInputValidator::SInputValidator ( )

◆ SJob()

SJob::SJob ( const string id)
inline

Definition at line 925 of file cgi2rcgi.cpp.

References CNetScheduleNewJob::job_id.

◆ StatusToString()

string CNetScheduleAPI::StatusToString ( EJobStatus  status)
static

Printable status type.

Definition at line 781 of file netschedule_api.cpp.

References _ASSERT, CNetScheduleAPI::eCanceled, CNetScheduleAPI::eConfirmed, CNetScheduleAPI::eDeleted, CNetScheduleAPI::eDone, CNetScheduleAPI::eFailed, CNetScheduleAPI::eJobNotFound, CNetScheduleAPI::ePending, CNetScheduleAPI::eReadFailed, CNetScheduleAPI::eReading, CNetScheduleAPI::eRunning, and kEmptyStr.

Referenced by CGridRPCBaseClient< CAsnBinCompressed >::Ask(), CGridRPCBaseClient< CAsnBinCompressed >::AskStream(), CNSNotificationList::BuildJobChangedNotification(), CCgi2RCgiApp::CheckIfJobDone(), CGridCommandLineInterfaceApp::Cmd_GetJobOutput(), CGridCommandLineInterfaceApp::Cmd_ReadJob(), CGridCommandLineInterfaceApp::Cmd_Replay(), CGridCommandLineInterfaceApp::Cmd_SubmitJob(), CGridCommandLineInterfaceApp::Cmd_WatchJob(), CStatisticsCounters::CStatisticsCounters(), CNetScheduleAdmin::DumpQueue(), g_DoPerfLogging(), g_ProcessJobInfo(), SWorkerNodeJobContextImpl::GetShutdownLevel(), CGridCommandLineInterfaceApp::JobInfo_PrintStatus(), operator<<(), CNSClient::Print(), CQueue::PrintJobsStat(), CGridCommandLineInterfaceApp::PrintJobStatusNotification(), s_FormResourceName(), CNetScheduleJobSerializer::SaveJobOutput(), CJob::x_AppendEvents(), CJob::x_AppendStatus(), CQueue::x_ChangeReadingStatus(), CGridCgiApplication::x_CheckJobStatus(), CNetScheduleHandler::x_FinalizeReadCommand(), CGridRPCBaseClient< CAsnBinCompressed >::x_GetJobById(), CNSGroupsRegistry::x_PrintOne(), CNSScopeRegistry::x_PrintOne(), CNSAffinityRegistry::x_PrintOne(), CNetScheduleHandler::x_ProcessFastStatusS(), CNetScheduleHandler::x_ProcessFastStatusW(), CNetScheduleHandler::x_ProcessJobDelayExpiration(), CNetScheduleHandler::x_ProcessJobDelayReadExpiration(), CNetScheduleHandler::x_ProcessListenJob(), CNetScheduleHandler::x_ProcessPut(), CNetScheduleHandler::x_ProcessPutFailure(), CNetScheduleHandler::x_ProcessQueueInfo(), CNetScheduleHandler::x_ProcessReading(), CNetScheduleHandler::x_ProcessRedo(), CNetScheduleHandler::x_ProcessReread(), CNetScheduleHandler::x_ProcessReschedule(), CNetScheduleHandler::x_ProcessReturn(), CNetScheduleHandler::x_ProcessStatistics(), CNetScheduleHandler::x_ProcessStatus(), and CNetScheduleHandler::x_RemoveDuplicateStatuses().

◆ StringToStatus()

CNetScheduleAPI::EJobStatus CNetScheduleAPI::StringToStatus ( const CTempString status_str)
static