NCBI C++ ToolKit
|
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 SWorkerNodeJobContextImpl * | CWorkerNodeJobContext::TInstance |
typedef SGridWorkerNodeImpl * | CGridWorkerNode::TInstance |
typedef pair< string, SBuildInfo > | CGridWorkerNode::TVersion |
typedef SNetScheduleAPIImpl * | CNetScheduleAPI::TInstance |
typedef unsigned | CNetScheduleAPI::TJobMask |
typedef map< string, string > | CNetScheduleAPI::TQueueParams |
typedef SNetScheduleSubmitterImpl * | CNetScheduleSubmitter::TInstance |
typedef SNetScheduleExecutorImpl * | CNetScheduleExecutor::TInstance |
typedef CNetScheduleExecutor | CNetScheduleExecuter |
typedef SNetScheduleJobReaderImpl * | CNetScheduleJobReader::TInstance |
typedef map< string, string > | CGridCgiContext::TPersistedEntries |
typedef map< string, string > | CGridCgiContext::TPersistentEntries |
Friends | |
class | CGridJobBatchSubmitter::CGridClient |
Only CGridClient can create an instance of this class. More... | |
class | CWorkerNodeIdleTaskContext::CWorkerNodeIdleThread |
class | CGridCgiContext::CGridCgiApplication |
class | CRemoteCgiApp::CCgiWorkerNodeJob |
CNcbiOstream & | SJobs::operator<< (CNcbiOstream &out, SJobs jobs) |
#define CALLBACK_PARAM "callback=" |
Definition at line 786 of file cgi2rcgi.cpp.
#define NCBI_DECLARE_WORKERNODE_FACTORY | ( | TWorkerNodeJob, | |
Version | |||
) |
Definition at line 496 of file grid_worker.hpp.
#define NCBI_DECLARE_WORKERNODE_FACTORY_EX | ( | TWorkerNodeJob, | |
TWorkerNodeIdleTask, | |||
Version | |||
) |
Definition at line 500 of file grid_worker.hpp.
#define NCBI_DECLARE_WORKERNODE_FACTORY_IMPL | ( | TWorkerNodeJob, | |
Version | |||
) |
Definition at line 486 of file grid_worker.hpp.
Definition at line 765 of file netschedule_api.hpp.
Definition at line 197 of file grid_worker.hpp.
Definition at line 540 of file grid_worker.hpp.
Definition at line 87 of file netschedule_api.hpp.
Definition at line 393 of file netschedule_api.hpp.
Definition at line 587 of file netschedule_api.hpp.
Definition at line 778 of file netschedule_api.hpp.
typedef unsigned CNetScheduleAPI::TJobMask |
Definition at line 212 of file netschedule_api.hpp.
|
private |
Definition at line 115 of file grid_cgiapp.hpp.
Definition at line 277 of file cgi2rcgi.cpp.
typedef map<string, string> CNetScheduleAPI::TQueueParams |
Definition at line 241 of file netschedule_api.hpp.
typedef pair<string, SBuildInfo> CGridWorkerNode::TVersion |
Definition at line 590 of file grid_worker.hpp.
Defines how this object must be initialized.
Enumerator | |
---|---|
eAppRegistry |
Definition at line 90 of file netschedule_api.hpp.
Enumerator | |
---|---|
eAutomaticCleanup | |
eManualCleanup |
Definition at line 120 of file grid_client.hpp.
Enumerator | |
---|---|
eCT_Auto | |
eCT_Admin | |
eCT_Submitter | |
eCT_WorkerNode | |
eCT_Reader |
Definition at line 263 of file netschedule_api.hpp.
Enumerator | |
---|---|
eCS_Done | |
eCS_Failure | |
eCS_Return | |
eCS_Reschedule | |
eCS_NotCommitted | |
eCS_JobIsLost |
Definition at line 350 of file grid_worker.hpp.
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.
Enumerator | |
---|---|
eBatchAlreadySubmitted |
Definition at line 298 of file grid_client.hpp.
Enumerator | |
---|---|
ePortBusy | |
eJobIsLost | |
eJobFactoryIsNotSet | |
eExclusiveModeIsAlreadySet |
Definition at line 619 of file grid_worker.hpp.
Definition at line 66 of file netschedule_api_expt.hpp.
Enumerator | |
---|---|
eJobStarted | |
eJobStopped | |
eJobFailed | |
eJobSucceeded | |
eJobReturned | |
eJobRescheduled | |
eJobCanceled | |
eJobLost |
Definition at line 510 of file grid_worker.hpp.
Affinity matching modes.
Enumerator | |
---|---|
ePreferredAffsOrAnyJob | |
ePreferredAffinities | |
eClaimNewPreferredAffs | |
eAnyJob | |
eExplicitAffinitiesOnly |
Definition at line 593 of file netschedule_api.hpp.
Job masks.
Definition at line 196 of file netschedule_api.hpp.
Job status codes.
Definition at line 160 of file netschedule_api.hpp.
Definition at line 273 of file netschedule_api.hpp.
Enumerator | |
---|---|
eProgressMsgOn | |
eProgressMsgOff |
Definition at line 125 of file grid_client.hpp.
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.
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.
Definition at line 77 of file grid_worker.hpp.
void SInputValidator::AddAffinityEntry | ( | string | name | ) |
Definition at line 168 of file cgi2rcgi.cpp.
References SInputValidator::CheckAffinity(), and SInputValidator::m_Entries.
Referenced by CCgi2RCgiApp::Init().
|
pure virtual |
Implemented in CWorkerNodeJobCleanup, and CWorkerNodeCleanup.
Referenced by CSampleJob::CSampleJob(), and CSampleJob::Do().
Definition at line 749 of file netschedule_api.hpp.
References CNetScheduleExecutor::ChangePreferredAffinities(), and NULL.
|
inline |
Definition at line 303 of file cgi2rcgi.cpp.
References CHTMLPage::AddTagMap(), CGridCgiContext::m_CustomHTTPHeader, CGridCgiContext::m_Page, n, and NStr::Sanitize().
Referenced by CCgi2RCgiApp::DefineRefreshTags(), CGridCgiContext::LoadQueryStringTags(), and CCgi2RCgiApp::PopulatePage().
|
pure virtual |
Implemented in CWorkerNodeJobCleanup, and CWorkerNodeCleanup.
Cancel Job.
job_key | Job key |
Definition at line 70 of file grid_client.cpp.
References CNetScheduleSubmitter::CancelJob(), and CGridClient::m_NetScheduleSubmitter.
Referenced by CGridCgiApplication::ProcessRequest().
Cancel job.
job_key | Job key |
Definition at line 590 of file netschedule_api_submitter.cpp.
References cmd, and g_AppendClientIPSessionIDHitID().
Referenced by CGridClient::CancelJob(), and CGridCommandLineInterfaceApp::Cmd_CancelJob().
void CNetScheduleSubmitter::CancelJobGroup | ( | const string & | job_group, |
const string & | job_statuses = kEmptyStr |
||
) |
Cancel job group.
job_group | Group ID. |
job_statuses | Optional 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::CGridCgiContext | ( | CHTMLPage & | page, |
CCgiContext & | ctx | ||
) |
Definition at line 63 of file grid_cgiapp.cpp.
References ctx, eCgi_QueryString, CCgiRequest::GetProperty(), CGridCgiContext::m_ParsedQueryString, and CCgiRequest::ParseEntries().
|
private |
A copy constructor and an assignment operator are prohibited.
CGridCgiContext::CGridCgiContext | ( | SInputValidator & | input_validator, |
CHTMLPage & | page, | ||
CHTMLPage & | custom_http_header, | ||
CCgiContext & | ctx | ||
) |
Definition at line 327 of file cgi2rcgi.cpp.
References ctx, eCgi_QueryString, CCgiRequest::GetProperty(), CCgiRequest::GetRandomProperty(), CGridCgiContext::m_NeedMetaRefresh, CGridCgiContext::m_ParsedQueryString, and CCgiRequest::ParseEntries().
CGridClient::CGridClient | ( | CNetScheduleSubmitter::TInstance | ns_submitter, |
CNetCacheAPI::TInstance | nc_client, | ||
ECleanUp | cleanup, | ||
EProgressMsg | progress_msg | ||
) |
Constructor.
ns_client | NetSchedule client - an instance of CNetScheduleSubmitter. |
nc_client | NetCache client - an instance of CNetCacheAPI. |
cleanup | if 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::CGridClient | ( | CNetScheduleSubmitter::TInstance | ns_submitter, |
IBlobStorage & | storage, | ||
ECleanUp | cleanup, | ||
EProgressMsg | progress_msg | ||
) |
Constructor.
ns_client | NetSchedule client - an instance of CNetScheduleSubmitter. |
storage | NetSchedule storage |
cleanup | if 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.
|
private |
The copy constructor and the assignment operator are prohibited.
|
explicitprivate |
Definition at line 207 of file grid_client.cpp.
|
private |
The copy constructor and the assignment operator are prohibited.
|
inline |
Definition at line 540 of file grid_worker.hpp.
CGridWorkerNode::CGridWorkerNode | ( | CNcbiApplicationAPI & | app, |
IWorkerNodeJobFactory * | job_factory | ||
) |
Construct a worker node using class factories.
Definition at line 363 of file grid_worker.cpp.
|
inline |
Definition at line 540 of file grid_worker.hpp.
|
inline |
Definition at line 540 of file grid_worker.hpp.
void CNetScheduleExecutor::ChangePreferredAffinities | ( | const vector< string > * | affs_to_add, |
const vector< string > * | affs_to_delete | ||
) |
Definition at line 618 of file netschedule_api_executor.cpp.
References cmd, SNetScheduleExecutorImpl::eAddAffs, SNetScheduleExecutorImpl::eDeleteAffs, and g_AppendClientIPSessionIDHitID().
Referenced by CNetScheduleExecutor::AddPreferredAffinities(), CNetScheduleExecutor::DeletePreferredAffinities(), and NAutomation::SNetScheduleServer::ExecChangePreferredAffinities().
Definition at line 118 of file cgi2rcgi.cpp.
References SInputValidator::SEntry::m_Func, SInputValidator::SEntry::m_Validated, SInputValidator::SEntry::name, NCBI_THROW_FMT, and value.
Definition at line 219 of file cgi2rcgi.cpp.
References NStr::MatchesMask(), NCBI_THROW, and value.
Referenced by SInputValidator::AddAffinityEntry().
Definition at line 211 of file cgi2rcgi.cpp.
References NStr::MatchesMask(), NCBI_THROW, and value.
Referenced by SInputValidator::SInputValidator().
Definition at line 96 of file cgi2rcgi.cpp.
References NStr::StringToInt(), and value.
Referenced by SInputValidator::SInputValidator().
void SInputValidator::CheckEntry | ( | const string & | name, |
const string & | value, | ||
bool | is_requested = true |
||
) |
Definition at line 156 of file cgi2rcgi.cpp.
References NStr::CompareNocase(), CCgiException::e501_NotImplemented, FORMAT, SInputValidator::m_Entries, NCBI_CGI_THROW_WITH_STATUS, and value.
Referenced by CGridCgiContext::LoadQueryStringTags(), and CGridCgiContext::PullUpPersistentEntry().
Definition at line 97 of file cgi2rcgi.cpp.
References NStr::StringToBool(), and value.
Referenced by SInputValidator::SInputValidator().
|
private |
Definition at line 135 of file grid_client.cpp.
References CGridJobBatchSubmitter::m_HasBeenSubmitted, and NCBI_THROW.
Referenced by CGridJobBatchSubmitter::CheckIfBatchSubmittedAndPrepareNextJob(), CGridJobBatchSubmitter::PrepareNextJob(), and CGridJobBatchSubmitter::Submit().
|
private |
Definition at line 143 of file grid_client.cpp.
References CGridJobBatchSubmitter::CheckIfBatchAlreadySubmitted(), CGridJobBatchSubmitter::m_Jobs, and CGridJobBatchSubmitter::PrepareNextJob().
Referenced by CGridJobBatchSubmitter::GetOStream(), CGridJobBatchSubmitter::SetJobAffinity(), CGridJobBatchSubmitter::SetJobInput(), and CGridJobBatchSubmitter::SetJobMask().
|
private |
Definition at line 1420 of file cgi2rcgi.cpp.
References CHTMLPage::AddTagMap(), CGridCgiContext::DefinePersistentEntry(), CCgi2RCgiApp::DefineRefreshTags(), done, CNetScheduleAPI::eCanceled, CNetScheduleAPI::eDone, CNetScheduleAPI::eFailed, CNetScheduleAPI::eJobNotFound, CNetScheduleAPI::ePending, CNetScheduleAPI::eRunning, CGridCgiContext::GetHTMLPage(), CGridCgiContext::GetJobKey(), CGridCgiContext::GetSelfURL(), kEmptyStr, kSinceTime, LOG_POST, CCgi2RCgiApp::m_CancelGoBackDelay, CCgi2RCgiApp::m_FallBackUrl, CCgi2RCgiApp::m_GridClient, CCgi2RCgiApp::m_Response, Note, CCgi2RCgiApp::OnJobDone(), CCgi2RCgiApp::OnJobFailed(), CGridCgiContext::SelectView(), CCgiResponse::SetHeaderValue(), CCgiApplication::SetRequestId(), and CNetScheduleAPI::StatusToString().
Referenced by CCgi2RCgiApp::CheckJob(), and CCgi2RCgiApp::SubmitJob().
|
private |
Definition at line 1054 of file cgi2rcgi.cpp.
References CCgi2RCgiApp::CheckIfJobDone(), CGridCgiContext::Clear(), CCgi2RCgiApp::DefineRefreshTags(), done, CNetScheduleAPI::eJobNotFound, CDiagContext::Extra(), CNetScheduleNotificationHandler::fJSM_Pending, CNetScheduleNotificationHandler::fJSM_Running, CCgiApplication::GetArgs(), GetDiagContext(), CGridCgiContext::GetJobKey(), CGridCgiContext::GetPersistentEntryValue(), CGridCgiContext::GetSelfURL(), CCgi2RCgiApp::GetStatus(), CCgi2RCgiApp::GetStatusAndCtgTime(), CGridCgiContext::HasCtgTime(), CCgi2RCgiApp::m_GridClient, CCgi2RCgiApp::m_NetScheduleAPI, CCgi2RCgiApp::m_RefreshDelay, CCgi2RCgiApp::m_RefreshWait, CDiagContext_Extra::Print(), and CNetScheduleNotificationHandler::WaitForJobEvent().
Referenced by CCgi2RCgiApp::ProcessRequest().
Definition at line 196 of file cgi2rcgi.cpp.
References ncbi::grid::netcache::search::fields::key, NCBI_THROW, NStr::StringToInt(), and value.
Referenced by SInputValidator::GetListenJobs(), and SInputValidator::SInputValidator().
|
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().
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().
void CGridClient::CloseStream | ( | ) |
Definition at line 98 of file grid_client.cpp.
References CGridClient::m_GridWrite, and SGridWrite::Reset().
Referenced by CGridRPCBaseClient< CAsnBinCompressed >::Ask(), CGridRPCBaseClient< CAsnBinCompressed >::AskStream(), CGridClient::Submit(), and CGridClient::SubmitAndWait().
void CWorkerNodeJobContext::CloseStreams | ( | ) |
Definition at line 169 of file wn_main_loop.cpp.
References CWorkerNodeJobContext::m_Impl, and NCBI_CATCH_ALL_X.
Referenced by SWorkerNodeJobContextImpl::x_RunJob(), and SOfflineJobContextImpl::x_RunJob().
|
inline |
Definition at line 87 of file netschedule_api.hpp.
|
explicit |
Constructs a CNetScheduleAPI object and initializes it with parameters read from the specified configuration object.
conf | A CConfig object to get the configuration parameters from. |
conf_section | Name 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.
|
explicit |
Constructs a CNetScheduleAPI object and initializes it with parameters read from the specified registry object.
reg | Registry to get the configuration parameters from. |
conf_section | Name 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::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
service_name | Name of the service to connect to (format: LB service name or host:port) |
client_name | Name of the client program (project) |
queue_name | Name of the job queue |
Definition at line 758 of file netschedule_api.cpp.
|
explicit |
Creates an instance of CNetScheduleAPI and initializes it with parameters read from the application registry.
use_app_reg | Selects this constructor. The parameter is not used otherwise. |
conf_section | Name 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.
|
inline |
Definition at line 87 of file netschedule_api.hpp.
|
inline |
Definition at line 87 of file netschedule_api.hpp.
|
inline |
Definition at line 587 of file netschedule_api.hpp.
|
inline |
Definition at line 587 of file netschedule_api.hpp.
|
inline |
Definition at line 587 of file netschedule_api.hpp.
|
inlineexplicit |
Definition at line 344 of file netschedule_api.hpp.
|
inline |
Definition at line 778 of file netschedule_api.hpp.
|
inline |
Definition at line 778 of file netschedule_api.hpp.
|
inline |
Definition at line 778 of file netschedule_api.hpp.
|
inline |
Construct an empty object for use with ParseJobKey().
Definition at line 71 of file netschedule_key.hpp.
|
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 | ( | const string & | host, |
unsigned | port, | ||
const string & | queue_name | ||
) |
Definition at line 171 of file netschedule_key.cpp.
References CSocketAPI::gethostbyname(), NStr::IntToString(), CSocketAPI::isip(), and m_Port.
|
inlineexplicit |
Definition at line 305 of file netschedule_api.hpp.
|
inline |
Definition at line 393 of file netschedule_api.hpp.
|
inline |
Definition at line 393 of file netschedule_api.hpp.
|
inline |
Definition at line 393 of file netschedule_api.hpp.
|
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().
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 CSampleJob::Do(), CCgiWorkerNodeJob::Do(), and CRemoteAppLauncher::FinishJob().
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 CRemoteAppJob::Do(), CRemoteCgiJob::Do(), CRemoteAppLauncher::FinishJob(), and SOfflineJobContextImpl::x_RunJob().
|
virtual |
The same as CreateContext(), but allows for a custom set of flags to be specified in the CCgiRequest constructor.
Reimplemented from CCgiApplication.
Definition at line 717 of file cgi2rcgi.cpp.
References CCgiApplication::CreateContextWithFlags(), eCgi_ContentLength, env, eUseRequestContent, CCgiRequest::fDoNotParseContent, flags, CCgiRequest::fSaveRequestContent, CCgiRequest::GetPropertyName(), CCgi2RCgiApp::m_AffinitySource, NULL, out(), CNcbiApplicationAPI::SetEnvironment(), and NStr::StringToUInt().
|
inlinevirtual |
Create a job.
Implements IWorkerNodeJobFactory.
Definition at line 449 of file grid_worker.hpp.
References CSimpleJobFactory< TWorkerNodeJob >::m_WorkerNodeInitContext.
|
pure virtual |
Create a job.
Implemented in CCgiWorkerNodeJobFactory, CRemoteAppJobFactory< TJob, TListener, kName >, and CSimpleJobFactory< TWorkerNodeJob >.
|
inline |
Definition at line 760 of file cgi2rcgi.cpp.
CRemoteCgiApp::CRemoteCgiApp | ( | ) |
Definition at line 114 of file remote_cgiapp.cpp.
References CgiGridWorker_SignalHandler(), CNcbiApplicationAPI::DisableArgDescriptions(), and CRemoteCgiApp::m_AppImpl.
|
private |
|
private |
Definition at line 261 of file grid_worker.cpp.
|
inline |
Definition at line 197 of file grid_worker.hpp.
|
inline |
Definition at line 197 of file grid_worker.hpp.
|
inline |
Definition at line 197 of file grid_worker.hpp.
Definition at line 430 of file cgi2rcgi.cpp.
References map_checker< Container >::end(), map_checker< Container >::erase(), map_checker< Container >::find(), CGridCgiContext::m_PersistentEntries, and value.
Referenced by CCgi2RCgiApp::CheckIfJobDone(), CGridCgiContext::PullUpPersistentEntry(), s_GetCtgTime(), CGridCgiContext::SetJobKey(), and CCgi2RCgiApp::SubmitJob().
|
private |
Definition at line 1305 of file cgi2rcgi.cpp.
References CGridCgiContext::AddTagMap(), CHTMLPlainText::eNoEncode, NStr::IntToString(), CHttpRetryContext::kHeader_Delay, CHttpRetryContext::kHeader_Url, CCgi2RCgiApp::m_HTMLPassThrough, CCgi2RCgiApp::m_Page, CCgi2RCgiApp::m_Response, CGridCgiContext::NeedMetaRefresh(), and CCgiResponse::SetHeaderValue().
Referenced by CCgi2RCgiApp::CheckIfJobDone(), CCgi2RCgiApp::CheckJob(), CCgi2RCgiApp::OnJobDone(), CCgi2RCgiApp::OnJobFailed(), and CCgi2RCgiApp::SubmitJob().
Definition at line 752 of file netschedule_api.hpp.
References CNetScheduleExecutor::ChangePreferredAffinities(), and NULL.
|
static |
Definition at line 1060 of file grid_worker.cpp.
References s_ReqEventsDisabled.
|
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)
context | Context where a job can get all required information like input/output steams, the job key etc. |
Implemented in CCgiWorkerNodeJob, CSampleJob, CRemoteCgiJob, and CRemoteAppJob.
Referenced by SWorkerNodeJobContextImpl::x_RunJob(), and SOfflineJobContextImpl::x_RunJob().
unsigned CNetScheduleException::ErrCodeToHTTPStatusCode | ( | ) | const |
Definition at line 120 of file netschedule_api_expt.cpp.
References CNetScheduleException::eAccessDenied, CNetScheduleException::eAffinityNotFound, CNetScheduleException::eAuthenticationError, CNetScheduleException::eClientDataVersionMismatch, CNetScheduleException::eDataTooLong, CNetScheduleException::eDuplicateName, CNetScheduleException::eGroupNotFound, CNetScheduleException::eInvalidAuthToken, CNetScheduleException::eInvalidClient, CNetScheduleException::eInvalidJobStatus, CNetScheduleException::eInvalidParameter, CNetScheduleException::eJobNotFound, CNetScheduleException::eKeyFormatError, CNetScheduleException::eObsoleteCommand, CNetScheduleException::ePrefAffExpired, CNetScheduleException::eProtocolSyntaxError, CNetScheduleException::eShuttingDown, CNetScheduleException::eSubmitsDisabled, CNetScheduleException::eTooManyPendingJobs, CNetScheduleException::eTooManyPreferredAffinities, CNetScheduleException::eTryAgain, CNetScheduleException::eUnknownQueue, CNetScheduleException::eUnknownQueueClass, CNetScheduleException::eUnknownService, and CException::GetErrCode().
Referenced by CNetScheduleHandler::OnMessage(), and CNetScheduleHandler::x_ProcessMsgQueue().
|
static |
Definition at line 832 of file netschedule_api.cpp.
References CNetScheduleAPI::eWarnUnknown, and EXTRACT_WARNING_TYPE.
Referenced by CGridCommandLineInterfaceApp::OnWarning().
void CGridWorkerNode::ForceSingleThread | ( | ) |
Definition at line 1066 of file grid_worker.cpp.
References CGridWorkerNode::m_Impl.
void CNetScheduleKeyGenerator::Generate | ( | string * | key, |
unsigned | id | ||
) | const |
Definition at line 199 of file netschedule_key.cpp.
References NStr::IntToString(), ncbi::grid::netcache::search::fields::key, MAX_INT_TO_STR_LEN, NS_KEY_V1_PREFIX, and NS_KEY_V1_PREFIX_LEN.
|
inline |
Definition at line 103 of file netschedule_key.hpp.
References ncbi::grid::netcache::search::fields::key.
Referenced by CQueue::MakeJobKey(), and CNetScheduleSubmitter::SubmitJobBatch().
string CNetScheduleKeyGenerator::GenerateCompoundID | ( | unsigned | id, |
CCompoundIDPool | id_pool | ||
) | const |
Definition at line 209 of file netschedule_key.cpp.
References CCompoundID::AppendDatabaseName(), CCompoundID::AppendHost(), CCompoundID::AppendID(), CCompoundID::AppendIPv4SockAddr(), CCompoundID::AppendPort(), eCIC_NetScheduleJobKey, m_Port, CCompoundIDPool::NewID(), and CCompoundID::ToString().
Referenced by CQueue::MakeJobKey().
CNetScheduleAdmin CNetScheduleAPI::GetAdmin | ( | ) |
Definition at line 903 of file netschedule_api.cpp.
References CNetScheduleAPI::m_Impl.
Referenced by NAutomation::SNetScheduleService::ExecJobCounters(), NAutomation::SNetScheduleService::ExecShutdown(), NAutomation::SWorkerNode::ExecShutdown(), g_ProcessJobInfo(), g_QueueInfoToJson(), CCgi2RCgiApp::GetStatus(), CCgi2RCgiApp::GetStatusAndCtgTime(), SGridWorkerNodeImpl::Run(), CSampleNetScheduleClient::Run(), and CGridCommandLineInterfaceApp::SetUp_NetScheduleCmd().
|
inlinevirtual |
Reimplemented in CCgiWorkerNodeJobFactory, CRemoteAppJobFactory< TJob, TListener, kName >, and CSimpleJobFactory< TWorkerNodeJob >.
Definition at line 432 of file grid_worker.hpp.
References IWorkerNodeJobFactory::GetJobVersion().
|
inlinevirtual |
Reimplemented from IWorkerNodeJobFactory.
Definition at line 455 of file grid_worker.hpp.
References CSimpleJobFactory< TWorkerNodeJob >::m_AppName.
string CGridWorkerNode::GetAppName | ( | void | ) | const |
Definition at line 1111 of file grid_worker.cpp.
References CGridWorkerNode::m_Impl.
Referenced by CGetStatisticsProcessor::Process().
|
inlinevirtual |
Reimplemented in CCgiWorkerNodeJobFactory, and CRemoteAppJobFactory< TJob, TListener, kName >.
Definition at line 434 of file grid_worker.hpp.
References kEmptyStr.
CGridWorkerNode::TVersion CGridWorkerNode::GetAppVersion | ( | void | ) | const |
Definition at line 1117 of file grid_worker.cpp.
References _ASSERT, CGridWorkerNode::m_Impl, CVersionInfo::Print(), and version.
Referenced by CGetVersionProcessor::Process(), and CGetStatisticsProcessor::Process().
Get command line arguments.
Implemented in SGridWorkerNodeImpl.
|
inline |
Definition at line 93 of file grid_client.hpp.
References CGridJobBatchSubmitter::m_Jobs.
Referenced by CGridCommandLineInterfaceApp::SubmitJob_Batch().
|
inline |
Get the size of an input stream.
Definition at line 197 of file grid_client.hpp.
References CGridClient::m_BlobSize.
|
inline |
Get CGI Context.
Definition at line 98 of file grid_cgiapp.hpp.
References CGridCgiContext::m_CgiContext.
Referenced by CGridCgiApplication::x_CheckJobStatus().
unsigned CGridWorkerNode::GetCheckStatusPeriod | ( | ) | const |
Definition at line 1106 of file grid_worker.cpp.
References CGridWorkerNode::m_Impl.
IWorkerNodeCleanupEventSource * CWorkerNodeJobContext::GetCleanupEventSource | ( | ) |
Definition at line 114 of file wn_main_loop.cpp.
References CWorkerNodeJobContext::m_Impl.
Referenced by CSampleJob::Do().
IWorkerNodeCleanupEventSource * CGridWorkerNode::GetCleanupEventSource | ( | ) |
Definition at line 1145 of file grid_worker.cpp.
References CGridWorkerNode::m_Impl.
|
pure virtual |
Get interface for registering clean-up event listeners.
Implemented in SGridWorkerNodeImpl.
Referenced by CSampleJob::CSampleJob().
Definition at line 638 of file netschedule_api_executor.cpp.
Get a node name.
Definition at line 144 of file wn_main_loop.cpp.
References CWorkerNodeJobContext::m_Impl.
Definition at line 1160 of file grid_worker.cpp.
References CGridWorkerNode::m_Impl.
|
static |
Definition at line 72 of file netschedule_api_expt.cpp.
References CException::eInvalid.
Referenced by CNetScheduleServerListener::OnErrorImpl().
unsigned CGridWorkerNode::GetCommitJobInterval | ( | ) | const |
Definition at line 1101 of file grid_worker.cpp.
References CGridWorkerNode::m_Impl.
CWorkerNodeJobContext::ECommitStatus CWorkerNodeJobContext::GetCommitStatus | ( | ) | const |
Definition at line 104 of file wn_main_loop.cpp.
References CWorkerNodeJobContext::m_Impl.
Referenced by CRemoteAppJob::Do(), CRemoteCgiJob::Do(), and SOfflineJobContextImpl::x_RunJob().
|
static |
Definition at line 370 of file wn_main_loop.cpp.
References CWorkerNodeJobContext::eCS_Done, CWorkerNodeJobContext::eCS_Failure, CWorkerNodeJobContext::eCS_JobIsLost, CWorkerNodeJobContext::eCS_Reschedule, and CWorkerNodeJobContext::eCS_Return.
Referenced by CRemoteAppJob::Do(), and CRemoteCgiJob::Do().
Get a config file registry.
Implemented in SGridWorkerNodeImpl.
Referenced by CSampleJob::CSampleJob(), and CRemoteAppJobFactory< TJob, TListener, kName >::Init().
Definition at line 185 of file cgi2rcgi.cpp.
References CTimeout::eZero, CTimeout::Set(), NStr::StringToDouble(), and value.
Referenced by CCgi2RCgiApp::ListenJobs(), and SInputValidator::SInputValidator().
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().
|
pure virtual |
Get environment variables.
Implemented in SGridWorkerNodeImpl.
|
static |
Definition at line 151 of file netschedule_api_expt.cpp.
References CNetScheduleException::eAccessDenied, CNetScheduleException::eAffinityNotFound, CNetScheduleException::eAuthenticationError, CNetScheduleException::eClientDataVersionMismatch, CNetScheduleException::eDataTooLong, CNetScheduleException::eDuplicateName, CNetScheduleException::eGroupNotFound, CNetScheduleException::eInternalError, CNetScheduleException::eInvalidAuthToken, CNetScheduleException::eInvalidClient, CNetScheduleException::eInvalidJobStatus, CNetScheduleException::eInvalidParameter, CNetScheduleException::eJobNotFound, CNetScheduleException::eObsoleteCommand, CNetScheduleException::ePrefAffExpired, CNetScheduleException::eProtocolSyntaxError, CNetScheduleException::eShuttingDown, CNetScheduleException::eSubmitsDisabled, CNetScheduleException::eTooManyPreferredAffinities, CNetScheduleException::eTryAgain, CNetScheduleException::eUnknownQueue, CNetScheduleException::eUnknownQueueClass, CNetScheduleException::eUnknownService, and CNetScheduleException::GetErrCodeString().
Referenced by CNetScheduleServerListener::OnErrorImpl().
|
overridevirtual |
Get error code interpreted as text.
Reimplemented from CNetServiceException.
Definition at line 80 of file netschedule_api_expt.cpp.
References CException::GetErrCode().
Referenced by CNetScheduleException::GetErrCodeDescription(), CNetScheduleHandler::OnMessage(), and CNetScheduleHandler::x_ProcessMsgQueue().
|
static |
Definition at line 85 of file netschedule_api_expt.cpp.
References CNetScheduleException::eAccessDenied, CNetScheduleException::eAffinityNotFound, CNetScheduleException::eAuthenticationError, CNetScheduleException::eClientDataVersionMismatch, CNetScheduleException::eDataTooLong, CNetScheduleException::eDuplicateName, CNetScheduleException::eGroupNotFound, CNetScheduleException::eInternalError, CNetScheduleException::eInvalidAuthToken, CNetScheduleException::eInvalidClient, CNetScheduleException::eInvalidJobStatus, CNetScheduleException::eInvalidParameter, CNetScheduleException::eJobNotFound, CNetScheduleException::eKeyFormatError, CNetScheduleException::eObsoleteCommand, CNetScheduleException::ePrefAffExpired, CNetScheduleException::eProtocolSyntaxError, CNetScheduleException::eShuttingDown, CNetScheduleException::eSubmitsDisabled, CNetScheduleException::eTooManyPendingJobs, CNetScheduleException::eTooManyPreferredAffinities, CNetScheduleException::eTryAgain, CNetScheduleException::eUnknownQueue, CNetScheduleException::eUnknownQueueClass, and CNetScheduleException::eUnknownService.
|
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().
|
inlineoverridevirtual |
Get error code interpreted as text.
Reimplemented from CException.
Definition at line 626 of file grid_worker.hpp.
References CGridWorkerNodeException::eExclusiveModeIsAlreadySet, CGridWorkerNodeException::eJobFactoryIsNotSet, CGridWorkerNodeException::eJobIsLost, CGridWorkerNodeException::ePortBusy, CException::GetErrCode(), and CException::GetErrCodeString().
If something bad has happened this method will return an explanation.
Definition at line 365 of file grid_client.cpp.
References CNetScheduleJob::error_msg, CGridClient::m_Job, and CGridClient::x_GetJobDetails().
Referenced by CRemoteAppClientSampleApp::PrintJobInfo(), CGridClientSampleApp::Run(), CRemoteAppClientSampleApp::Run(), and CGridCgiApplication::x_CheckJobStatus().
CNetScheduleExecutor CNetScheduleAPI::GetExecutor | ( | ) |
Create an instance of CNetScheduleExecutor.
Definition at line 891 of file netschedule_api.cpp.
References CNetScheduleAPI::m_Impl.
Referenced by CGridCommandLineInterfaceApp::Cmd_JobInfo(), CGridCommandLineInterfaceApp::Cmd_UpdateJob(), NAutomation::SNetScheduleServer::ExecChangePreferredAffinities(), SGridWorkerNodeImpl::Run(), CSampleNetScheduleNode::Run(), and CGridCommandLineInterfaceApp::SetUp_NetScheduleCmd().
|
inline |
Get a grid client.
Definition at line 64 of file grid_client_app.hpp.
References CGridClientApp::m_GridClient.
Referenced by CRemoteAppClientSampleApp::PrintJobInfo(), CGridClientSampleApp::Run(), CRemoteAppClientSampleApp::Run(), and CRemoteAppClientSampleApp::ShowBlob().
|
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().
string CGridCgiContext::GetHiddenFields | ( | ) | const |
Definition at line 97 of file grid_cgiapp.cpp.
References map_checker< Container >::begin(), map_checker< Container >::end(), CGridCgiContext::m_PersistedEntries, and value.
Referenced by CGridCgiApplication::ProcessRequest().
|
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().
|
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.
|
inlinevirtual |
Get the Idle task.
Reimplemented from IWorkerNodeJobFactory.
Definition at line 480 of file grid_worker.hpp.
References CSimpleJobFactoryEx< TWorkerNodeJob, TWorkerNodeIdleTask >::m_IdleTask.
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.
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().
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 CRemoteAppJob::Do(), CRemoteCgiJob::Do(), CSampleJob::Do(), and CCgiWorkerNodeJob::Do().
|
inline |
Definition at line 240 of file grid_client.hpp.
References CGridClient::m_Job.
Referenced by CGridRPCBaseClient< CAsnBinCompressed >::Ask(), and CGridRPCBaseClient< CAsnBinCompressed >::AskStream().
CNetScheduleJob & CWorkerNodeJobContext::GetJob | ( | ) |
Definition at line 53 of file wn_main_loop.cpp.
References CWorkerNodeJobContext::m_Impl.
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 CRemoteCgiJob::Do(), CAppEnvHolder::GetEnv(), and SGridWorkerNodeImpl::OfflineRun().
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.
job | NetSchedule job description structure. |
affinity_list | Comma-separated list of affinity tokens. |
deadline | Deadline for waiting for a matching job to appear in the queue. |
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().
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.
CGridJobBatchSubmitter & CGridClient::GetJobBatchSubmitter | ( | ) |
Get a job submitter.
Definition at line 64 of file grid_client.cpp.
References CGridClient::m_JobBatchSubmitter, and CGridJobBatchSubmitter::Reset().
CNetScheduleAPI::EJobStatus CNetScheduleAPI::GetJobDetails | ( | CNetScheduleJob & | job, |
time_t * | job_exptime = NULL , |
||
ENetScheduleQueuePauseMode * | pause_mode = NULL |
||
) |
Get job details.
Definition at line 929 of file netschedule_api.cpp.
References CNetScheduleNewJob::affinity, cmd, CNetScheduleAPI::eCanceled, CNetScheduleAPI::eConfirmed, CNetScheduleAPI::eDone, CNetScheduleAPI::eEmptyMask, CNetScheduleAPI::eFailed, CNetScheduleAPI::ePending, CNetScheduleAPI::eReadFailed, CNetScheduleAPI::eReading, CNetScheduleJob::error_msg, CNetScheduleAPI::eRunning, NStr::fConvErr_NoThrow, g_AppendClientIPSessionIDHitID(), CNetScheduleNewJob::input, CNetScheduleNewJob::job_id, CNetScheduleAPI::m_Impl, CNetScheduleNewJob::mask, CNetScheduleJob::output, CNetScheduleJob::progress_msg, CNetScheduleJob::ret_code, s_SetJobExpTime(), s_SetPauseMode(), NStr::StringToInt(), and CNetScheduleAPI::StringToStatus().
Referenced by CGridRPCBaseClient< CAsnBinCompressed >::Ask(), CGridRPCBaseClient< CAsnBinCompressed >::AskStream(), CGridCommandLineInterfaceApp::Cmd_GetJobInput(), CGridCommandLineInterfaceApp::Cmd_GetJobOutput(), CGridCommandLineInterfaceApp::Cmd_Replay(), g_ProcessJobInfo(), CNetScheduleNotificationHandler::GetJobDetailsIfCompleted(), CCgi2RCgiApp::ListenJobs(), CNetScheduleNotificationHandler::WaitForJobCompletion(), and CGridRPCBaseClient< CAsnBinCompressed >::x_GetJobById().
CNetScheduleAPI::EJobStatus CNetScheduleSubmitter::GetJobDetails | ( | CNetScheduleJob & | job, |
time_t * | job_exptime = NULL , |
||
ENetScheduleQueuePauseMode * | pause_mode = NULL |
||
) |
Get full information about the specified job.
job | A 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_exptime | Number of seconds since EPOCH when the job will expire on the server. |
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().
IWorkerNodeJobFactory & CGridWorkerNode::GetJobFactory | ( | ) |
Definition at line 1071 of file grid_worker.cpp.
References CGridWorkerNode::m_Impl.
Get a job's input sting.
Definition at line 354 of file grid_client.cpp.
References CNetScheduleNewJob::input, CGridClient::m_Job, and CGridClient::x_GetJobDetails().
Referenced by CRemoteAppClientSampleApp::PrintJobInfo(), and CGridCgiApplication::x_CheckJobStatus().
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.
Referenced by CRemoteCgiJob::Do(), and CSampleJob::Do().
Definition at line 106 of file grid_cgiapp.hpp.
References CGridCgiContext::m_JobInput.
|
inline |
Definition at line 293 of file cgi2rcgi.cpp.
References CGridCgiContext::m_JobKey.
Get a job key.
Definition at line 58 of file wn_main_loop.cpp.
References CWorkerNodeJobContext::m_Impl.
Referenced by CRemoteAppJob::Do(), CRemoteCgiJob::Do(), CSampleJob::Do(), CRemoteAppLauncher::ExecRemoteApp(), CMonitoredProcessWatcher::MonitorRun(), CMonitoredProcessWatcher::x_Log(), and SOfflineJobContextImpl::x_RunJob().
Get Current job key.
Definition at line 116 of file grid_cgiapp.cpp.
References CGridCgiContext::GetEntryValue().
Referenced by CCgi2RCgiApp::CheckIfJobDone(), CCgi2RCgiApp::CheckJob(), CCgi2RCgiApp::GetStatus(), CCgi2RCgiApp::GetStatusAndCtgTime(), CCgi2RCgiApp::PopulatePage(), CCgi2RCgiApp::ProcessRequest(), and CCgi2RCgiApp::SubmitJob().
CNetScheduleAPI::TJobMask CWorkerNodeJobContext::GetJobMask | ( | ) | const |
Definition at line 88 of file wn_main_loop.cpp.
References CWorkerNodeJobContext::m_Impl.
unsigned int CWorkerNodeJobContext::GetJobNumber | ( | ) | const |
Definition at line 93 of file wn_main_loop.cpp.
References CWorkerNodeJobContext::m_Impl.
Referenced by SWorkerNodeJobContextImpl::x_RunJob(), and SOfflineJobContextImpl::x_RunJob().
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().
Definition at line 83 of file wn_main_loop.cpp.
References CWorkerNodeJobContext::m_Impl.
Referenced by CRemoteCgiJob::Do().
Definition at line 107 of file grid_cgiapp.hpp.
References CGridCgiContext::m_JobOutput.
Get current job progress message.
Definition at line 86 of file grid_cgiapp.hpp.
References CGridCgiContext::m_ProgressMsg.
CNetScheduleJobReader CNetScheduleAPI::GetJobReader | ( | const string & | group = kEmptyStr , |
const string & | affinity = kEmptyStr |
||
) |
Create an instance of CNetScheduleJobReader.
group | Restrict job retrieval to the specified job group name. |
affinity | Restrict job retrieval to the specified affinity. |
Definition at line 896 of file netschedule_api.cpp.
References CNetScheduleAPI::m_Impl.
Referenced by CGridCommandLineInterfaceApp::Cmd_ReadJob().
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.
job_key | NetSchedule job key. |
job_exptime | Number of seconds since EPOCH when the job will expire on the server. |
pause_mode | Queue pause mode set by the administrator. |
Definition at line 553 of file netschedule_api_executor.cpp.
Referenced by CGridCommandLineInterfaceApp::Cmd_JobInfo(), and SWorkerNodeJobContextImpl::GetShutdownLevel().
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.
job_key | NetSchedule job key. |
job_exptime | Number of seconds since EPOCH when the job will expire on the server. |
pause_mode | Queue pause mode set by the administrator. |
Definition at line 610 of file netschedule_api_submitter.cpp.
References CNetScheduleNewJob::job_id.
Referenced by CGridCommandLineInterfaceApp::Cmd_JobInfo().
|
inlinevirtual |
Get the job version.
Implements IWorkerNodeJobFactory.
Definition at line 454 of file grid_worker.hpp.
References CSimpleJobFactory< TWorkerNodeJob >::m_JobVersion.
|
virtual |
Definition at line 167 of file remote_cgiapp.cpp.
References GRID_APP_VERSION_INFO.
|
pure virtual |
Get the job version.
Implemented in CCgiWorkerNodeJobFactory, CRemoteAppJobFactory< TJob, TListener, kName >, and CSimpleJobFactory< TWorkerNodeJob >.
Referenced by IWorkerNodeJobFactory::GetAppName().
|
inline |
Definition at line 294 of file cgi2rcgi.cpp.
References CGridCgiContext::m_JqueryCallback.
Referenced by CCgi2RCgiApp::ProcessRequest().
Definition at line 173 of file cgi2rcgi.cpp.
References SInputValidator::CheckJobKey(), NStr::Split(), and value.
Referenced by CCgi2RCgiApp::ListenJobs(), and SInputValidator::SInputValidator().
size_t CGridClient::GetMaxServerInputSize | ( | ) |
Definition at line 80 of file grid_client.cpp.
References SNetScheduleAPIImpl::GetServerParams(), SNetScheduleSubmitterImpl::m_API, CGridClient::m_NetScheduleSubmitter, SNetScheduleAPIImpl::m_UseEmbeddedStorage, and CNetScheduleAPI::SServerParams::max_input_size.
Referenced by CGridJobBatchSubmitter::GetOStream(), and CGridClient::GetOStream().
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().
|
inline |
Definition at line 259 of file grid_client.hpp.
References CGridClient::m_NetCacheAPI.
Referenced by CGridClient::GetIStream(), CGridJobBatchSubmitter::GetOStream(), CGridClient::GetOStream(), and CGridClient::GetProgressMessage().
CNetCacheAPI CGridWorkerNode::GetNetCacheAPI | ( | ) | const |
Definition at line 1130 of file grid_worker.cpp.
References CGridWorkerNode::m_Impl.
Referenced by CGetStatisticsProcessor::Process().
|
pure virtual |
Get the shared NetCacheAPI object used by the worker node framework.
Implemented in SGridWorkerNodeImpl.
CNetScheduleAPI CGridWorkerNode::GetNetScheduleAPI | ( | ) | const |
Definition at line 1135 of file grid_worker.cpp.
References CGridWorkerNode::m_Impl.
Referenced by CGetStatisticsProcessor::Process().
|
pure virtual |
Get the shared NetScheduleAPI object used by the worker node framework.
Implemented in SGridWorkerNodeImpl.
Referenced by CRemoteAppJobFactory< TJob, TListener, kName >::GetJobVersion().
|
inline |
Definition at line 255 of file grid_client.hpp.
References CGridClient::m_NetScheduleSubmitter.
Referenced by CGridClient::GetProgressMessage(), CGridClient::GetStatus(), CGridClient::Submit(), CGridJobBatchSubmitter::Submit(), CGridClient::x_CheckAllJobBlobs(), and CGridClient::x_GetJobDetails().
CNetScheduleExecutor CGridWorkerNode::GetNSExecutor | ( | ) | const |
Definition at line 1140 of file grid_worker.cpp.
References CGridWorkerNode::m_Impl.
Referenced by CGetStatisticsProcessor::Process(), and CWNJobWatcher::x_KillNode().
CNcbiOstream & CGridJobBatchSubmitter::GetOStream | ( | ) |
Get a stream where a client can write an input data for the remote job.
Definition at line 158 of file grid_client.cpp.
References CGridJobBatchSubmitter::CheckIfBatchSubmittedAndPrepareNextJob(), CGridClient::GetMaxServerInputSize(), CGridClient::GetNetCacheAPI(), CGridJobBatchSubmitter::m_GridClient, CGridJobBatchSubmitter::m_GridWrite, CGridJobBatchSubmitter::m_JobIndex, and CGridJobBatchSubmitter::m_Jobs.
Referenced by CGridCommandLineInterfaceApp::SubmitJob_Batch().
CNcbiOstream & CGridClient::GetOStream | ( | ) |
Get a stream where a client can write an input data for the remote job.
Definition at line 93 of file grid_client.cpp.
References CGridClient::GetMaxServerInputSize(), CGridClient::GetNetCacheAPI(), CNetScheduleNewJob::input, CGridClient::m_GridWrite, and CGridClient::m_Job.
Referenced by CGridRPCBaseClient< CAsnBinCompressed >::Ask(), CGridRPCBaseClient< CAsnBinCompressed >::AskStream(), CGridCgiSampleApplication::PrepareJobData(), CGridClientSampleApp::Run(), and CRemoteAppClientSampleApp::Run().
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 CRemoteAppJob::Do(), CRemoteCgiJob::Do(), CSampleJob::Do(), and CCgiWorkerNodeJob::Do().
|
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().
|
protectedpure virtual |
Return page name.
It is used when an instance of CHTMLPage class is created.
Implemented in CGridCgiSampleApplication.
Referenced by CGridCgiApplication::ProcessRequest().
|
inline |
Definition at line 282 of file cgi2rcgi.cpp.
References CGridCgiContext::m_PersistentEntries.
Referenced by CCgi2RCgiApp::PopulatePage().
Definition at line 371 of file cgi2rcgi.cpp.
References map_checker< Container >::end(), map_checker< Container >::find(), kEmptyStr, and CGridCgiContext::m_PersistentEntries.
Referenced by CCgi2RCgiApp::CheckJob(), CCgi2RCgiApp::GetStatus(), and CCgi2RCgiApp::PopulatePage().
Get program version string.
Definition at line 771 of file netschedule_api.cpp.
References CNetScheduleAPI::m_Impl.
Referenced by CRemoteAppJobFactory< TJob, TListener, kName >::GetJobVersion().
|
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().
|
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().
string CGridClient::GetProgressMessage | ( | ) |
Get a job interim message.
Definition at line 259 of file grid_client.cpp.
References buffer, CNetCacheAPI::GetCompoundIDPool(), CGridClient::GetNetCacheAPI(), CGridClient::GetNetScheduleSubmitter(), CNetScheduleSubmitter::GetProgressMsg(), CNetCacheKey::IsValidKey(), CGridClient::m_Job, CGridClient::m_NetCacheAPI, CGridClient::m_UseProgress, CNetScheduleJob::progress_msg, CNetCacheAPI::ReadData(), and string.
Referenced by CGridCgiApplication::x_CheckJobStatus().
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().
void CNetScheduleSubmitter::GetProgressMsg | ( | CNetScheduleJob & | job | ) |
Get progress message.
job | NetSchedule job description structure. The message is taken from the progress_msg field. |
Definition at line 626 of file netschedule_api_submitter.cpp.
Referenced by CGridClient::GetProgressMessage(), and CGridClient::x_CheckAllJobBlobs().
void CNetScheduleExecutor::GetProgressMsg | ( | CNetScheduleJob & | job | ) |
Get progress message.
job | NetSchedule job description structure. The message is taken from progress_msg filed |
Definition at line 488 of file netschedule_api_executor.cpp.
Referenced by SWorkerNodeJobContextImpl::PutProgressMessage().
Definition at line 380 of file cgi2rcgi.cpp.
References NStr::CompareNocase(), ITERATE, CGridCgiContext::m_ParsedQueryString, and value.
Referenced by CGridCgiContext::PullUpPersistentEntry().
Return Queue name.
Definition at line 633 of file netschedule_api_executor.cpp.
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 CRemoteCgiJob::Do(), CRemoteAppLauncher::ExecRemoteApp(), and CAppEnvHolder::GetEnv().
Definition at line 1155 of file grid_worker.cpp.
References CGridWorkerNode::m_Impl.
Return Queue name.
Definition at line 776 of file netschedule_api.cpp.
References CNetScheduleAPI::m_Impl.
Referenced by CNetScheduleNotificationHandler::CheckRequestJobNotification(), and SGridWorkerNodeImpl::GetQueueName().
void CNetScheduleAPI::GetQueueParams | ( | const string & | queue_name, |
TQueueParams & | queue_params | ||
) |
Definition at line 1100 of file netschedule_api.cpp.
void CNetScheduleAPI::GetQueueParams | ( | TQueueParams & | queue_params | ) |
Definition at line 1119 of file netschedule_api.cpp.
unsigned CGridWorkerNode::GetQueueTimeout | ( | ) | const |
Definition at line 1096 of file grid_worker.cpp.
References CGridWorkerNode::m_Impl.
Definition at line 392 of file cgi2rcgi.cpp.
References NStr::CompareNocase(), entries, CCgiRequest::GetEntries(), CCgiContext::GetRequest(), ITERATE, CGridCgiContext::m_CgiContext, and value.
Referenced by CGridCgiContext::PullUpPersistentEntry().
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().
Definition at line 344 of file cgi2rcgi.cpp.
References map_checker< Container >::begin(), map_checker< Container >::end(), NStr::eUrlEnc_URIPath, first(), CCgiContext::GetSelfURL(), CGridCgiContext::m_CgiContext, CGridCgiContext::m_PersistentEntries, NStr::URLEncode(), and value.
string CGridCgiContext::GetSelfURL | ( | void | ) | const |
Get Self URL.
Definition at line 75 of file grid_cgiapp.cpp.
References map_checker< Container >::begin(), map_checker< Container >::end(), first(), CCgiContext::GetSelfURL(), CGridCgiContext::m_CgiContext, CGridCgiContext::m_PersistedEntries, NStr::URLEncode(), and value.
Referenced by CCgi2RCgiApp::CheckIfJobDone(), CCgi2RCgiApp::CheckJob(), CCgi2RCgiApp::PopulatePage(), CGridCgiApplication::ProcessRequest(), and CCgi2RCgiApp::SubmitJob().
size_t CGridWorkerNode::GetServerOutputSize | ( | ) |
Definition at line 760 of file wn_main_loop.cpp.
References CMainLoopThread::m_Impl.
Referenced by CRemoteAppJob::Do().
const CNetScheduleAPI::SServerParams & CNetScheduleAPI::GetServerParams | ( | ) |
Definition at line 1071 of file netschedule_api.cpp.
Referenced by CGridCommandLineInterfaceApp::Cmd_CommitJob(), and SGridWorkerNodeImpl::Run().
const CNetScheduleAPI::SServerParams & CNetScheduleExecutor::GetServerParams | ( | ) |
Retrieve queue parameters from the server.
Definition at line 150 of file netschedule_api_executor.cpp.
CNetService CNetScheduleAPI::GetService | ( | ) |
Definition at line 908 of file netschedule_api.cpp.
References CNetScheduleAPI::m_Impl.
Referenced by SNetScheduleJobReaderImpl::CImpl::CheckEntry(), CGridCommandLineInterfaceApp::Cmd_Exec(), CGridCommandLineInterfaceApp::Cmd_QueueInfo(), CGridCommandLineInterfaceApp::Cmd_Resume(), CGridCommandLineInterfaceApp::Cmd_ServerInfo(), CGridCommandLineInterfaceApp::Cmd_Stats(), CGridCommandLineInterfaceApp::Cmd_Suspend(), NAutomation::SNetScheduleServer::Create(), NAutomation::SNetScheduleService::ExecGetServers(), g_GetWorkerNodeInfo(), g_QueueClassInfoToJson(), g_QueueInfoToJson(), g_ReconfAndReturnJson(), g_ResumeNetSchedule(), g_SuspendNetSchedule(), NAutomation::SNetScheduleService::GetService(), NAutomation::SWorkerNode::GetService(), CCgi2RCgiApp::GetStatus(), CGridCommandLineInterfaceApp::PrintNetScheduleStats(), CGridCommandLineInterfaceApp::PrintNetScheduleStats_Generic(), CGetStatisticsProcessor::Process(), CNetScheduleAPI::SetCommunicationTimeout(), and CGridCommandLineInterfaceApp::SetUp_NetScheduleCmd().
Definition at line 643 of file netschedule_api_executor.cpp.
Definition at line 1165 of file grid_worker.cpp.
References CGridWorkerNode::m_Impl.
Referenced by CRemoteCgiJob::Do(), and CAppEnvHolder::GetEnv().
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 CSampleJob::Do(), CJobContextProcessWatcher::OnStart(), CJobContextProcessWatcher::Watch(), and SWorkerNodeJobContextImpl::x_RunJob().
time_t CGridWorkerNode::GetStartupTime | ( | ) | const |
Definition at line 1091 of file grid_worker.cpp.
References CGridWorkerNode::m_Impl.
CNetScheduleAPI::EJobStatus CGridClient::GetStatus | ( | void | ) |
Get a job status.
Definition at line 243 of file grid_client.cpp.
References CNetScheduleSubmitter::GetJobDetails(), CGridClient::GetNetScheduleSubmitter(), CGridClient::m_Job, and CGridClient::x_CheckAllJobBlobs().
Referenced by CRemoteAppClientSampleApp::PrintJobInfo(), CGridClientSampleApp::Run(), CRemoteAppClientSampleApp::Run(), and CGridCgiApplication::x_CheckJobStatus().
|
private |
Definition at line 1336 of file cgi2rcgi.cpp.
References CHTMLPage::AddTagMap(), CNetScheduleAPI::eJobNotFound, ERR_POST, CNetScheduleAPI::eRunning, CNetService::ExcludeServer(), CNetScheduleAPI::GetAdmin(), CNetScheduleAPIExt::GetCompoundIDPool(), GetFastLocalTime(), CGridCgiContext::GetHTMLPage(), CGridCgiContext::GetJobKey(), CException::GetMsg(), CGridCgiContext::GetPersistentEntryValue(), CNetScheduleAdmin::GetQueueInfo(), CNetServiceIterator::GetServer(), CNetService::GetServer(), CNetScheduleAPI::GetService(), ncbi::grid::netcache::search::fields::key, kSinceTime, CCgi2RCgiApp::m_GridClient, CCgi2RCgiApp::m_NetScheduleAPI, CCgi2RCgiApp::m_TargetEncodeMode, NStr::StringToUInt(), and NStr::StringToUInt8().
Referenced by CCgi2RCgiApp::CheckJob().
|
private |
Definition at line 1399 of file cgi2rcgi.cpp.
References CNetScheduleAdmin::DumpJob(), CNetScheduleAPI::eJobNotFound, CNetScheduleAPI::GetAdmin(), CGridCgiContext::GetJobKey(), kStatus, CCgi2RCgiApp::m_NetScheduleAPI, output, s_GetCtgTime(), NStr::StartsWith(), and CNetScheduleAPI::StringToStatus().
Referenced by CCgi2RCgiApp::CheckJob().
CNetScheduleSubmitter CNetScheduleAPI::GetSubmitter | ( | ) |
Create an instance of CNetScheduleSubmitter.
Definition at line 886 of file netschedule_api.cpp.
References CNetScheduleAPI::m_Impl.
Referenced by CGridRPCBaseClient< CAsnBinCompressed >::Ask(), CGridRPCBaseClient< CAsnBinCompressed >::AskStream(), CGI2GRID_ComposeHtmlPage(), CGridCommandLineInterfaceApp::Cmd_CancelJob(), CGridCommandLineInterfaceApp::Cmd_JobInfo(), CCgi2RCgiApp::Init(), CGridClientApp::Init(), CGridCgiApplication::InitGridClient(), CSampleNetScheduleClient::Run(), CGridCommandLineInterfaceApp::SetUp_NetScheduleCmd(), and CGridRPCBaseClient< CAsnBinCompressed >::x_GetJobById().
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().
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.
CGridWorkerNode CWorkerNodeJobContext::GetWorkerNode | ( | ) | const |
Definition at line 119 of file wn_main_loop.cpp.
References CWorkerNodeJobContext::m_Impl.
Referenced by CRemoteAppJob::Do(), CRemoteCgiJob::Do(), CAppEnvHolder::GetEnv(), and CWNJobWatcher::Notify().
|
pure virtual |
Implemented in CSampleJobCleanupListener.
|
inline |
Definition at line 284 of file cgi2rcgi.cpp.
References map_checker< Container >::end(), map_checker< Container >::find(), kSinceTime, and CGridCgiContext::m_PersistentEntries.
Referenced by CCgi2RCgiApp::CheckJob().
void CGridWorkerNode::Init | ( | void | ) |
Definition at line 411 of file grid_worker.cpp.
References CGridWorkerNode::m_Impl.
Referenced by CGridWorkerApp::Init().
|
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().
|
inlinevirtual |
Initialize a worker node factory.
Reimplemented in CRemoteAppJobFactory< TJob, TListener, kName >, CSimpleJobFactoryEx< TWorkerNodeJob, TWorkerNodeIdleTask >, and CSimpleJobFactory< TWorkerNodeJob >.
Definition at line 426 of file grid_worker.hpp.
|
inlinevirtual |
Initialize a worker node factory.
Reimplemented from IWorkerNodeJobFactory.
Reimplemented in CSimpleJobFactoryEx< TWorkerNodeJob, TWorkerNodeIdleTask >.
Definition at line 445 of file grid_worker.hpp.
References CSimpleJobFactory< TWorkerNodeJob >::m_WorkerNodeInitContext.
|
inlinevirtual |
Initialize a worker node factory.
Reimplemented from CSimpleJobFactory< TWorkerNodeJob >.
Definition at line 469 of file grid_worker.hpp.
References ERR_POST_XX, CSimpleJobFactoryEx< TWorkerNodeJob, TWorkerNodeIdleTask >::m_IdleTask, and CSimpleJobFactory< TWorkerNodeJob >::m_WorkerNodeInitContext.
|
virtual |
If you override this method, do call CGridClientApp::Init() from inside your overriding method.
Reimplemented from CNcbiApplicationAPI.
Reimplemented in CRemoteAppClientSampleApp, and CGridClientSampleApp.
Definition at line 42 of file grid_client_app.cpp.
References cleanup(), CGridClient::eAutomaticCleanup, CGridClient::eManualCleanup, CGridClient::eProgressMsgOff, CGridClient::eProgressMsgOn, CNcbiApplicationAPI::GetConfig(), CGridClientApp::GetProgramVersion(), CNetScheduleAPI::GetSubmitter(), CNcbiApplicationAPI::Init(), kEmptyStr, CGridClientApp::m_GridClient, CNetScheduleAPI::SetProgramVersion(), CGridClientApp::UseAutomaticCleanup(), and CGridClientApp::UseProgressMessage().
Referenced by CRemoteAppClientSampleApp::Init(), and CGridClientSampleApp::Run().
|
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().
|
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().
|
protected |
Initialize grid client.
Definition at line 195 of file grid_cgiapp.cpp.
References CGridClient::eAutomaticCleanup, CGridClient::eManualCleanup, CGridClient::eProgressMsgOff, CGridClient::eProgressMsgOn, IRegistry::eReturn, IRegistry::GetBool(), CNcbiApplicationAPI::GetConfig(), IRegistry::GetInt(), CGridCgiApplication::GetProgramVersion(), CNetScheduleAPI::GetSubmitter(), kEmptyStr, CGridCgiApplication::m_FirstDelay, CGridCgiApplication::m_GridClient, CGridCgiApplication::m_NetCacheAPI, CGridCgiApplication::m_NSClient, CGridCgiApplication::m_RefreshDelay, and CNetScheduleAPI::SetProgramVersion().
Referenced by CGridCgiApplication::Init().
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.
|
protectedvirtual |
Reimplemented from CCgiApplication.
Definition at line 187 of file grid_cgiapp.cpp.
References eCgi_QueryString, entries, CCgiRequest::GetProperty(), and CCgiRequest::ParseEntries().
Definition at line 966 of file grid_worker.cpp.
References CSocketAPI::gethostbyname(), and CGridWorkerNode::m_Impl.
Referenced by CAdminCmdProcessor::Authenticate().
bool CWorkerNodeJobContext::IsJobCommitted | ( | ) | const |
Definition at line 98 of file wn_main_loop.cpp.
References CWorkerNodeJobContext::eCS_NotCommitted, and CWorkerNodeJobContext::m_Impl.
Referenced by CRemoteAppLauncher::FinishJob(), and SOfflineJobContextImpl::x_RunJob().
bool CWorkerNodeJobContext::IsJobLost | ( | ) | const |
Definition at line 109 of file wn_main_loop.cpp.
References CWorkerNodeJobContext::eCS_JobIsLost, and CWorkerNodeJobContext::m_Impl.
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 CRemoteAppJob::Do(), CRemoteCgiJob::Do(), CMonitoredProcessWatcher::MonitorRun(), and SOfflineJobContextImpl::x_RunJob().
bool CWorkerNodeIdleTaskContext::IsShutdownRequested | ( | ) | const |
Definition at line 266 of file grid_worker.cpp.
References CWorkerNodeIdleThread::IsShutdownRequested(), and CWorkerNodeIdleTaskContext::m_Thread.
Referenced by CSampleIdleTask::Run().
bool CGridWorkerNode::IsSuspended | ( | ) | const |
Definition at line 1150 of file grid_worker.cpp.
References CGridWorkerNode::m_Impl.
Referenced by CGetStatisticsProcessor::Process().
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.
runtime_inc | Estimated 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().
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.
runtime_inc | Estimated 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().
|
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().
|
private |
Definition at line 933 of file cgi2rcgi.cpp.
References CNetScheduleAPI::eJobNotFound, CNetScheduleException::eJobNotFound, ERR_POST, SInputValidator::GetDeadline(), CException::GetErrCode(), CNetScheduleAPI::GetJobDetails(), SInputValidator::GetListenJobs(), CCgi2RCgiApp::m_GridClient, CCgi2RCgiApp::m_NetScheduleAPI, CCgi2RCgiApp::m_Response, out(), CCgiResponse::out(), s_IsPendingOrRunning(), CNetScheduleAPI::StringToStatus(), and Warning().
Referenced by CCgi2RCgiApp::ProcessRequest().
void CGridCgiContext::LoadQueryStringTags | ( | CHTMLPlainText::EEncodeMode | encode_mode | ) |
Definition at line 443 of file cgi2rcgi.cpp.
References CGridCgiContext::AddTagMap(), SInputValidator::CheckEntry(), ITERATE, CGridCgiContext::m_InputValidator, and CGridCgiContext::m_ParsedQueryString.
Referenced by CCgi2RCgiApp::ProcessRequest().
Definition at line 1599 of file cgi2rcgi.cpp.
References CNcbiApplicationAPI::AppMain(), GetDiagContext(), GRID_APP_CHECK_VERSION_ARGS, and CDiagContext::SetOldPostFormat().
CGridClientException::NCBI_EXCEPTION_DEFAULT | ( | CGridClientException | , |
CException | |||
) |
CGridWorkerNodeException::NCBI_EXCEPTION_DEFAULT | ( | CGridWorkerNodeException | , |
CException | |||
) |
CNetScheduleException::NCBI_EXCEPTION_DEFAULT | ( | CNetScheduleException | , |
CNetServiceException | |||
) |
|
inline |
Definition at line 291 of file cgi2rcgi.cpp.
References CGridCgiContext::m_NeedMetaRefresh.
Referenced by CCgi2RCgiApp::DefineRefreshTags().
|
inline |
Definition at line 102 of file grid_cgiapp.hpp.
References CGridCgiContext::m_NeedRenderPage.
Referenced by CGridCgiApplication::ProcessRequest(), and CCgi2RCgiApp::ProcessRequest().
|
inline |
Definition at line 290 of file cgi2rcgi.cpp.
References CGridCgiContext::m_NeedRenderPage, and value.
|
inline |
Definition at line 381 of file grid_worker.hpp.
References CWorkerNodeIdleTaskContext::m_RunAgain.
|
pure virtual |
Implemented in CWNJobWatcher, and CIdleWatcher.
|
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().
|
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().
|
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().
|
private |
Definition at line 1546 of file cgi2rcgi.cpp.
References ctx, CCgi2RCgiApp::DefineRefreshTags(), CHTMLPlainText::eHTMLEncode, CHTMLPlainText::eJSONEncode, get_results(), CCgi2RCgiApp::m_DisplayDonePage, CCgi2RCgiApp::m_GridClient, CCgi2RCgiApp::m_RefreshDelay, CCgi2RCgiApp::m_TargetEncodeMode, and CCgi2RCgiApp::ReadJob().
Referenced by CCgi2RCgiApp::CheckIfJobDone().
|
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().
|
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().
|
private |
Definition at line 1583 of file cgi2rcgi.cpp.
References ctx, CCgi2RCgiApp::DefineRefreshTags(), kEmptyStr, kSinceTime, CCgi2RCgiApp::m_FallBackDelay, CCgi2RCgiApp::m_FallBackUrl, and CCgi2RCgiApp::m_TargetEncodeMode.
Referenced by CCgi2RCgiApp::CheckIfJobDone(), CCgi2RCgiApp::ProcessRequest(), CCgi2RCgiApp::ReadJob(), and CCgi2RCgiApp::SubmitJob().
|
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().
|
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().
|
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().
|
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().
|
inline |
Definition at line 540 of file grid_worker.hpp.
|
inline |
Definition at line 87 of file netschedule_api.hpp.
|
inline |
Definition at line 587 of file netschedule_api.hpp.
|
inline |
Definition at line 778 of file netschedule_api.hpp.
|
inline |
Definition at line 393 of file netschedule_api.hpp.
|
inline |
Definition at line 197 of file grid_worker.hpp.
|
inline |
Definition at line 540 of file grid_worker.hpp.
|
inline |
Definition at line 87 of file netschedule_api.hpp.
|
inline |
Definition at line 587 of file netschedule_api.hpp.
|
inline |
Definition at line 778 of file netschedule_api.hpp.
|
inline |
Definition at line 393 of file netschedule_api.hpp.
|
inline |
Definition at line 197 of file grid_worker.hpp.
Definition at line 231 of file cgi2rcgi.cpp.
References _ASSERT, IRegistry::GetString(), and SExceptionMessage::m_Registry.
|
inline |
Definition at line 197 of file grid_worker.hpp.
|
inline |
Definition at line 540 of file grid_worker.hpp.
|
inline |
Definition at line 87 of file netschedule_api.hpp.
|
inline |
Definition at line 393 of file netschedule_api.hpp.
|
inline |
Definition at line 587 of file netschedule_api.hpp.
|
inline |
Definition at line 778 of file netschedule_api.hpp.
|
inline |
Definition at line 197 of file grid_worker.hpp.
|
inline |
Definition at line 540 of file grid_worker.hpp.
|
inline |
Definition at line 87 of file netschedule_api.hpp.
|
inline |
Definition at line 393 of file netschedule_api.hpp.
|
inline |
Definition at line 587 of file netschedule_api.hpp.
|
inline |
Definition at line 778 of file netschedule_api.hpp.
|
inline |
Definition at line 197 of file grid_worker.hpp.
|
inline |
Definition at line 540 of file grid_worker.hpp.
|
inline |
Definition at line 87 of file netschedule_api.hpp.
|
inline |
Definition at line 393 of file netschedule_api.hpp.
|
inline |
Definition at line 587 of file netschedule_api.hpp.
|
inline |
Definition at line 778 of file netschedule_api.hpp.
|
inline |
Definition at line 197 of file grid_worker.hpp.
|
inline |
Definition at line 540 of file grid_worker.hpp.
|
inline |
Definition at line 87 of file netschedule_api.hpp.
|
inline |
Definition at line 393 of file netschedule_api.hpp.
|
inline |
Definition at line 587 of file netschedule_api.hpp.
|
inline |
Definition at line 778 of file netschedule_api.hpp.
CNcbiOstream& operator<< | ( | CNcbiOstream & | out, |
SJobs | jobs | ||
) |
Definition at line 1028 of file cgi2rcgi.cpp.
References delimiter, NStr::eJsonEnc_Quoted, NStr::JsonEncode(), out(), and CNetScheduleAPI::StatusToString().
|
private |
|
private |
|
private |
|
private |
|
inline |
Definition at line 540 of file grid_worker.hpp.
|
inline |
Definition at line 87 of file netschedule_api.hpp.
Referenced by CNetScheduleAPIExt::operator=().
|
inline |
Definition at line 587 of file netschedule_api.hpp.
|
inline |
Definition at line 778 of file netschedule_api.hpp.
|
inline |
Definition at line 393 of file netschedule_api.hpp.
|
inline |
Definition at line 197 of file grid_worker.hpp.
bool CNetScheduleKey::ParseJobKey | ( | const string & | key_str, |
CCompoundIDPool::TInstance | id_pool = NULL |
||
) |
Definition at line 62 of file netschedule_key.cpp.
References eCIT_DatabaseName, eCIT_Host, eCIT_ID, eCIT_IPv4SockAddr, eCIT_Port, CCompoundIDPool::FromString(), CCompoundIDField::GetDatabaseName(), CCompoundID::GetFirst(), CCompoundIDField::GetHost(), CCompoundIDField::GetID(), CCompoundIDField::GetIPv4Address(), CCompoundIDField::GetPort(), isdigit(), NS_KEY_V1_PREFIX, NS_KEY_V1_PREFIX_LEN, CSocketAPI::ntoa(), NULL, and version.
Referenced by CGridCommandLineInterfaceApp::Cmd_WhatIs(), and g_WhatIs().
|
private |
Definition at line 1175 of file cgi2rcgi.cpp.
References CGridCgiContext::AddTagMap(), CHTMLPage::AddTagMap(), CTimeSpan::AsString(), CTime::AsString(), map_checker< Container >::begin(), map_checker< Container >::end(), CHTMLPlainText::eNoEncode, ERR_POST, GetFastLocalTime(), CGridCgiContext::GetHTMLPage(), CGridCgiContext::GetJobKey(), CGridCgiContext::GetPersistentEntries(), CGridCgiContext::GetPersistentEntryValue(), CGridCgiContext::GetSelfURL(), NStr::HtmlEncode(), HTTP_NCBI_JSID, kSinceTime, CCgi2RCgiApp::m_AddJobIdToHeader, CCgi2RCgiApp::m_DateFormat, CCgi2RCgiApp::m_ElapsedTimeFormat, CCgi2RCgiApp::m_GridClient, CCgi2RCgiApp::m_HTMLPassThrough, CCgi2RCgiApp::m_Page, CCgi2RCgiApp::m_Response, CCgi2RCgiApp::m_TargetEncodeMode, CCgiResponse::SetHeaderValue(), CGridCgiContext::SetJobProgressMessage(), CTime::SetTimeT(), and NStr::StringToInt().
Referenced by CCgi2RCgiApp::ProcessRequest().
|
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().
void CGridJobBatchSubmitter::PrepareNextJob | ( | ) |
Definition at line 179 of file grid_client.cpp.
References CGridJobBatchSubmitter::CheckIfBatchAlreadySubmitted(), CGridJobBatchSubmitter::m_GridWrite, CGridJobBatchSubmitter::m_JobIndex, CGridJobBatchSubmitter::m_Jobs, and SGridWrite::Reset().
Referenced by CGridJobBatchSubmitter::CheckIfBatchSubmittedAndPrepareNextJob(), and CGridCommandLineInterfaceApp::SubmitJob_Batch().
|
virtual |
Do not override this method yourself! – it includes all the GRIDCGI specific machinery.
If you override it, do call CGridCgiApplication::ProcessRequest() from inside your overriding method.
Implements CCgiApplication.
Definition at line 242 of file grid_cgiapp.cpp.
References CGridClient::CancelJob(), CGridCgiContext::Clear(), CGridCgiApplication::CollectParams(), ctx, CNCBINode::eHTML, ERR_POST_X, CNetScheduleException::eTooManyPendingJobs, CGridCgiContext::GetEntryValue(), CException::GetErrCode(), CGridCgiApplication::GetGridClient(), CGridCgiContext::GetHiddenFields(), CGridCgiApplication::GetPageTemplate(), CGridCgiApplication::GetPageTitle(), CNcbiApplicationAPI::GetRWConfig(), CGridCgiContext::GetSelfURL(), kGridCgiForm, CGridCgiApplication::m_FirstDelay, CGridCgiApplication::m_RefreshDelay, CGridCgiApplication::m_Response, CGridCgiContext::NeedRenderPage(), CGridCgiApplication::OnBeginProcessRequest(), CGridCgiApplication::OnEndProcessRequest(), CGridCgiApplication::OnJobFailed(), CGridCgiApplication::OnJobSubmitted(), CGridCgiApplication::OnQueueIsBusy(), CCgiResponse::out(), CGridCgiApplication::PrepareJobData(), CGridCgiContext::PullUpPersistentEntry(), CGridCgiApplication::RenderRefresh(), CGridCgiContext::SetJobKey(), CGridCgiApplication::ShowParamsPage(), SleepMilliSec(), CGridClient::Submit(), CException::what(), CCgiResponse::WriteHeader(), CGridCgiApplication::x_CheckJobStatus(), and CGridCgiApplication::x_JobStopRequested().
|
virtual |
This is the method you should override.
It is called whenever the CGI application gets a syntaxically valid HTTP request.
context | Contains the parameters of the HTTP request |
Implements CCgiApplication.
Definition at line 807 of file cgi2rcgi.cpp.
References CNetScheduleAPIExt::AddToClientNode(), CCgi2RCgiApp::CheckJob(), ctx, eCgi_QueryString, eCgi_ServerPort, CHTMLPlainText::eHTMLEncode, entries, env, ERR_POST, CCgiRequest::GetEntries(), CGridCgiContext::GetJobKey(), CGridCgiContext::GetJqueryCallback(), CCgiRequest::GetPropertyName(), kGridCgiForm, kPlainTextView, kSinceTime, CCgi2RCgiApp::ListenJobs(), CGridCgiContext::LoadQueryStringTags(), CCgi2RCgiApp::m_ContentType, CCgi2RCgiApp::m_CustomHTTPHeader, CCgi2RCgiApp::m_ExceptionMessage, CCgi2RCgiApp::m_HTMLPassThrough, CCgi2RCgiApp::m_HtmlTemplate, CCgi2RCgiApp::m_InputValidator, CCgi2RCgiApp::m_InterceptJQueryCallback, CCgi2RCgiApp::m_NetScheduleAPI, CCgi2RCgiApp::m_Page, CCgi2RCgiApp::m_PortAdded, CCgi2RCgiApp::m_Response, CCgi2RCgiApp::m_TargetEncodeMode, CCgi2RCgiApp::m_Title, CGridCgiContext::NeedRenderPage(), CCgi2RCgiApp::OnJobFailed(), CCgi2RCgiApp::PopulatePage(), CGridCgiContext::PullUpPersistentEntry(), CCgi2RCgiApp::RenderPage(), CCgiResponse::RequireWriteHeader(), s_RemoveCallbackParameter(), CCgiResponse::SetContentType(), CNcbiApplicationAPI::SetEnvironment(), CCgi2RCgiApp::SubmitJob(), and CNetScheduleAPIExt::UpdateAuthString().
Save this entry as a cookie add it to serf url.
Definition at line 405 of file cgi2rcgi.cpp.
References kEmptyStr, and value.
Referenced by CGridCgiApplication::ProcessRequest(), CCgi2RCgiApp::ProcessRequest(), and CCgi2RCgiApp::SubmitJob().
void CGridCgiContext::PullUpPersistentEntry | ( | const string & | entry_name, |
string & | value, | ||
int | pulling = eDefaultPulling |
||
) |
Definition at line 411 of file cgi2rcgi.cpp.
References SInputValidator::CheckEntry(), CGridCgiContext::DefinePersistentEntry(), fMakePersistent, fUseQueryString, fUseRequestContent, CGridCgiContext::GetQueryStringEntryValue(), CGridCgiContext::GetRequestEntryValue(), CGridCgiContext::m_InputValidator, NStr::TruncateSpacesInPlace(), and value.
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.
job | NetSchedule job description structure. its error_msg and optionally ret_code and output fields should be set |
no_retries | Instruct 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().
|
protected |
Definition at line 201 of file remote_cgiapp.cpp.
References CRemoteCgiApp::m_JobContext, and SWorkerNodeJobContextImpl::PutProgressMessage().
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 CSampleJob::Do(), CMonitoredProcessWatcher::MonitorRun(), and CRemoteAppTimeoutReporter::Report().
void CNetScheduleExecutor::PutProgressMsg | ( | const CNetScheduleJob & | job | ) |
Put job interim (progress) message.
job | NetSchedule job description structure. its progerss_msg field should be set to a NetCache key that contains the actual progress message. |
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().
void CNetScheduleExecutor::PutResult | ( | const CNetScheduleJob & | job | ) |
Put job result (job should be received by GetJob() or WaitJob())
job | NetSchedule job description structure. its ret_code and output fields should be set |
Definition at line 452 of file netschedule_api_executor.cpp.
References CNetScheduleJob::auth_token, cmd, g_AppendClientIPSessionIDHitID(), CNetScheduleNewJob::job_id, NStr::NumericToString(), CNetScheduleJob::output, NStr::PrintableString(), CNetScheduleJob::ret_code, and s_CheckOutputSize().
Referenced by CGridCommandLineInterfaceApp::Cmd_CommitJob(), CGridCommandLineInterfaceApp::NetScheduleSanityCheck(), CSampleNetScheduleNode::Run(), and CJobCommitterThread::x_CommitJob().
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.
job_id | Placeholder for storing the identifier of the job that's done or failed. |
auth_token | Placeholder for storing a reading reservation token, which guarantees that no other caller will be given the same job for reading. |
job_status | Placeholder for storing the status of the job, either eDone or eFailed. |
timeout | Number 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_group | Only consider jobs belonging to the specified group. |
Definition at line 298 of file netschedule_api_submitter.cpp.
References cmd, CNetService::eRandomize, g_AppendClientIPSessionIDHitID(), NULL, and NStr::UIntToString().
Mark the specified job as successfully retrieved.
The job will change its status to 'Confirmed' after this operation.
Definition at line 342 of file netschedule_api_submitter.cpp.
References kEmptyStr.
Referenced by CGridCommandLineInterfaceApp::Cmd_ReadJob().
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'.
job_id | Job key returned by Read(). |
auth_token | Reservation token returned by Read(). |
error_message | This 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().
|
private |
Definition at line 1480 of file cgi2rcgi.cpp.
References ctx, NStr::eNocase, ERR_POST, NStr::eTrunc_End, HTTP_NCBI_JSID, CCgi2RCgiApp::m_AddJobIdToHeader, CCgi2RCgiApp::m_ExceptionMessage, CCgi2RCgiApp::m_Response, NcbiStreamCopy(), CCgi2RCgiApp::OnJobFailed(), out(), CCgiResponse::out(), CException::ReportAll(), NStr::StartsWith(), NStr::TruncateSpacesInPlace(), Warning(), and CException::what().
Referenced by CCgi2RCgiApp::OnJobDone().
CNetScheduleJobReader::EReadNextJobResult CNetScheduleJobReader::ReadNextJob | ( | CNetScheduleJob * | job, |
CNetScheduleAPI::EJobStatus * | job_status, | ||
const CTimeout * | timeout = NULL |
||
) |
Wait and return the next completed job.
job | Structure to fill with information about the job. The following fields of the structure will be filled:
|
job_status | Pointer to a variable where to store the final status of the job. |
timeout | Timeout 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().
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.
Definition at line 349 of file netschedule_api_submitter.cpp.
References kEmptyStr.
Referenced by CGridCommandLineInterfaceApp::Cmd_ReadJob().
Definition at line 74 of file grid_client.cpp.
References CNetCacheAPI::GetCompoundIDPool(), CNetCacheKey::IsValidKey(), CGridClient::m_NetCacheAPI, and CNetCacheAPI::Remove().
Referenced by CGridClient::x_CheckAllJobBlobs().
|
pure virtual |
Implemented in CWorkerNodeJobCleanup, and CWorkerNodeCleanup.
|
private |
Definition at line 1227 of file cgi2rcgi.cpp.
References CNCBINode::eHTML, NStr::eNocase, CNCBINode::ePlainText, ERR_POST, NStr::fSplit_MergeDelimiters, NStr::fSplit_Truncate, isspace(), CCgi2RCgiApp::m_CustomHTTPHeader, CCgi2RCgiApp::m_HtmlIncs, CCgi2RCgiApp::m_Page, CCgi2RCgiApp::m_Response, CCgi2RCgiApp::m_Title, out(), CCgiResponse::out(), CCgiResponse::SetStatus(), NStr::SplitInTwo(), NStr::StartsWith(), NStr::StringToUInt(), NStr::TruncateSpaces(), NStr::TruncateSpacesInPlace(), Warning(), and CCgiResponse::WriteHeader().
Referenced by CCgi2RCgiApp::ProcessRequest().
|
protected |
Definition at line 372 of file grid_cgiapp.cpp.
References CHTMLPage::AddTagMap(), NStr::IntToString(), CGridCgiApplication::m_Response, and CCgiResponse::SetHeaderValue().
Referenced by CGridCgiApplication::ProcessRequest().
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.
void CWorkerNodeIdleTaskContext::RequestShutdown | ( | void | ) |
Definition at line 275 of file grid_worker.cpp.
References CNetScheduleAdmin::eShutdownImmediate, CGridGlobals::GetInstance(), CWorkerNodeIdleTaskContext::m_Thread, and CWorkerNodeIdleThread::RequestShutdown().
void CGridWorkerNode::RequestShutdown | ( | void | ) |
Definition at line 930 of file grid_worker.cpp.
References CNetScheduleAdmin::eShutdownImmediate, and CGridGlobals::GetInstance().
Referenced by CGridWorkerApp::RequestShutdown().
void CRemoteCgiApp::RequestShutdown | ( | void | ) |
Definition at line 161 of file remote_cgiapp.cpp.
References CRemoteCgiApp::m_AppImpl.
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().
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.
void CGridJobBatchSubmitter::Reset | ( | void | ) |
Definition at line 199 of file grid_client.cpp.
References CGridJobBatchSubmitter::m_GridWrite, CGridJobBatchSubmitter::m_HasBeenSubmitted, CGridJobBatchSubmitter::m_JobIndex, CGridJobBatchSubmitter::m_Jobs, and SGridWrite::Reset().
Referenced by CGridClient::GetJobBatchSubmitter(), and CGridCommandLineInterfaceApp::SubmitJob_Batch().
void CWorkerNodeIdleTaskContext::Reset | ( | void | ) |
Definition at line 270 of file grid_worker.cpp.
References CWorkerNodeIdleTaskContext::m_RunAgain.
Referenced by CWorkerNodeIdleThread::Main().
|
inline |
Definition at line 314 of file netschedule_api.hpp.
References CNetScheduleNewJob::affinity, CNetScheduleAPI::eEmptyMask, CNetScheduleNewJob::group, CNetScheduleNewJob::input, CNetScheduleNewJob::job_id, and CNetScheduleNewJob::mask.
Referenced by CNetScheduleJob::Reset().
|
inline |
Definition at line 352 of file netschedule_api.hpp.
References CNetScheduleJob::auth_token, CNetScheduleJob::client_ip, CNetScheduleJob::error_msg, NULL, CNetScheduleJob::output, CNetScheduleJob::page_hit_id, CNetScheduleJob::progress_msg, CNetScheduleNewJob::Reset(), CNetScheduleJob::ret_code, CNetScheduleJob::server, and CNetScheduleJob::session_id.
Referenced by CJobCommitterThread::AllocJobContext(), CMostAffinityJob< TImpl >::Interrupt(), CGridClient::SetJobKey(), and CGridClient::Submit().
void CGridWorkerNode::Resume | ( | ) |
Definition at line 429 of file grid_worker.cpp.
References CGridWorkerNode::m_Impl.
Referenced by CResumeProcessor::Process().
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.
Definition at line 197 of file wn_main_loop.cpp.
References CWorkerNodeJobContext::eCS_Return, and CWorkerNodeJobContext::m_Impl.
Referenced by CSampleJob::Do(), CRemoteAppLauncher::FinishJob(), CMonitoredProcessWatcher::MonitorRun(), and CJobContextProcessWatcher::Watch().
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().
|
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().
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().
|
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.
Reimplemented from CCgiApplication.
Definition at line 155 of file remote_cgiapp.cpp.
References CRemoteCgiApp::m_AppImpl.
|
private |
Definition at line 172 of file remote_cgiapp.cpp.
References CCgiApplication::ConfigureDiagnostics(), CCgiApplication::eEndRequest, CCgiApplication::eError, CCgiApplication::eException, CCgiApplication::eExit, CCgiApplication::eSuccess, CCgiRequest::fSetDiagProperties, CRemoteCgiApp::m_JobContext, CCgiApplication::m_RequestFlags, NULL, CCgiApplication::OnEvent(), CCgiApplication::OnException(), CCgiContext::ProcessCORSRequest(), and CCgiApplication::ProcessRequest().
Referenced by CCgiWorkerNodeJob::Do().
void s_GetCtgTime | ( | CGridCgiContext & | grid_ctx, |
string | event | ||
) |
Definition at line 1381 of file cgi2rcgi.cpp.
References column, CGridCgiContext::DefinePersistentEntry(), CAttrListParser::eNoMoreAttributes, kSinceTime, CAttrListParser::NextAttribute(), NStr::NumericToString(), CAttrListParser::Reset(), and value.
Referenced by CCgi2RCgiApp::GetStatusAndCtgTime().
|
inline |
Definition at line 908 of file cgi2rcgi.cpp.
References CNetScheduleAPI::ePending, and CNetScheduleAPI::eRunning.
Referenced by CCgi2RCgiApp::ListenJobs(), and CCgi2RCgiApp::SubmitJob().
Definition at line 788 of file cgi2rcgi.cpp.
References CALLBACK_PARAM, NStr::Find(), NPOS, and NULL.
Referenced by CCgi2RCgiApp::ProcessRequest().
Definition at line 457 of file cgi2rcgi.cpp.
References CHTMLPage::AddTagMap(), CGridCgiContext::m_CustomHTTPHeader, and CGridCgiContext::m_Page.
Referenced by CCgi2RCgiApp::CheckIfJobDone(), and CCgi2RCgiApp::SubmitJob().
|
inline |
Definition at line 109 of file cgi2rcgi.cpp.
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().
Definition at line 1132 of file netschedule_api.cpp.
References NCBI_THROW_FMT.
Referenced by SGridWorkerNodeImpl::Run().
Definition at line 1147 of file netschedule_api.cpp.
References NCBI_THROW_FMT.
void CNetScheduleAPI::SetClientType | ( | CNetScheduleAPI::EClientType | client_type | ) |
Definition at line 1169 of file netschedule_api.cpp.
Referenced by NAutomation::SNetScheduleService::ExecSetClientType(), and CGridCommandLineInterfaceApp::SetUp_NetScheduleCmd().
Definition at line 256 of file netschedule_api.hpp.
References CNetService::GetServerPool(), CNetScheduleAPI::GetService(), and CNetServerPool::SetCommunicationTimeout().
void CGridCgiContext::SetCompleteResponse | ( | CNcbiIstream & | is | ) |
Definition at line 169 of file grid_cgiapp.cpp.
References CCgiContext::GetResponse(), CGridCgiContext::m_CgiContext, CGridCgiContext::m_NeedRenderPage, and CCgiResponse::out().
Set a job affinity.
Definition at line 172 of file grid_client.cpp.
References CGridJobBatchSubmitter::CheckIfBatchSubmittedAndPrepareNextJob(), CGridJobBatchSubmitter::m_JobIndex, and CGridJobBatchSubmitter::m_Jobs.
Referenced by CGridCommandLineInterfaceApp::SubmitJob_Batch().
Definition at line 223 of file grid_client.hpp.
References CNetScheduleNewJob::affinity, and CGridClient::m_Job.
Definition at line 221 of file grid_client.hpp.
References CNetScheduleNewJob::group, and CGridClient::m_Job.
Retrieve jobs from the specified group only.
Definition at line 166 of file netschedule_api_executor.cpp.
Referenced by CGridCommandLineInterfaceApp::SetUp_NetScheduleCmd().
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.
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.
Definition at line 121 of file grid_cgiapp.hpp.
References input(), and CGridCgiContext::m_JobInput.
Referenced by CGridCgiApplication::x_CheckJobStatus().
Definition at line 289 of file grid_client.cpp.
References CNetScheduleNewJob::job_id, CGridClient::m_BlobSize, CGridClient::m_GridRead, CGridClient::m_Job, CGridClient::m_JobDetailsRead, SGridRead::Reset(), and CNetScheduleJob::Reset().
Referenced by CRemoteAppClientSampleApp::PrintJobInfo(), CGridClientSampleApp::Run(), CRemoteAppClientSampleApp::Run(), and CGridCgiApplication::x_CheckJobStatus().
Definition at line 111 of file grid_cgiapp.cpp.
References CGridCgiContext::DefinePersistentEntry().
Referenced by CGridCgiApplication::ProcessRequest().
void CGridJobBatchSubmitter::SetJobMask | ( | CNetScheduleAPI::TJobMask | mask | ) |
Set a job mask.
Definition at line 165 of file grid_client.cpp.
References CGridJobBatchSubmitter::CheckIfBatchSubmittedAndPrepareNextJob(), CGridJobBatchSubmitter::m_JobIndex, CGridJobBatchSubmitter::m_Jobs, and mask.
Referenced by CGridCommandLineInterfaceApp::SubmitJob_Batch().
|
inline |
Definition at line 219 of file grid_client.hpp.
References CGridClient::m_Job, CNetScheduleNewJob::mask, and mask.
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.
Definition at line 122 of file grid_cgiapp.hpp.
References CGridCgiContext::m_JobOutput, and output.
Referenced by CGridCgiApplication::x_CheckJobStatus().
Definition at line 119 of file grid_cgiapp.hpp.
References CGridCgiContext::m_ProgressMsg.
Referenced by CCgi2RCgiApp::PopulatePage(), and CGridCgiApplication::x_CheckJobStatus().
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().
void CGridWorkerNode::SetListener | ( | IGridWorkerNodeApp_Listener * | listener | ) |
Definition at line 946 of file grid_worker.cpp.
References CGridWorkerNode::m_Impl.
Referenced by CGridWorkerApp::SetListener().
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().
|
inline |
Definition at line 380 of file grid_worker.hpp.
References CWorkerNodeIdleTaskContext::m_RunAgain.
Referenced by CSampleIdleTask::Run().
|
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().
|
inline |
Definition at line 229 of file cgi2rcgi.cpp.
|
protectedpure virtual |
Show a page with input data.
Implemented in CGridCgiSampleApplication.
Referenced by CGridCgiApplication::ProcessRequest().
SInputValidator::SInputValidator | ( | ) |
Definition at line 144 of file cgi2rcgi.cpp.
References SInputValidator::CheckCancel(), SInputValidator::CheckCtgTime(), SInputValidator::CheckGetResults(), SInputValidator::CheckJobKey(), SInputValidator::GetDeadline(), and SInputValidator::GetListenJobs().
Definition at line 925 of file cgi2rcgi.cpp.
References CNetScheduleNewJob::job_id.
|
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.