output_stream(target_file.c_str(), CNcbiOfstream::binary);
52 boolneed_space =
false;
55output_stream <<
"affinity=\""<<
62output_stream <<
' ';
63output_stream <<
"group=\""<<
70output_stream <<
' ';
71output_stream <<
"exclusive";
77 CRStreamjob_input_istream(&job_input_reader);
85 CNcbiIfstreaminput_stream(source_file.c_str(), CNcbiIfstream::binary);
87 if(input_stream.fail() && !input_stream.eof()) {
89 "Error while reading job input from '"<< source_file <<
'\'');
93getline(input_stream, header);
96attr_parser.
Reset(header);
104 #define ATTR_POS " at column "<< attr_column
108 if(attr_name ==
"affinity")
110 else if(attr_name ==
"group")
112 else if(attr_name ==
"exclusive") {
117 "unknown attribute '"<< attr_name <<
"'" ATTR_POS);
122 "attribute '"<< attr_name <<
"' requires a value" ATTR_POS);
126 if(!input_stream.eof()) {
129 CWStreamjob_input_ostream(&job_input_writer, 0,
NULL);
139 const string& target_dir,
145 CNcbiOfstreamoutput_stream(target_file.c_str(), CNcbiOfstream::binary);
152output_stream <<
" error_msg=\""<<
159 CRStreamjob_output_istream(&job_output_reader);
ENextAttributeType NextAttribute(CTempString *attr_name, string *attr_value, size_t *attr_column)
void Reset(const char *position, const char *eol)
Client API for NetCache server.
string SaveJobInput(const string &target_dir, CNetCacheAPI &nc_api)
string SaveJobOutput(CNetScheduleAPI::EJobStatus job_status, const string &target_dir, CNetCacheAPI &nc_api)
void LoadJobInput(const string &source_file)
Note about the "buf_size" parameter for streams in this API.
String or Blob Storage Reader.
String or Blob Storage Writer.
CTempString implements a light-weight string on top of a storage buffer whose lifetime management is ...
Writer-based output stream.
#define NCBI_THROW_FMT(exception_class, err_code, message)
The same as NCBI_THROW but with message processed as output to ostream.
static string ConcatPath(const string &first, const string &second)
Concatenate two parts of the path for the current OS.
EJobStatus
Job status codes.
string output
Job result data.
CNetScheduleAPI::TJobMask mask
int ret_code
Job return code.
static string StatusToString(EJobStatus status)
Printable status type.
string job_id
Output job key.
@ eExclusiveJob
Exclusive job - the node executes only this job, even if there are processor resources.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
IO_PREFIX::ofstream CNcbiOfstream
Portable alias for ofstream.
IO_PREFIX::ifstream CNcbiIfstream
Portable alias for ifstream.
bool NcbiStreamCopy(CNcbiOstream &os, CNcbiIstream &is)
Copy the entire contents of stream "is" to stream "os".
static string PrintableString(const CTempString str, TPrintableMode mode=fNewLine_Quote|fNonAscii_Passthru)
Get a printable version of the specified string.
Reader-writer based streams.
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