m_NetScheduleSubmitter(ns_submitter),
57m_NetCacheAPI(nc_client),
58m_JobBatchSubmitter(*this),
59m_AutoCleanUp(
cleanup== eAutomaticCleanup),
60m_UseProgress(progress_msg == eProgressMsgOn)
118time_t job_exptime = 0;
139 "The batch has been already submitted. " 140 "Use Reset() to start a new one");
208: m_GridClient(grid_client), m_JobIndex(0),
209m_HasBeenSubmitted(
false)
245time_t job_exptime = 0;
267 stringprogress_message_key;
305blob_key <<
": "<< e.
GetMsg());
310 const string& job_field,
unsignedttl)
322time_t current_time = time(
NULL);
323 returnexptime > current_time ? unsigned(exptime - current_time + 1) : 0;
342time_t job_exptime = 0;
ncbi::TMaskedQueryRegions mask
CBlobStorage_NetCache â NetCache-based implementation of IBlobStorage.
Grid Client (the submitter).
Grid Job Batch Submitter.
static void cleanup(void)
static unsigned s_TimeToTtl(time_t time)
NetSchedule Framework specs.
#define ERR_POST(message)
Error posting with file, line number information but without error codes.
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
const string & GetMsg(void) const
Get message string.
void Warning(CExceptionArgs_Base &args)
CCompoundIDPool GetCompoundIDPool()
static bool IsValidKey(const char *key_str, size_t key_len, CCompoundIDPool::TInstance id_pool=NULL)
static bool ParseBlobKey(const char *key_str, size_t key_len, CNetCacheKey *key_obj, CCompoundIDPool::TInstance id_pool=NULL)
Parse blob key string into a CNetCacheKey structure.
void Remove(const string &blob_id, const CNamedParameterList *optional=NULL)
Remove BLOB by key.
void ProlongBlobLifetime(const string &blob_key, unsigned ttl, const CNamedParameterList *optional=NULL)
void ReadData(const string &key, string &buffer, const CNamedParameterList *optional=NULL)
Read the blob pointed to by "key" and store its contents in "buffer".
CNetCacheAPI m_NetCacheAPI
EJobStatus
Job status codes.
CNetScheduleAPI::EJobStatus SubmitAndWait(unsigned wait_time)
Submit a job to the queue.
void SetJobInput(const string &input)
Set a job's input This string will be sent to then the job is submitted.
void Submit(const string &job_group=kEmptyStr)
Submit a batch to the queue.
CNetScheduleAPI::EJobStatus WaitForJob(const string &job_key, unsigned wait_time)
Wait for job to finish its execution (done/failed/canceled).
void SetJobMask(CNetScheduleAPI::TJobMask mask)
Set a job mask.
string output
Job result data.
const string & GetJobInput()
Get a job's input sting.
void RemoveDataBlob(const string &)
void GetProgressMsg(CNetScheduleJob &job)
Get progress message.
void SetJobAffinity(const string &affinity)
Set a job affinity.
void SubmitJobBatch(vector< CNetScheduleJob > &jobs, const string &job_group=kEmptyStr)
Submit job batch.
CGridClient & m_GridClient
void SetJobKey(const string &job_key)
const string & GetErrorMessage()
If something bad has happened this method will return an explanation.
CNetScheduleAPI::EJobStatus GetStatus()
Get a job status.
CGridJobBatchSubmitter(CGridClient &)
CGridClient(CNetScheduleSubmitter::TInstance ns_submitter, IBlobStorage &storage, ECleanUp cleanup, EProgressMsg progress_msg)
Constructor.
CNetScheduleSubmitter GetNetScheduleSubmitter()
void CheckIfBatchAlreadySubmitted()
CNcbiIstream & GetIStream()
Get a stream with a job's result.
string GetProgressMessage()
Get a job interim message.
int ret_code
Job return code.
CNetScheduleAPI::EJobStatus WaitForJob(const string &job_id, unsigned wait_time)
Wait for job to finish its execution (done/failed/canceled).
void CancelJob(const string &job_key)
Cancel Job.
CNetScheduleAPI::EJobStatus GetJobDetails(CNetScheduleJob &job, time_t *job_exptime=NULL, ENetScheduleQueuePauseMode *pause_mode=NULL)
Get full information about the specified job.
string Submit(const string &affinity=kEmptyStr)
Submit a job to the queue.
CNetCacheAPI & GetNetCacheAPI()
int GetReturnCode()
Get a job's return code.
CGridJobBatchSubmitter & GetJobBatchSubmitter()
Get a job submitter.
bool x_ProlongJobFieldLifetime(const string &job_field, unsigned ttl)
void CheckIfBatchSubmittedAndPrepareNextJob()
void x_ProlongBlobLifetime(const string &blob_key, unsigned ttl)
CNcbiOstream & GetOStream()
Get a stream where a client can write an input data for the remote job.
const string & GetJobOutput()
Get a job's output string.
vector< CNetScheduleJob > m_Jobs
CNetScheduleSubmitter m_NetScheduleSubmitter
CGridJobBatchSubmitter m_JobBatchSubmitter
void x_RenewAllJobBlobs(unsigned ttl)
CNetScheduleAPI::EJobStatus x_CheckAllJobBlobs(CNetScheduleAPI::EJobStatus status, time_t job_exptime)
string SubmitJob(CNetScheduleNewJob &job)
Submit job.
size_t GetMaxServerInputSize()
void SetJobInput(const string &input)
Set a job's input This string will be sent to then the job is submitted.
string job_id
Output job key.
void CancelJob(const string &job_key)
Cancel job.
CNcbiOstream & GetOStream()
Get a stream where a client can write an input data for the remote job.
@ eDone
Job is ready (computed successfully)
@ eCanceled
Explicitly canceled.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
IO_PREFIX::ostream CNcbiOstream
Portable alias for ostream.
IO_PREFIX::istream CNcbiIstream
Portable alias for istream.
static bool StartsWith(const CTempString str, const CTempString start, ECase use_case=eCase)
Check if a string starts with a specified prefix value.
void Reset(bool flush=false)
bool m_UseEmbeddedStorage
const CNetScheduleAPI::SServerParams & GetServerParams()
CNetScheduleAPI::EJobStatus SubmitJobAndWait(CNetScheduleJob &job, unsigned wait_time, time_t *job_exptime=NULL)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4