1 #ifndef CONNECT_SERVICES_GRID__GRID_CLIENT__HPP
2 #define CONNECT_SERVICES_GRID__GRID_CLIENT__HPP
69 void SetJobInput(
const string&
input);
82 void SetJobAffinity(
const string& affinity);
84 void PrepareNextJob();
88 void Submit(
const string& job_group =
kEmptyStr);
93 const vector<CNetScheduleJob>&
GetBatch()
const {
return m_Jobs; }
98 void CheckIfBatchAlreadySubmitted();
99 void CheckIfBatchSubmittedAndPrepareNextJob();
121 eAutomaticCleanup = 0,
144 EProgressMsg progress_msg);
160 EProgressMsg progress_msg);
171 const string& GetJobOutput();
174 const string& GetJobInput();
183 const string& GetErrorMessage();
201 string GetProgressMessage();
210 void SetJobInput(
const string&
input);
228 string Submit(
const string& affinity =
kEmptyStr);
246 void SetJobKey(
const string& job_key);
253 void CancelJob(
const string& job_key);
257 return m_NetScheduleSubmitter;
261 size_t GetMaxServerInputSize();
264 void RemoveDataBlob(
const string&);
275 void x_ProlongBlobLifetime(
const string& blob_key,
unsigned ttl);
276 bool x_ProlongJobFieldLifetime(
const string& job_field,
unsigned ttl);
277 void x_RenewAllJobBlobs(
unsigned ttl);
280 void x_GetJobDetails();
282 size_t m_BlobSize = 0;
285 bool m_JobDetailsRead =
false;
Grid Client (the submitter).
Grid Job Batch Submitter.
Client API for NetCache server.
Smart pointer to the job submission part of the NetSchedule API.
static void cleanup(void)
TErrCode GetErrCode(void) const
Get error code.
virtual const char * GetErrCodeString(void) const
Get error code interpreted as text.
CNetCacheAPI m_NetCacheAPI
CGridJobBatchSubmitter & operator=(CGridJobBatchSubmitter &)
EJobStatus
Job status codes.
CGridClient & m_GridClient
CGridJobBatchSubmitter(const CGridJobBatchSubmitter &)
The copy constructor and the assignment operator are prohibited.
CGridClient(const CGridClient &)
The copy constructor and the assignment operator are prohibited.
CNetScheduleSubmitter GetNetScheduleSubmitter()
void SetJobAffinity(const string &affinity)
NCBI_EXCEPTION_DEFAULT(CGridClientException, CException)
CNetScheduleJob & GetJob()
CNetCacheAPI & GetNetCacheAPI()
void SetJobMask(CNetScheduleAPI::TJobMask mask)
virtual const char * GetErrCodeString(void) const override
Get error code interpreted as text.
vector< CNetScheduleJob > m_Jobs
CNetScheduleSubmitter m_NetScheduleSubmitter
CGridJobBatchSubmitter m_JobBatchSubmitter
CGridClient & operator=(const CGridClient &)
size_t GetBlobSize() const
Get the size of an input stream.
const vector< CNetScheduleJob > & GetBatch() const
void SetJobGroup(const string &group)
#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.
#define NCBI_XCONNECT_EXPORT
NCBI C++ stream class wrappers for triggering between "new" and "old" C++ stream libraries.
NetSchedule client specs.
unique_ptr< CObjectIStream > GetIStream(string path, ESerialDataFormat serial_format)