NCBI C++ ToolKit
ns_db_dump.cpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 /* $Id: ns_db_dump.cpp 93717 2021-05-14 17:29:38Z satskyse $
2  * ===========================================================================
3  *
4  * PUBLIC DOMAIN NOTICE
5  * National Center for Biotechnology Information
6  *
7  * This software/database is a "United States Government Work" under the
8  * terms of the United States Copyright Act. It was written as part of
9  * the author's official duties as a United States Government employee and
10  * thus cannot be copyrighted. This software/database is freely available
11  * to the public for use. The National Library of Medicine and the U.S.
12  * Government have not placed any restriction on its use or reproduction.
13  *
14  * Although all reasonable efforts have been taken to ensure the accuracy
15  * and reliability of the software and data, the NLM and the U.S.
16  * Government do not and cannot warrant the performance or results that
17  * may be obtained by using this software or data. The NLM and the U.S.
18  * Government disclaim all warranties, express or implied, including
19  * warranties of performance, merchantability or fitness for any particular
20  * purpose.
21  *
22  * Please cite the author in any work or product based on this material.
23  *
24  * ===========================================================================
25  *
26  * Authors: Sergey Satskiy
27  *
28  * File Description:
29  * NetSchedule database dumping support.
30  *
31  */
32 
33 #include <ncbi_pch.hpp>
34 
35 #include <stdlib.h>
36 #include <string.h>
37 #include "ns_db_dump.hpp"
38 #include "ns_types.hpp"
39 #include "netschedule_version.hpp"
40 #include "ns_server.hpp"
41 
42 
44 
45 
46 vector<Uint4> kOldDumpMagic { 0xD0D0D0D0, 0xE0E0E0E0 };
47 
48 
50  magic(kDumpMagic),
51  storage_ver_major(NETSCHEDULED_STORAGE_VERSION_MAJOR),
52  storage_ver_minor(NETSCHEDULED_STORAGE_VERSION_MINOR),
53  storage_ver_patch(NETSCHEDULED_STORAGE_VERSION_PATCH)
54 {
56  CVersionInfo ver_info = app->GetVersion();
57 
58  server_ver_major = ver_info.GetMajor();
59  server_ver_minor = ver_info.GetMinor();
60  server_ver_patch = ver_info.GetPatchLevel();
61 }
62 
63 
65  common_header(),
66  job_props_fixed_size(sizeof(SJobDump)),
67  job_io_fixed_size(sizeof(SJobIODump)),
68  job_event_fixed_size(sizeof(SJobEventsDump))
69 {}
70 
71 
73 {
74  errno = 0;
75  if (fwrite(this, sizeof(SJobDumpHeader), 1, f) != 1)
76  throw runtime_error(strerror(errno));
77 }
78 
79 
81 {
82  size_t bytes = fread(this, 1, sizeof(SJobDumpHeader), f);
83  if (bytes != sizeof(SJobDumpHeader)) {
84  if (bytes > 0)
85  throw runtime_error("Incomplete dump file header");
86  if (feof(f))
87  return 1;
88  if (errno != 0)
89  throw runtime_error(strerror(errno));
90  throw runtime_error("Unknown dump file header reading error");
91  }
92 
94  for (auto m: kOldDumpMagic) {
95  if (common_header.magic == m)
96  throw runtime_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.");
99  }
100 
101  throw runtime_error("Dump file header magic does not match");
102  }
103  return 0;
104 }
105 
106 
108  common_header(),
109  fixed_size(0)
110 {}
111 
112 
114 {
115  errno = 0;
116  if (fwrite(this, sizeof(SOneStructDumpHeader), 1, f) != 1)
117  throw runtime_error(strerror(errno));
118 }
119 
120 
122 {
123  size_t bytes = fread(this, 1, sizeof(SOneStructDumpHeader), f);
124  if (bytes != sizeof(SOneStructDumpHeader)) {
125  if (bytes > 0)
126  throw runtime_error("Incomplete dump file header");
127  if (feof(f))
128  return 1;
129  if (errno != 0)
130  throw runtime_error(strerror(errno));
131  throw runtime_error("Unknown dump file header reading error");
132  }
133 
134  if (common_header.magic != kDumpMagic) {
135  for (auto m: kOldDumpMagic) {
136  if (common_header.magic == m)
137  throw runtime_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.");
140  }
141 
142  throw runtime_error("Dump file header magic does not match");
143  }
144  return 0;
145 }
146 
147 
149 {
150  memset(this, 0, sizeof(SJobDump));
151 }
152 
153 void SJobDump::Write(FILE * f, const char * progress_msg)
154 {
156 
157  errno = 0;
158  if (fwrite(this, sizeof(SJobDump), 1, f) != 1)
159  throw runtime_error(strerror(errno));
160 
161  if (progress_msg_size > 0) {
162  errno = 0;
163  if (fwrite(progress_msg, progress_msg_size, 1, f) != 1)
164  throw runtime_error(strerror(errno));
165  }
166 }
167 
168 int SJobDump::Read(FILE * f,
169  size_t fixed_size_from_header,
170  char * progress_msg)
171 {
172  memset(this, 0, sizeof(SJobDump));
173 
174  size_t size_to_read = min(sizeof(SJobDump), fixed_size_from_header);
175 
176  errno = 0;
177  size_t bytes = fread(this, 1, size_to_read, f);
178  if (bytes != size_to_read) {
179  if (bytes > 0)
180  throw runtime_error("Incomplete job record reading");
181  if (feof(f))
182  return 1;
183  if (errno != 0)
184  throw runtime_error(strerror(errno));
185  throw runtime_error("Unknown job record reading error");
186  }
187  if (fixed_size_from_header > size_to_read) {
188  size_t bytes_to_skip = fixed_size_from_header - size_to_read;
189 
190  if (fseek(f, bytes_to_skip, SEEK_CUR) != 0) {
191  if (errno != 0)
192  throw runtime_error(strerror(errno));
193  throw runtime_error("Unknown job record skipping error");
194  }
195  }
196 
198  string msg = "Client IP has been stripped from " +
199  to_string(client_ip_size) + " to " +
200  to_string(kMaxClientIpSize) + ": " +
202  " (job id " + to_string(id) + ")";
203  ERR_POST(Warning << msg);
205  eDumpLoadError, msg);
206  }
208  string msg = "Client session id has been stripped from " +
209  to_string(client_sid_size) + " to " +
210  to_string(kMaxSessionIdSize) + ": " +
212  " (job id " + to_string(id) + ")";
213  ERR_POST(Warning << msg);
215  eDumpLoadError, msg);
216  }
218  string msg = "PHID has been stripped from " +
219  to_string(ncbi_phid_size) + " to " +
220  to_string(kMaxHitIdSize) + ": " +
222  " (job id " + to_string(id) + ")";
223  ERR_POST(Warning << msg);
225  eDumpLoadError, msg);
226  }
228  throw runtime_error("Job progress message size is more "
229  "than max allowed");
230  if (progress_msg_size > 0) {
231  errno = 0;
232  bytes = fread(progress_msg, 1, progress_msg_size, f);
233  if (bytes != progress_msg_size) {
234  if (bytes > 0)
235  throw runtime_error("Incomplete job progress message reading");
236  if (feof(f))
237  throw runtime_error("Unexpected end of job info file. "
238  "Expected a progress message, got EOF");
239  if (errno != 0)
240  throw runtime_error(strerror(errno));
241  throw runtime_error("Unknown job progress message reading error");
242  }
243  }
244 
245  if (total_size > fixed_size_from_header + progress_msg_size) {
246  size_t bytes_to_skip = total_size -
247  fixed_size_from_header - progress_msg_size;
248  if (fseek(f, bytes_to_skip, SEEK_CUR) != 0) {
249  if (errno != 0)
250  throw runtime_error(strerror(errno));
251  throw runtime_error("Unknown job record skipping error");
252  }
253  }
254 
255  return 0;
256 }
257 
258 
260 {
261  memset(this, 0, sizeof(SJobIODump));
262 }
263 
264 
265 // It is supposed that the input and/or output follow each instance of the
266 // structure below. The limit of the input/output is too large to have
267 // it as a member of this structure
268 void SJobIODump::Write(FILE * f, const char * input,
269  const char * output)
270 {
272 
273  errno = 0;
274  if (fwrite(this, sizeof(SJobIODump), 1, f) != 1)
275  throw runtime_error(strerror(errno));
276 
277  if (input_size > 0) {
278  errno = 0;
279  if (fwrite(input, input_size, 1, f) != 1)
280  throw runtime_error(strerror(errno));
281  }
282 
283  if (output_size > 0) {
284  errno = 0;
285  if (fwrite(output, output_size, 1, f) != 1)
286  throw runtime_error(strerror(errno));
287  }
288 }
289 
290 
291 int SJobIODump::Read(FILE * f, size_t fixed_size_from_header,
292  char * input, char * output)
293 {
294  memset(this, 0, sizeof(SJobIODump));
295 
296  size_t size_to_read = min(sizeof(SJobIODump), fixed_size_from_header);
297 
298  errno = 0;
299  size_t bytes = fread(this, 1, size_to_read, f);
300  if (bytes != size_to_read) {
301  if (bytes > 0)
302  throw runtime_error("Incomplete job i/o record reading");
303  if (feof(f))
304  throw runtime_error("Unexpected end of job info file. "
305  "Expected a job i/o, got EOF");
306  if (errno != 0)
307  throw runtime_error(strerror(errno));
308  throw runtime_error("Unknown job i/o reading error");
309  }
310  if (fixed_size_from_header > size_to_read) {
311  size_t bytes_to_skip = fixed_size_from_header - size_to_read;
312 
313  if (fseek(f, bytes_to_skip, SEEK_CUR) != 0) {
314  if (errno != 0)
315  throw runtime_error(strerror(errno));
316  throw runtime_error("Unknown job i/o record skipping error");
317  }
318  }
319 
321  throw runtime_error("Job input size is more "
322  "than max allowed");
323  if (input_size > 0) {
324  errno = 0;
325  bytes = fread(input, 1, input_size, f);
326  if (bytes != input_size) {
327  if (bytes > 0)
328  throw runtime_error("Incomplete job input reading");
329  if (feof(f))
330  throw runtime_error("Unexpected end of job info file. "
331  "Expected an input, got EOF");
332  if (errno != 0)
333  throw runtime_error(strerror(errno));
334  throw runtime_error("Unknown job input reading error");
335  }
336  }
337 
339  throw runtime_error("Job output size is more "
340  "than max allowed");
341  if (output_size > 0) {
342  errno = 0;
343  bytes = fread(output, 1, output_size, f);
344  if (bytes != output_size) {
345  if (bytes > 0)
346  throw runtime_error("Incomplete job output reading");
347  if (feof(f))
348  throw runtime_error("Unexpected end of job info file. "
349  "Expected an output, got EOF");
350  if (errno != 0)
351  throw runtime_error(strerror(errno));
352  throw runtime_error("Unknown job output reading error");
353  }
354  }
355 
356  if (total_size > fixed_size_from_header + input_size + output_size) {
357  size_t bytes_to_skip = total_size -
358  fixed_size_from_header -
360  if (fseek(f, bytes_to_skip, SEEK_CUR) != 0) {
361  if (errno != 0)
362  throw runtime_error(strerror(errno));
363  throw runtime_error("Unknown job i/o record skipping error");
364  }
365  }
366 
367  return 0;
368 }
369 
370 
372 {
373  memset(this, 0, sizeof(SJobEventsDump));
374 }
375 
376 void SJobEventsDump::Write(FILE * f, const char * client_node,
377  const char * client_session,
378  const char * err_msg)
379 {
382 
383  errno = 0;
384  if (fwrite(this, sizeof(SJobEventsDump), 1, f) != 1)
385  throw runtime_error(strerror(errno));
386 
387  if (client_node_size > 0) {
388  errno = 0;
389  if (fwrite(client_node, client_node_size, 1, f) != 1)
390  throw runtime_error(strerror(errno));
391  }
392  if (client_session_size > 0) {
393  errno = 0;
394  if (fwrite(client_session, client_session_size, 1, f) != 1)
395  throw runtime_error(strerror(errno));
396  }
397  if (err_msg_size > 0) {
398  errno = 0;
399  if (fwrite(err_msg, err_msg_size, 1, f) != 1)
400  throw runtime_error(strerror(errno));
401  }
402 }
403 
404 int SJobEventsDump::Read(FILE * f, size_t fixed_size_from_header,
405  char * client_node,
406  char * client_session,
407  char * err_msg)
408 {
409  memset(this, 0, sizeof(SJobEventsDump));
410 
411  size_t size_to_read = min(sizeof(SJobEventsDump),
412  fixed_size_from_header);
413 
414  errno = 0;
415  size_t bytes = fread(this, 1, size_to_read, f);
416  if (bytes != size_to_read) {
417  if (bytes > 0)
418  throw runtime_error("Incomplete job event reading");
419  if (feof(f))
420  throw runtime_error("Unexpected end of job info file. "
421  "Expected a job event, got EOF");
422  if (errno != 0)
423  throw runtime_error(strerror(errno));
424  throw runtime_error("Unknown job event reading error");
425  }
426  if (fixed_size_from_header > size_to_read) {
427  size_t bytes_to_skip = fixed_size_from_header - size_to_read;
428 
429  if (fseek(f, bytes_to_skip, SEEK_CUR) != 0) {
430  if (errno != 0)
431  throw runtime_error(strerror(errno));
432  throw runtime_error("Unknown job event record skipping error");
433  }
434  }
435 
437  throw runtime_error("Job event client node size is more "
438  "than max allowed");
439  if (client_node_size > 0) {
440  errno = 0;
441  bytes = fread(client_node, 1, client_node_size, f);
442  if (bytes != client_node_size) {
443  if (bytes > 0)
444  throw runtime_error("Incomplete job event client node reading");
445  if (feof(f))
446  throw runtime_error("Unexpected end of job info file. "
447  "Expected a client node, got EOF");
448  if (errno != 0)
449  throw runtime_error(strerror(errno));
450  throw runtime_error("Unknown job event client node reading error");
451  }
452  }
453 
455  throw runtime_error("Job event client session size is more "
456  "than max allowed");
457  if (client_session_size > 0) {
458  errno = 0;
459  bytes = fread(client_session, 1, client_session_size, f);
460  if (bytes != client_session_size) {
461  if (bytes > 0)
462  throw runtime_error("Incomplete job event "
463  "client session reading");
464  if (feof(f))
465  throw runtime_error("Unexpected end of job info file. "
466  "Expected a client session, got EOF");
467  if (errno != 0)
468  throw runtime_error(strerror(errno));
469  throw runtime_error("Unknown job event "
470  "client session reading error");
471  }
472  }
473 
475  throw runtime_error("Job event error message size is more "
476  "than max allowed");
477  if (err_msg_size > 0) {
478  errno = 0;
479  bytes = fread(err_msg, 1, err_msg_size, f);
480  if (bytes != err_msg_size) {
481  if (bytes > 0)
482  throw runtime_error("Incomplete job event "
483  "error message reading");
484  if (feof(f))
485  throw runtime_error("Unexpected end of job info file. "
486  "Expected an error message, got EOF");
487  if (errno != 0)
488  throw runtime_error(strerror(errno));
489  throw runtime_error("Unknown job event "
490  "error message reading error");
491  }
492  }
493 
494  if (total_size > fixed_size_from_header + client_node_size +
496  size_t bytes_to_skip = total_size -
497  fixed_size_from_header -
499  err_msg_size;
500  if (fseek(f, bytes_to_skip, SEEK_CUR) != 0) {
501  if (errno != 0)
502  throw runtime_error(strerror(errno));
503  throw runtime_error("Unknown job event record skipping error");
504  }
505  }
506 
507  return 0;
508 }
509 
510 
512 {
513  memset(this, 0, sizeof(SAffinityDictDump));
514 }
515 
516 
518 {
519  total_size = sizeof(SAffinityDictDump);
520 
521  errno = 0;
522  if (fwrite(this, sizeof(SAffinityDictDump), 1, f) != 1)
523  throw runtime_error(strerror(errno));
524 }
525 
526 int SAffinityDictDump::Read(FILE * f, size_t fixed_size_from_header)
527 {
528  memset(this, 0, sizeof(SAffinityDictDump));
529 
530  size_t size_to_read = min(sizeof(SAffinityDictDump),
531  fixed_size_from_header);
532 
533  errno = 0;
534  size_t bytes = fread(this, 1, size_to_read, f);
535  if (bytes != size_to_read) {
536  if (bytes > 0)
537  throw runtime_error("Incomplete affinity reading");
538  if (feof(f))
539  return 1;
540  if (errno != 0)
541  throw runtime_error(strerror(errno));
542  throw runtime_error("Unknown affinity reading error");
543  }
544 
546  throw runtime_error("Affinity token size is more "
547  "than max allowed");
548 
549  if (fixed_size_from_header > size_to_read) {
550  size_t bytes_to_skip = fixed_size_from_header - size_to_read;
551 
552  if (fseek(f, bytes_to_skip, SEEK_CUR) != 0) {
553  if (errno != 0)
554  throw runtime_error(strerror(errno));
555  throw runtime_error("Unknown affinity skipping error");
556  }
557  }
558  return 0;
559 }
560 
561 
563 {
564  memset(this, 0, sizeof(SGroupDictDump));
565 }
566 
567 
569 {
570  total_size = sizeof(SGroupDictDump);
571 
572  errno = 0;
573  if (fwrite(this, sizeof(SGroupDictDump), 1, f) != 1)
574  throw runtime_error(strerror(errno));
575 }
576 
577 int SGroupDictDump::Read(FILE * f, size_t fixed_size_from_header)
578 {
579  memset(this, 0, sizeof(SGroupDictDump));
580 
581  size_t size_to_read = min(sizeof(SGroupDictDump),
582  fixed_size_from_header);
583 
584  errno = 0;
585  size_t bytes = fread(this, 1, size_to_read, f);
586  if (bytes != size_to_read) {
587  if (bytes > 0)
588  throw runtime_error("Incomplete job group reading");
589  if (feof(f))
590  return 1;
591  if (errno != 0)
592  throw runtime_error(strerror(errno));
593  throw runtime_error("Unknown job group reading error");
594  }
595 
597  throw runtime_error("Group token size is more "
598  "than max allowed");
599 
600  if (fixed_size_from_header > size_to_read) {
601  size_t bytes_to_skip = fixed_size_from_header - size_to_read;
602 
603  if (fseek(f, bytes_to_skip, SEEK_CUR) != 0) {
604  if (errno != 0)
605  throw runtime_error(strerror(errno));
606  throw runtime_error("Unknown group skipping error");
607  }
608  }
609  return 0;
610 }
611 
612 
614 {
615  memset(this, 0, sizeof(SQueueDescriptionDump));
616 }
617 
618 
620 {
622 
623  errno = 0;
624  if (fwrite(this, sizeof(SQueueDescriptionDump), 1, f) != 1)
625  throw runtime_error(strerror(errno));
626 }
627 
628 int SQueueDescriptionDump::Read(FILE * f, size_t fixed_size_from_header)
629 {
630  memset(this, 0, sizeof(SQueueDescriptionDump));
631 
632  size_t size_to_read = min(sizeof(SQueueDescriptionDump),
633  fixed_size_from_header);
634 
635  errno = 0;
636  size_t bytes = fread(this, 1, size_to_read, f);
637  if (bytes != size_to_read) {
638  if (bytes > 0)
639  throw runtime_error("Incomplete queue description reading");
640  if (feof(f))
641  return 1;
642  if (errno != 0)
643  throw runtime_error(strerror(errno));
644  throw runtime_error("Unknown queue description reading error");
645  }
646 
648  throw runtime_error("Queue name size is more "
649  "than max allowed");
651  throw runtime_error("Queue class name size is more "
652  "than max allowed");
654  throw runtime_error("Program name size is more "
655  "than max allowed");
657  throw runtime_error("Submitter hosts size is more "
658  "than max allowed");
660  throw runtime_error("Worker node hosts size is more "
661  "than max allowed");
663  throw runtime_error("Reader hosts size is more "
664  "than max allowed");
666  throw runtime_error("Description size is more "
667  "than max allowed");
669  throw runtime_error("Linked section prefixes size is more "
670  "than max allowed");
672  throw runtime_error("Linked section names size is more "
673  "than max allowed");
674 
675  if (fixed_size_from_header > size_to_read) {
676  size_t bytes_to_skip = fixed_size_from_header - size_to_read;
677 
678  if (fseek(f, bytes_to_skip, SEEK_CUR) != 0) {
679  if (errno != 0)
680  throw runtime_error(strerror(errno));
681  throw runtime_error("Unknown queue description skipping error");
682  }
683  }
684  return 0;
685 }
686 
687 
689 {
690  memset(this, 0, sizeof(SLinkedSectionDump));
691 }
692 
693 
695 {
696  total_size = sizeof(SLinkedSectionDump);
697 
698  if (fwrite(this, sizeof(SLinkedSectionDump), 1, f) != 1)
699  throw runtime_error(strerror(errno));
700 }
701 
702 int SLinkedSectionDump::Read(FILE * f, size_t fixed_size_from_header)
703 {
704  memset(this, 0, sizeof(SLinkedSectionDump));
705 
706  size_t size_to_read = min(sizeof(SLinkedSectionDump),
707  fixed_size_from_header);
708 
709  errno = 0;
710  size_t bytes = fread(this, 1, size_to_read, f);
711  if (bytes != size_to_read) {
712  if (bytes > 0)
713  throw runtime_error("Incomplete linked section reading");
714  if (feof(f))
715  return 1;
716  if (errno != 0)
717  throw runtime_error(strerror(errno));
718  throw runtime_error("Unknown linked section reading error");
719  }
720 
722  throw runtime_error("Linked section name size is more "
723  "than max allowed");
725  throw runtime_error("Linked section value name size is more "
726  "than max allowed");
728  throw runtime_error("Linked section value size is more "
729  "than max allowed");
730 
731  if (fixed_size_from_header > size_to_read) {
732  size_t bytes_to_skip = fixed_size_from_header - size_to_read;
733 
734  if (fseek(f, bytes_to_skip, SEEK_CUR) != 0) {
735  if (errno != 0)
736  throw runtime_error(strerror(errno));
737  throw runtime_error("Unknown linked section skipping error");
738  }
739  }
740  return 0;
741 }
742 
743 
static CNcbiApplication * Instance(void)
Singleton method.
Definition: ncbiapp.cpp:264
static CNetScheduleServer * GetInstance(void)
Definition: ns_server.cpp:690
void RegisterAlert(EAlertType alert_type, const string &message)
Definition: ns_server.cpp:643
CVersionInfo –.
static SQLCHAR output[256]
Definition: print.c:5
CVersionInfo GetVersion(void) const
Get the program version information.
Definition: ncbiapp.cpp:1184
string
Definition: cgiapp.hpp:687
#define ERR_POST(message)
Error posting with file, line number information but without error codes.
Definition: ncbidiag.hpp:186
void Warning(CExceptionArgs_Base &args)
Definition: ncbiexpt.hpp:1191
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
int GetMajor(void) const
Major version.
int GetMinor(void) const
Minor version.
int GetPatchLevel(void) const
Patch level.
static int input()
#define fseek
const unsigned int kNetScheduleMaxDBDataSize
const unsigned int kNetScheduleMaxDBErrSize
#define NETSCHEDULED_STORAGE_VERSION_MAJOR
#define NETSCHEDULED_STORAGE_VERSION_PATCH
#define NETSCHEDULED_STORAGE_VERSION_MINOR
T min(T x_, T y_)
double f(double x_, const double &y_)
Definition: njn_root.hpp:188
@ eDumpLoadError
Definition: ns_alert.hpp:58
vector< Uint4 > kOldDumpMagic
Definition: ns_db_dump.cpp:46
const unsigned kMaxHitIdSize
Definition: ns_types.hpp:109
const unsigned kLinkedSectionsList
Definition: ns_types.hpp:114
const unsigned kMaxWorkerNodeIdSize
Definition: ns_types.hpp:117
const unsigned kLinkedSectionValueSize
Definition: ns_types.hpp:113
const unsigned kLinkedSectionValueNameSize
Definition: ns_types.hpp:112
const unsigned kMaxSessionIdSize
Definition: ns_types.hpp:111
const unsigned kMaxDescriptionSize
Definition: ns_types.hpp:116
const unsigned kMaxClientIpSize
Definition: ns_types.hpp:110
const Uint4 kDumpMagic(0xF0F0F0F0)
const unsigned kNetScheduleMaxOverflowSize
Definition: ns_types.hpp:118
const unsigned kMaxQueueLimitsSize
Definition: ns_types.hpp:115
const unsigned kMaxQueueNameSize
Definition: ns_types.hpp:108
char * strerror(int n)
Definition: pcregrep.c:835
void Write(FILE *f)
Definition: ns_db_dump.cpp:517
int Read(FILE *f, size_t fixed_size_from_header)
Definition: ns_db_dump.cpp:526
int Read(FILE *f, size_t fixed_size_from_header)
Definition: ns_db_dump.cpp:577
void Write(FILE *f)
Definition: ns_db_dump.cpp:568
int Read(FILE *f)
Definition: ns_db_dump.cpp:80
SCommonDumpHeader common_header
Definition: ns_db_dump.hpp:80
void Write(FILE *f)
Definition: ns_db_dump.cpp:72
void Write(FILE *f, const char *progress_msg)
Definition: ns_db_dump.cpp:153
Uint4 client_sid_size
Definition: ns_db_dump.hpp:150
Uint4 progress_msg_size
Definition: ns_db_dump.hpp:146
char client_sid[kMaxSessionIdSize]
Definition: ns_db_dump.hpp:153
Uint4 client_ip_size
Definition: ns_db_dump.hpp:149
Uint4 total_size
Definition: ns_db_dump.hpp:118
int Read(FILE *f, size_t fixed_size_from_header, char *progress_msg)
Definition: ns_db_dump.cpp:168
char client_ip[kMaxClientIpSize]
Definition: ns_db_dump.hpp:152
Uint4 ncbi_phid_size
Definition: ns_db_dump.hpp:151
char ncbi_phid[kMaxHitIdSize]
Definition: ns_db_dump.hpp:154
void Write(FILE *f, const char *client_node, const char *client_session, const char *err_msg)
Definition: ns_db_dump.cpp:376
Uint4 client_session_size
Definition: ns_db_dump.hpp:197
int Read(FILE *f, size_t fixed_size_from_header, char *client_node, char *client_session, char *err_msg)
Definition: ns_db_dump.cpp:404
Uint4 client_node_size
Definition: ns_db_dump.hpp:196
Uint4 total_size
Definition: ns_db_dump.hpp:171
int Read(FILE *f, size_t fixed_size_from_header, char *input, char *output)
Definition: ns_db_dump.cpp:291
Uint4 output_size
Definition: ns_db_dump.hpp:173
Uint4 input_size
Definition: ns_db_dump.hpp:172
void Write(FILE *f, const char *input, const char *output)
Definition: ns_db_dump.cpp:268
int Read(FILE *f, size_t fixed_size_from_header)
Definition: ns_db_dump.cpp:702
void Write(FILE *f)
Definition: ns_db_dump.cpp:694
SCommonDumpHeader common_header
Definition: ns_db_dump.hpp:98
void Write(FILE *f)
Definition: ns_db_dump.cpp:113
int Read(FILE *f, size_t fixed_size_from_header)
Definition: ns_db_dump.cpp:628
void Write(FILE *f)
Definition: ns_db_dump.cpp:619
Uint4 linked_section_prefixes_size
Definition: ns_db_dump.hpp:298
#define SEEK_CUR
Definition: zconf.h:501
Modified on Thu Apr 11 15:04:58 2024 by modify_doxy.py rev. 669887