job_props_fixed_size(sizeof(
SJobDump)),
76 throwruntime_error(
strerror(errno));
85 throwruntime_error(
"Incomplete dump file header");
89 throwruntime_error(
strerror(errno));
90 throwruntime_error(
"Unknown dump file header reading error");
96 throwruntime_error(
"Dump file header magic does not match the current one. " 97 "It is an older NetSchedule dump file and cannot be used. " 98 "The old dump files will be deleted.");
101 throwruntime_error(
"Dump file header magic does not match");
117 throwruntime_error(
strerror(errno));
126 throwruntime_error(
"Incomplete dump file header");
130 throwruntime_error(
strerror(errno));
131 throwruntime_error(
"Unknown dump file header reading error");
137 throwruntime_error(
"Dump file header magic does not match the current one. " 138 "It is an older NetSchedule dump file and cannot be used. " 139 "The old dump files will be deleted.");
142 throwruntime_error(
"Dump file header magic does not match");
150memset(
this, 0,
sizeof(
SJobDump));
158 if(fwrite(
this,
sizeof(
SJobDump), 1,
f) != 1)
159 throwruntime_error(
strerror(errno));
164 throwruntime_error(
strerror(errno));
169 size_tfixed_size_from_header,
172memset(
this, 0,
sizeof(
SJobDump));
174 size_tsize_to_read =
min(
sizeof(
SJobDump), fixed_size_from_header);
177 size_tbytes = fread(
this, 1, size_to_read,
f);
178 if(bytes != size_to_read) {
180 throwruntime_error(
"Incomplete job record reading");
184 throwruntime_error(
strerror(errno));
185 throwruntime_error(
"Unknown job record reading error");
187 if(fixed_size_from_header > size_to_read) {
188 size_tbytes_to_skip = fixed_size_from_header - size_to_read;
192 throwruntime_error(
strerror(errno));
193 throwruntime_error(
"Unknown job record skipping error");
198 string msg=
"Client IP has been stripped from "+
202 " (job id "+ to_string(
id) +
")";
208 string msg=
"Client session id has been stripped from "+
212 " (job id "+ to_string(
id) +
")";
218 string msg=
"PHID has been stripped from "+
222 " (job id "+ to_string(
id) +
")";
228 throwruntime_error(
"Job progress message size is more " 229 "than max allowed");
235 throwruntime_error(
"Incomplete job progress message reading");
237 throwruntime_error(
"Unexpected end of job info file. " 238 "Expected a progress message, got EOF");
240 throwruntime_error(
strerror(errno));
241 throwruntime_error(
"Unknown job progress message reading error");
250 throwruntime_error(
strerror(errno));
251 throwruntime_error(
"Unknown job record skipping error");
274 if(fwrite(
this,
sizeof(
SJobIODump), 1,
f) != 1)
275 throwruntime_error(
strerror(errno));
280 throwruntime_error(
strerror(errno));
286 throwruntime_error(
strerror(errno));
296 size_tsize_to_read =
min(
sizeof(
SJobIODump), fixed_size_from_header);
299 size_tbytes = fread(
this, 1, size_to_read,
f);
300 if(bytes != size_to_read) {
302 throwruntime_error(
"Incomplete job i/o record reading");
304 throwruntime_error(
"Unexpected end of job info file. " 305 "Expected a job i/o, got EOF");
307 throwruntime_error(
strerror(errno));
308 throwruntime_error(
"Unknown job i/o reading error");
310 if(fixed_size_from_header > size_to_read) {
311 size_tbytes_to_skip = fixed_size_from_header - size_to_read;
315 throwruntime_error(
strerror(errno));
316 throwruntime_error(
"Unknown job i/o record skipping error");
321 throwruntime_error(
"Job input size is more " 322 "than max allowed");
328 throwruntime_error(
"Incomplete job input reading");
330 throwruntime_error(
"Unexpected end of job info file. " 331 "Expected an input, got EOF");
333 throwruntime_error(
strerror(errno));
334 throwruntime_error(
"Unknown job input reading error");
339 throwruntime_error(
"Job output size is more " 340 "than max allowed");
346 throwruntime_error(
"Incomplete job output reading");
348 throwruntime_error(
"Unexpected end of job info file. " 349 "Expected an output, got EOF");
351 throwruntime_error(
strerror(errno));
352 throwruntime_error(
"Unknown job output reading error");
358fixed_size_from_header -
362 throwruntime_error(
strerror(errno));
363 throwruntime_error(
"Unknown job i/o record skipping error");
377 const char* client_session,
378 const char* err_msg)
385 throwruntime_error(
strerror(errno));
390 throwruntime_error(
strerror(errno));
395 throwruntime_error(
strerror(errno));
400 throwruntime_error(
strerror(errno));
406 char* client_session,
412fixed_size_from_header);
415 size_tbytes = fread(
this, 1, size_to_read,
f);
416 if(bytes != size_to_read) {
418 throwruntime_error(
"Incomplete job event reading");
420 throwruntime_error(
"Unexpected end of job info file. " 421 "Expected a job event, got EOF");
423 throwruntime_error(
strerror(errno));
424 throwruntime_error(
"Unknown job event reading error");
426 if(fixed_size_from_header > size_to_read) {
427 size_tbytes_to_skip = fixed_size_from_header - size_to_read;
431 throwruntime_error(
strerror(errno));
432 throwruntime_error(
"Unknown job event record skipping error");
437 throwruntime_error(
"Job event client node size is more " 438 "than max allowed");
444 throwruntime_error(
"Incomplete job event client node reading");
446 throwruntime_error(
"Unexpected end of job info file. " 447 "Expected a client node, got EOF");
449 throwruntime_error(
strerror(errno));
450 throwruntime_error(
"Unknown job event client node reading error");
455 throwruntime_error(
"Job event client session size is more " 456 "than max allowed");
462 throwruntime_error(
"Incomplete job event " 463 "client session reading");
465 throwruntime_error(
"Unexpected end of job info file. " 466 "Expected a client session, got EOF");
468 throwruntime_error(
strerror(errno));
469 throwruntime_error(
"Unknown job event " 470 "client session reading error");
475 throwruntime_error(
"Job event error message size is more " 476 "than max allowed");
482 throwruntime_error(
"Incomplete job event " 483 "error message reading");
485 throwruntime_error(
"Unexpected end of job info file. " 486 "Expected an error message, got EOF");
488 throwruntime_error(
strerror(errno));
489 throwruntime_error(
"Unknown job event " 490 "error message reading error");
497fixed_size_from_header -
502 throwruntime_error(
strerror(errno));
503 throwruntime_error(
"Unknown job event record skipping error");
523 throwruntime_error(
strerror(errno));
531fixed_size_from_header);
534 size_tbytes = fread(
this, 1, size_to_read,
f);
535 if(bytes != size_to_read) {
537 throwruntime_error(
"Incomplete affinity reading");
541 throwruntime_error(
strerror(errno));
542 throwruntime_error(
"Unknown affinity reading error");
546 throwruntime_error(
"Affinity token size is more " 547 "than max allowed");
549 if(fixed_size_from_header > size_to_read) {
550 size_tbytes_to_skip = fixed_size_from_header - size_to_read;
554 throwruntime_error(
strerror(errno));
555 throwruntime_error(
"Unknown affinity skipping error");
574 throwruntime_error(
strerror(errno));
582fixed_size_from_header);
585 size_tbytes = fread(
this, 1, size_to_read,
f);
586 if(bytes != size_to_read) {
588 throwruntime_error(
"Incomplete job group reading");
592 throwruntime_error(
strerror(errno));
593 throwruntime_error(
"Unknown job group reading error");
597 throwruntime_error(
"Group token size is more " 598 "than max allowed");
600 if(fixed_size_from_header > size_to_read) {
601 size_tbytes_to_skip = fixed_size_from_header - size_to_read;
605 throwruntime_error(
strerror(errno));
606 throwruntime_error(
"Unknown group skipping error");
625 throwruntime_error(
strerror(errno));
633fixed_size_from_header);
636 size_tbytes = fread(
this, 1, size_to_read,
f);
637 if(bytes != size_to_read) {
639 throwruntime_error(
"Incomplete queue description reading");
643 throwruntime_error(
strerror(errno));
644 throwruntime_error(
"Unknown queue description reading error");
648 throwruntime_error(
"Queue name size is more " 649 "than max allowed");
651 throwruntime_error(
"Queue class name size is more " 652 "than max allowed");
654 throwruntime_error(
"Program name size is more " 655 "than max allowed");
657 throwruntime_error(
"Submitter hosts size is more " 658 "than max allowed");
660 throwruntime_error(
"Worker node hosts size is more " 661 "than max allowed");
663 throwruntime_error(
"Reader hosts size is more " 664 "than max allowed");
666 throwruntime_error(
"Description size is more " 667 "than max allowed");
669 throwruntime_error(
"Linked section prefixes size is more " 670 "than max allowed");
672 throwruntime_error(
"Linked section names size is more " 673 "than max allowed");
675 if(fixed_size_from_header > size_to_read) {
676 size_tbytes_to_skip = fixed_size_from_header - size_to_read;
680 throwruntime_error(
strerror(errno));
681 throwruntime_error(
"Unknown queue description skipping error");
699 throwruntime_error(
strerror(errno));
707fixed_size_from_header);
710 size_tbytes = fread(
this, 1, size_to_read,
f);
711 if(bytes != size_to_read) {
713 throwruntime_error(
"Incomplete linked section reading");
717 throwruntime_error(
strerror(errno));
718 throwruntime_error(
"Unknown linked section reading error");
722 throwruntime_error(
"Linked section name size is more " 723 "than max allowed");
725 throwruntime_error(
"Linked section value name size is more " 726 "than max allowed");
728 throwruntime_error(
"Linked section value size is more " 729 "than max allowed");
731 if(fixed_size_from_header > size_to_read) {
732 size_tbytes_to_skip = fixed_size_from_header - size_to_read;
736 throwruntime_error(
strerror(errno));
737 throwruntime_error(
"Unknown linked section skipping error");
static CNcbiApplication * Instance(void)
Singleton method.
static CNetScheduleServer * GetInstance(void)
void RegisterAlert(EAlertType alert_type, const string &message)
static SQLCHAR output[256]
CVersionInfo GetVersion(void) const
Get the program version information.
#define ERR_POST(message)
Error posting with file, line number information but without error codes.
void Warning(CExceptionArgs_Base &args)
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
int GetMajor(void) const
Major version.
int GetMinor(void) const
Minor version.
int GetPatchLevel(void) const
Patch level.
const unsigned int kNetScheduleMaxDBDataSize
const unsigned int kNetScheduleMaxDBErrSize
#define NETSCHEDULED_STORAGE_VERSION_MAJOR
#define NETSCHEDULED_STORAGE_VERSION_PATCH
#define NETSCHEDULED_STORAGE_VERSION_MINOR
vector< Uint4 > kOldDumpMagic
const unsigned kMaxHitIdSize
const unsigned kLinkedSectionsList
const unsigned kMaxWorkerNodeIdSize
const unsigned kLinkedSectionValueSize
const unsigned kLinkedSectionValueNameSize
const unsigned kMaxSessionIdSize
const unsigned kMaxDescriptionSize
const unsigned kMaxClientIpSize
const Uint4 kDumpMagic(0xF0F0F0F0)
const unsigned kNetScheduleMaxOverflowSize
const unsigned kMaxQueueLimitsSize
const unsigned kMaxQueueNameSize
static SLJIT_INLINE sljit_ins msg(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)
int Read(FILE *f, size_t fixed_size_from_header)
int Read(FILE *f, size_t fixed_size_from_header)
void Write(FILE *f, const char *progress_msg)
char client_sid[kMaxSessionIdSize]
int Read(FILE *f, size_t fixed_size_from_header, char *progress_msg)
char client_ip[kMaxClientIpSize]
char ncbi_phid[kMaxHitIdSize]
void Write(FILE *f, const char *client_node, const char *client_session, const char *err_msg)
Uint4 client_session_size
int Read(FILE *f, size_t fixed_size_from_header, char *client_node, char *client_session, char *err_msg)
int Read(FILE *f, size_t fixed_size_from_header, char *input, char *output)
void Write(FILE *f, const char *input, const char *output)
int Read(FILE *f, size_t fixed_size_from_header)
int Read(FILE *f, size_t fixed_size_from_header)
Uint4 linked_section_prefixes_size
Uint4 linked_section_names_size
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