m_RunTimeLine(
NULL),
73m_QueueName(queue_name),
99m_KeyGenerator(server->
GetHost(), server->
GetPort(), queue_name),
100m_Log(server->IsLog()),
101m_LogBatchEachJob(server->IsLogBatchEachJob()),
102m_RefuseSubmits(
false),
105m_StatisticsCountersLastPrintedTimestamp(0.0),
106m_NotificationsList(qdb, server->GetNodeID(), queue_name),
115m_PauseStatus(eNoPause),
116m_ClientRegistryTimeoutWorkerNode(
127m_ShouldPerfLogTransitions(
false)
168 unsigned intinterval_sec =
precision.Sec();
169 if(interval_sec < 1)
240 for(
unsigned n= 0;
n< nParams; ++
n) {
241parameters.push_back(
249 unsigned int& max_input_size,
250 unsigned int& max_output_size,
269 if(!values.
empty())
270linked_sections[k->first] = values;
278 boolreader_affinity,
280 boolexclusive_new_affinity,
282 boolaffinity_may_change,
283 boolgroup_may_change)
286 if(!reader_affinity &&
288!exclusive_new_affinity &&
295vector<CNetScheduleAPI::EJobStatus> from_state;
298 stringscope =
client.GetScope();
322pending_running_jobs -= all_jobs_in_scopes;
323other_jobs -= all_jobs_in_scopes;
324reading_jobs -= all_jobs_in_scopes;
329pending_running_jobs &= scope_jobs;
330other_jobs &= scope_jobs;
331reading_jobs &= scope_jobs;
334 if(group_ids.
any()) {
337 if(!group_may_change)
341other_jobs |= reading_jobs;
344other_jobs |= reading_jobs;
346 TNSBitVectorcandidates = pending_running_jobs | other_jobs;
348 if(!candidates.
any())
355 return!candidates.
any();
366no_aff_jobs = candidates - all_aff_jobs;
367 if(exclusive_new_affinity && no_aff_jobs.
any())
370 if(exclusive_new_affinity)
371suitable_affinities = all_aff - all_pref_affs;
375suitable_affinities |= aff_ids;
379suitable_affinities);
380 if(affinity_may_change)
381candidates = pending_running_jobs |
382(other_jobs & suitable_aff_jobs);
384candidates &= suitable_aff_jobs;
385 return!candidates.
any();
401 const string& aff_token,
402 const string& group,
412 unsigned intaff_id = 0;
413 unsigned intgroup_id = 0;
422 event.SetNodeAddr(
client.GetAddress());
425 event.SetTimestamp(op_begin_time);
426 event.SetClientNode(
client.GetNode());
427 event.SetClientSession(
client.GetSession());
441 stringscope =
client.GetScope();
445 if(!scope.empty()) {
451 "No available slots in the queue scope registry");
453 if(!group.empty()) {
459 "No available slots in the queue group registry");
461 if(!aff_token.empty()) {
467 "No available slots in the queue affinity registry");
471 if(!group.empty()) {
475 if(!aff_token.empty()) {
521vector< pair<CJob, string> > & batch,
522 const string& group,
526 unsigned intbatch_size = batch.size();
532 unsigned intjob_id_cnt = job_id;
533 unsigned intgroup_id = 0;
534vector<string> aff_tokens;
535 stringscope =
client.GetScope();
538 for(
size_tk = 0; k < batch_size; ++k) {
539 const string& aff_token = batch[k].second;
540 if(!aff_token.empty())
541aff_tokens.push_back(aff_token);
547 if(!scope.empty()) {
553 "No available slots in the queue scope registry");
555 if(!group.empty()) {
561 "No available slots in the queue group registry");
563 if(!aff_tokens.empty()) {
569 "No available slots in the queue affinity registry");
573 for(
size_tk = 0; k < batch_size; ++k) {
575 CJob& job = batch[k].first;
576 const string& aff_token = batch[k].second;
579job.
SetId(job_id_cnt);
584 event.SetNodeAddr(
client.GetAddress());
587 event.SetTimestamp(curr_time);
588 event.SetClientNode(
client.GetNode());
589 event.SetClientSession(
client.GetSession());
591 if(!aff_token.empty()) {
593ResolveAffinityToken(aff_token,
602 m_Jobs[job_id_cnt] = job;
615jobs.
set_range(job_id, job_id + batch_size - 1);
619batch_size != aff_tokens.
size(),
628 for(
size_tk = 0; k < batch_size; ++k) {
630batch[k].
first.GetId(), curr_time,
631batch[k].first.GetAffinityId(), group_id,
632batch[k].first.GetExpirationTime(
m_Timeout,
642 for(
size_tk = 0; k < batch_size; ++k)
653 const string& job_key,
655 const string& auth_token,
664 "Output is too long");
720 unsigned inttimeout,
722 constlist<string> * aff_list,
725 boolexclusive_new_affinity,
726 boolprioritized_aff,
728 constlist<string> * group_list,
731 string& added_pref_aff)
743vector<unsigned int> aff_ids;
746 boolhas_groups =
false;
750 if(wnode_affinity) {
763 if(group_list !=
NULL) {
765has_groups = !group_list->empty();
767 if(aff_list !=
NULL)
783aff_ids_vector, aff_ids,
786exclusive_new_affinity,
788group_ids_vector, has_groups,
791 booloutdated_job =
false;
793 if(job_pick.
job_id== 0) {
794 if(exclusive_new_affinity)
799 if(job_pick.
job_id== 0) {
800 if(timeout != 0 && port > 0)
805wnode_affinity, any_affinity,
806exclusive_new_affinity,
807new_format, group_ids_vector);
810outdated_job =
true;
817 if(exclusive_new_affinity) {
825 if(outdated_pick.
job_id!= 0) {
826job_pick = outdated_pick;
827outdated_job =
true;
836outdated_job ==
false) {
847UpdatePreferredAffinities(
850added_pref_aff = aff_token;
853 if(outdated_job && job_pick.
aff_id!= 0) {
860UpdatePreferredAffinities(
863added_pref_aff = aff_token;
917 "which does not wait anything (node: " 918<<
client.GetNode() <<
" session: " 919<<
client.GetSession() <<
")");
935 "which does not wait anything (node: " 936<<
client.GetNode() <<
" session: " 937<<
client.GetSession() <<
")");
943 constlist<string> & aff_to_add,
944 constlist<string> & aff_to_del,
949 if(cmd_group ==
eGet)
956 unsigned intclient_id =
client.GetID();
962 boolany_to_add =
false;
963 boolany_to_del =
false;
966 for(list<string>::const_iterator k(aff_to_del.begin());
967k != aff_to_del.end(); ++k) {
973<<
"' deletes unknown affinity '" 974<< *k <<
"'. Ignored.");
975msgs.push_back(
"eAffinityNotFound:" 976 "unknown affinity to delete: "+ *k);
980 if(!current_affinities.
get_bit(aff_id)) {
984<<
"' deletes affinity '"<< *k
985<<
"' which is not in the list of the " 986 "preferred client affinities. Ignored.");
987msgs.push_back(
"eAffinityNotPreferred:not registered affinity " 993aff_id_to_del.
set_bit(aff_id);
1006 if(current_affinities.
count() + aff_to_add.size()
1007- aff_id_to_del.
count() >
1010 "The client '"+
client.GetNode() +
1011 "' exceeds the limit ("+
1013 ") of the preferred affinities. Changed request ignored.");
1017vector<string> already_added_affinities;
1023 for(list<string>::const_iterator k(aff_to_add.begin());
1024k != aff_to_add.end(); ++k ) {
1025 unsigned intaff_id =
1030 if(current_affinities.
get_bit(aff_id)) {
1031already_added_affinities.push_back(*k);
1035aff_id_to_add.
set_bit(aff_id);
1041 for(vector<string>::const_iterator j(already_added_affinities.begin());
1042j != already_added_affinities.end(); ++j) {
1045<<
"' adds affinity '"<< *j
1046<<
"' which is already in the list of the " 1047 "preferred client affinities. Ignored.");
1048msgs.push_back(
"eAffinityAlreadyPreferred:already registered " 1049 "affinity to add: "+ *j);
1052 if(any_to_add || any_to_del)
1060<<
"' has been garbage collected and tries to " 1061 "update its preferred affinities.");
1062msgs.push_back(
"eClientGarbageCollected:the client had been " 1063 "garbage collected");
1070 constlist<string> & aff,
1073 if(cmd_group ==
eGet)
1081 if(aff.size() > aff_reg_settings.
max_records) {
1083 "The client '"+
client.GetNode() +
1084 "' exceeds the limit ("+
1086 ") of the preferred affinities. Set request ignored.");
1089 unsigned intclient_id =
client.GetID();
1101 for(list<string>::const_iterator k(aff.begin());
1102k != aff.end(); ++k ) {
1103 unsigned intaff_id =
1108 if(current_affinities.
get_bit(aff_id))
1109already_added_aff_id.
set_bit(aff_id);
1111aff_id_to_set.
set_bit(aff_id);
1120 const string&
data,
intdata_version)
1146time_start = job_iter->second.GetLastEvent()->GetTimestamp();
1147run_timeout = job_iter->second.GetRunTimeout();
1149run_timeout = queue_run_timeout;
1151 if(time_start + run_timeout > curr + tm) {
1152job = job_iter->second;
1157job_iter->second.SetRunTimeout(curr + tm - time_start);
1158job_iter->second.SetLastTouch(curr);
1164exp_time = time_start + run_timeout;
1168job = job_iter->second;
1193time_start = job_iter->second.GetLastEvent()->GetTimestamp();
1194read_timeout = job_iter->second.GetReadTimeout();
1196read_timeout = queue_read_timeout;
1198 if(time_start + read_timeout > curr + tm) {
1199job = job_iter->second;
1205job_iter->second.SetReadTimeout(curr + tm - time_start);
1206job_iter->second.SetLastTouch(curr);
1212exp_time = time_start + read_timeout;
1216job = job_iter->second;
1225 string& client_sid,
1226 string& client_phid,
1227 string& progress_msg,
1241client_ip = job_iter->second.GetClientIP();
1242client_sid = job_iter->second.GetClientSID();
1243client_phid = job_iter->second.GetNCBIPHID();
1244progress_msg = job_iter->second.GetProgressMsg();
1268job_iter->second.SetLastTouch(curr);
1276job = job_iter->second;
1283 unsigned intaddress,
1284 unsigned shortport,
1287 boolneed_progress_msg,
1288 size_t* last_event_index)
1299*last_event_index = job_iter->second.GetLastEventIndex();
1300status = job_iter->second.GetStatus();
1302 unsigned intold_listener_addr = job_iter->second.GetListenerNotifAddr();
1303 unsigned shortold_listener_port = job_iter->second.GetListenerNotifPort();
1305 if(job_iter->second.GetNeedStolenNotif() &&
1306old_listener_addr != 0 && old_listener_port != 0) {
1307 if(old_listener_addr != address || old_listener_port != port) {
1315 if(address == 0 || port == 0 || timeout ==
kTimeZero) {
1318job_iter->second.SetListenerNotifAddr(0);
1319job_iter->second.SetListenerNotifPort(0);
1320job_iter->second.SetListenerNotifAbsTime(
kTimeZero);
1322job_iter->second.SetListenerNotifAddr(address);
1323job_iter->second.SetListenerNotifPort(port);
1324job_iter->second.SetListenerNotifAbsTime(curr + timeout);
1327job_iter->second.SetNeedLsnrProgressMsgNotif(need_progress_msg);
1328job_iter->second.SetNeedStolenNotif(need_stolen);
1329job_iter->second.SetLastTouch(curr);
1331job = job_iter->second;
1338 const string&
msg)
1347job_iter->second.SetProgressMsg(
msg);
1348job_iter->second.SetLastTouch(curr);
1357job = job_iter->second;
1363 unsigned intjob_id,
1364 const string& job_key,
1366 const string& auth_token,
1381 if(!auth_token.empty()) {
1384job_iter->second.CompareAuthToken(auth_token);
1387 "Invalid authorization token format");
1390 "Authorization token does not match");
1395 "passport matched.");
1396warning =
"eJobPassportOnlyMatch:Only job passport matched. " 1397 "Command is ignored.";
1398job = job_iter->second;
1404 unsigned intrun_count = job_iter->second.
GetRunCount();
1405 CJobEvent*
event= job_iter->second.GetLastEvent();
1408 ERR_POST(
"No JobEvent for running job");
1410 event= &job_iter->second.AppendEvent();
1411 event->SetNodeAddr(
client.GetAddress());
1424 event->SetTimestamp(current_time);
1425 event->SetClientNode(
client.GetNode());
1426 event->SetClientSession(
client.GetSession());
1429job_iter->second.SetRunCount(run_count - 1);
1432job_iter->second.SetLastTouch(current_time);
1465job = job_iter->second;
1471 unsigned intjob_id,
1472 const string& job_key,
1473 const string& auth_token,
1474 const string& aff_token,
1475 const string& group,
1476 bool& auth_token_ok,
1482 unsigned intaffinity_id = 0;
1483 unsigned intgroup_id = 0;
1484 unsigned intjob_affinity_id;
1485 unsigned intjob_group_id;
1491 if(!aff_token.empty() || !group.empty()) {
1492 if(!aff_token.empty())
1504job_iter->second.CompareAuthToken(auth_token);
1508 "Invalid authorization token format");
1511auth_token_ok =
false;
1512job = job_iter->second;
1517auth_token_ok =
true;
1522job_group_id = job_iter->second.GetGroupId();
1525job_iter->second.SetAffinityId(affinity_id);
1526job_iter->second.SetGroupId(group_id);
1528 unsigned intrun_count = job_iter->second.GetRunCount();
1529 CJobEvent*
event= job_iter->second.GetLastEvent();
1532 ERR_POST(
"No JobEvent for running job");
1534 event= &job_iter->second.AppendEvent();
1535 event->SetNodeAddr(
client.GetAddress());
1538 event->SetTimestamp(current_time);
1539 event->SetClientNode(
client.GetNode());
1540 event->SetClientSession(
client.GetSession());
1543job_iter->second.SetRunCount(run_count - 1);
1546job_iter->second.SetLastTouch(current_time);
1550 if(job_affinity_id != affinity_id) {
1551 if(job_affinity_id != 0)
1553 if(affinity_id != 0)
1556 if(job_group_id != group_id) {
1557 if(job_group_id != 0)
1562 if(job_affinity_id != affinity_id || job_group_id != group_id)
1585job = job_iter->second;
1591 unsigned intjob_id,
1592 const string& job_key,
1609 "Error fetching job");
1611 CJobEvent*
event= job_iter->second.GetLastEvent();
1613 ERR_POST(
"Inconsistency: a job has no events");
1615 event= &job_iter->second.AppendEvent();
1616 event->SetNodeAddr(
client.GetAddress());
1619 event->SetTimestamp(current_time);
1620 event->SetClientNode(
client.GetNode());
1621 event->SetClientSession(
client.GetSession());
1624job_iter->second.SetLastTouch(current_time);
1640job_iter->second.GetAffinityId(),
1645job = job_iter->second;
1666job_iter->second.SetLastTouch(curr);
1673job = job_iter->second;
1679 unsigned intjob_id,
1680 const string& job_key,
1682 boolis_ns_rollback)
1707 CJobEvent*
event= &job_iter->second.AppendEvent();
1715 event->SetTimestamp(current_time);
1716 event->SetClientNode(
client.GetNode());
1717 event->SetClientSession(
client.GetSession());
1720job_iter->second.SetLastTouch(current_time);
1723 if(is_ns_rollback) {
1756job = job_iter->second;
1764vector<CNetScheduleAPI::EJobStatus> statuses;
1791 stringscope =
client.GetScope();
1801 unsigned int count= 0;
1802 for(; en.
valid(); ++en) {
1803 unsigned intjob_id = *en;
1809 " while cancelling jobs");
1813 CJobEvent*
event= &job_iter->second.AppendEvent();
1818 event->SetTimestamp(current_time);
1819 event->SetClientNode(
client.GetNode());
1820 event->SetClientSession(
client.GetSession());
1823job_iter->second.SetLastTouch(current_time);
1857.
Print(
"job_phid", job_iter->second.GetNCBIPHID());
1880 const string& group,
1881 const string& aff_token,
1882 constvector<TJobStatus> & job_statuses,
1884vector<string> & warnings)
1886 if(group.empty() && aff_token.empty() && job_statuses.empty()) {
1893vector<TJobStatus> statuses;
1895 if(job_statuses.empty()) {
1909statuses = job_statuses;
1915 if(!group.empty()) {
1919jobs_to_cancel.
clear();
1920warnings.push_back(
"eGroupNotFound:job group "+ group +
1924 "' is not found. No jobs are canceled.");
1928 if(!aff_token.empty()) {
1931jobs_to_cancel.
clear();
1932warnings.push_back(
"eAffinityNotFound:affinity "+ aff_token +
1936 "' is not found. No jobs are canceled.");
1985 unsigned intstart_index =
m_LastId;
2013 unsigned inttimeout,
2014 constlist<string> * aff_list,
2015 boolreader_affinity,
2017 boolexclusive_new_affinity,
2018 boolprioritized_aff,
2019 constlist<string> * group_list,
2020 boolaffinity_may_change,
2021 boolgroup_may_change,
2023 bool* no_more_jobs,
2025 string& added_pref_aff)
2030 boolhas_groups =
false;
2032vector<unsigned int> aff_ids;
2037*no_more_jobs =
false;
2041 if(reader_affinity) {
2054 if(group_list !=
NULL) {
2056has_groups = !group_list->empty();
2058 if(aff_list !=
NULL)
2074aff_ids_vector, aff_ids,
2077exclusive_new_affinity,
2079group_ids_vector, has_groups,
2083 booloutdated_job =
false;
2086 if(job_pick.
job_id== 0) {
2087 if(exclusive_new_affinity)
2091 if(job_pick.
job_id== 0) {
2093reader_affinity, any_affinity,
2094exclusive_new_affinity,
2096affinity_may_change,
2098 if(timeout != 0 && port > 0)
2101reader_affinity, any_affinity,
2102exclusive_new_affinity,
2106outdated_job =
true;
2116 if(exclusive_new_affinity) {
2124 if(outdated_pick.
job_id!= 0) {
2125job_pick = outdated_pick;
2126outdated_job =
true;
2135outdated_job ==
false) {
2147added_pref_aff = aff_token;
2151 if(outdated_job && job_pick.
aff_id!= 0) {
2158UpdatePreferredAffinities(
2161added_pref_aff = aff_token;
2202 unsigned intjob_id,
2203 const string& job_key,
2205 const string& auth_token)
2208 client, job_id, job_key,
2209job, auth_token,
"",
2218 unsigned intjob_id,
2219 const string& job_key,
2221 const string& auth_token,
2222 const string& err_msg,
2226 client, job_id, job_key,
2227job, auth_token, err_msg,
2229 false, no_retries);
2236 unsigned intjob_id,
2237 const string& job_key,
2239 const string& auth_token,
2240 boolis_ns_rollback,
2245 client, job_id, job_key,
2246job, auth_token,
"",
2250 if(is_ns_rollback || blacklist ==
false)
2259 unsigned intjob_id,
2260 const string& job_key,
2291 "Error fetching job");
2293 constvector<CJobEvent>& job_events = job_iter->second.GetEvents();
2294 if(job_events.empty())
2296 "Inconsistency: a job has no events");
2298state_before_read = job_iter->second.GetStatusBeforeReading();
2300 CJobEvent*
event= &job_iter->second.AppendEvent();
2302 event->SetStatus(state_before_read);
2304 event->SetTimestamp(current_time);
2305 event->SetClientNode(
client.GetNode());
2306 event->SetClientSession(
client.GetSession());
2308job_iter->second.SetStatus(state_before_read);
2309job_iter->second.SetLastTouch(current_time);
2336job = job_iter->second;
2342 unsigned intjob_id,
2343 const string& job_key,
2345 const string& auth_token,
2346 const string& err_msg,
2348 boolis_ns_rollback,
2367 if(is_ns_rollback ==
false) {
2369job_iter->second.CompareAuthToken(auth_token);
2372 "Invalid authorization token format");
2375 "Authorization token does not match");
2381 "Internal inconsistency detected. The job state in memory is "+
2383 " while in database it is "+
2387target_status = job_iter->second.GetStatusBeforeReading();
2391 CJobEvent&
event= job_iter->second.AppendEvent();
2393 event.SetNodeAddr(
client.GetAddress());
2394 event.SetClientNode(
client.GetNode());
2395 event.SetClientSession(
client.GetSession());
2396 event.SetErrorMsg(err_msg);
2398 if(is_ns_rollback) {
2400job_iter->second.SetReadCount(job_iter->second.GetReadCount() - 1);
2402 switch(target_status) {
2407job_iter->second.SetReadCount(job_iter->second.GetReadCount() - 1);
2431 event.SetStatus(target_status);
2432job_iter->second.SetStatus(target_status);
2433job_iter->second.SetLastTouch(current_time);
2465job = job_iter->second;
2491 size_tjob_count = job_ids.
count();
2512 constvector<unsigned int> & aff_ids,
2513 booluse_pref_affinity,
2515 boolexclusive_new_affinity,
2516 boolprioritized_aff,
2521 stringscope =
client.GetScope();
2522 stringvirtual_scope =
client.GetVirtualScope();
2524 if(!virtual_scope.empty()) {
2527aff_ids, use_pref_affinity,
2529exclusive_new_affinity,
2531group_ids, has_groups,
2532cmd_group, virtual_scope);
2533 if(job_pick.
job_id!= 0)
2540any_affinity, exclusive_new_affinity,
2541prioritized_aff, group_ids, has_groups,
2549 constvector<unsigned int> & aff_ids,
2550 booluse_pref_affinity,
2552 boolexclusive_new_affinity,
2553 boolprioritized_aff,
2557 const string& scope)
2559 boolexplicit_aff = !aff_ids.empty();
2560 booleffective_use_pref_affinity = use_pref_affinity;
2572 if(use_pref_affinity)
2573effective_use_pref_affinity = use_pref_affinity && pref_aff.
any();
2575 if(explicit_aff || effective_use_pref_affinity || exclusive_new_affinity) {
2579 if(cmd_group ==
eGet)
2600 if(cmd_group ==
eRead)
2603 if(prioritized_aff) {
2606 for(vector<unsigned int>::const_iterator k = aff_ids.begin();
2607k != aff_ids.end(); ++k) {
2609GetJobsWithAffinity(*k);
2611 if(candidates.
any()) {
2614 for(; en.
valid(); ++en) {
2617job_id, running_jobs_per_client)) {
2624 if(vacant_jobs.
any()) {
2627 for(; en.
valid(); ++en) {
2630job_id, running_jobs_per_client)) {
2642 if(exclusive_new_affinity)
2647 for(; en.
valid(); ++en) {
2648 unsigned intjob_id = *en;
2651 if(aff_id != 0 && explicit_aff) {
2652 if(explicit_affs.
get_bit(aff_id)) {
2654job_id, running_jobs_per_client)) {
2660 if(aff_id != 0 && effective_use_pref_affinity) {
2661 if(pref_aff.
get_bit(aff_id)) {
2662 if(explicit_aff ==
false) {
2664job_id, running_jobs_per_client)) {
2669pref_aff_candidate_jobs.
set_bit(job_id);
2674 if(exclusive_new_affinity) {
2675 if(aff_id == 0 || all_pref_aff.
get_bit(aff_id) ==
false) {
2676 if(explicit_aff ==
false&&
2677effective_use_pref_affinity ==
false) {
2679job_id, running_jobs_per_client)) {
2684exclusive_aff_candidate_jobs.
set_bit(job_id);
2690 for(; en1.
valid(); ++en1) {
2697 for(; en2.
valid(); ++en2) {
2711use_pref_affinity && !effective_use_pref_affinity &&
2712!exclusive_new_affinity &&
2713cmd_group ==
eGet)) {
2717 boolno_scope_only = scope.
empty() ||
2719 unsigned intjob_id = 0;
2729 if(cmd_group ==
eGet) {
2738 if(no_scope_only) {
2742 for(; en.
valid(); ++en) {
2743 unsigned intcandidate_job_id = *en;
2744 if(jobs_in_scope.
get_bit(candidate_job_id))
2746 if(!group_jobs.
get_bit(candidate_job_id))
2749running_jobs_per_client)) {
2750job_id = candidate_job_id;
2755 for(; en.
valid(); ++en) {
2756 unsigned intcandidate_job_id = *en;
2757 if(jobs_in_scope.
get_bit(candidate_job_id))
2760running_jobs_per_client)) {
2761job_id = candidate_job_id;
2768 for(; en.
valid(); ++en) {
2769 unsigned intcandidate_job_id = *en;
2770 if(jobs_in_scope.
get_bit(candidate_job_id))
2772 if(!restricted_jobs.
get_bit(candidate_job_id))
2775running_jobs_per_client)) {
2776job_id = candidate_job_id;
2782 if(no_scope_only) {
2811restricted_jobs,
true);
2828 for(; en.
valid(); ++en) {
2831 stringclient_ip = job_iter->second.GetClientIP();
2832 autoiter = ret.
find(client_ip);
2833 if(iter == ret.
end()) {
2846 unsigned intjob_id,
2849 if(jobs_per_client_ip.
empty())
2856 stringclient_ip = job_iter->second.GetClientIP();
2857 autoiter = jobs_per_client_ip.
find(client_ip);
2858 if(iter == jobs_per_client_ip.
end())
2866 unsigned intpicked_earlier,
2872 stringscope =
client.GetScope();
2873 stringvirtual_scope =
client.GetVirtualScope();
2875 if(!virtual_scope.empty()) {
2880 if(job_pick.
job_id!= 0)
2893 unsigned intpicked_earlier,
2895 const string& scope)
2901 if(picked_earlier != 0)
2902outdated_pending.
set_bit(picked_earlier,
false);
2911 if(group_ids.
any())
2914 if(!outdated_pending.
any())
2928 unsigned intpicked_earlier,
2934 stringscope =
client.GetScope();
2935 stringvirtual_scope =
client.GetVirtualScope();
2937 if(!virtual_scope.empty()) {
2943 if(job_pick.
job_id!= 0)
2956 unsigned intpicked_earlier,
2958 const string& scope)
2964 if(picked_earlier != 0)
2965outdated_read_jobs.
set_bit(picked_earlier,
false);
2968outdated_read_jobs);
2975 if(group_ids.
any())
2978 if(!outdated_read_jobs.
any())
2981 unsigned intjob_id = *outdated_read_jobs.
first();
2983 return x_SJobPick(job_id, aff_id != 0, aff_id);
2988 unsigned intjob_id,
2989 const string& job_key,
2991 const string& auth_token,
2992 const string& err_msg,
2998 unsignedfailed_retries;
2999 unsignedmax_output_size;
3006 if(
output.size() > max_output_size) {
3008 "Output is too long");
3012 boolrescheduled =
false;
3033 "Error fetching job");
3035 if(!auth_token.empty()) {
3038job_iter->second.CompareAuthToken(auth_token);
3041 "Invalid authorization token format");
3044 "Authorization token does not match");
3049 "passport matched.");
3050warning =
"eJobPassportOnlyMatch:Only job passport " 3051 "matched. Command is ignored.";
3052job = job_iter->second;
3058 CJobEvent*
event= job_iter->second.GetLastEvent();
3060 ERR_POST(
"No JobEvent for running job");
3062 event= &job_iter->second.AppendEvent();
3068 event->SetTimestamp(curr);
3069 event->SetErrorMsg(err_msg);
3070 event->SetRetCode(ret_code);
3071 event->SetNodeAddr(
client.GetAddress());
3072 event->SetClientNode(
client.GetNode());
3073 event->SetClientSession(
client.GetSession());
3078rescheduled =
false;
3081 "unconditionally, no_retries = 1");
3083 unsignedrun_count = job_iter->second.GetRunCount();
3084 if(run_count <= failed_retries) {
3090rescheduled =
true;
3095rescheduled =
false;
3098 "max number of retries (" 3099<< failed_retries <<
")");
3103job_iter->second.SetOutput(
output);
3104job_iter->second.SetLastTouch(curr);
3146job = job_iter->second;
3158 bool& client_was_found,
3159 string& old_session,
3160 bool& had_wn_pref_affs,
3161 bool& had_reader_pref_affs)
3172client_was_found, old_session,
3173had_wn_pref_affs, had_reader_pref_affs);
3177 if(running_jobs.
any())
3179 if(reading_jobs.
any())
3195 if(outdated_jobs.
any())
3209 if(outdated_jobs.
any())
3219 static size_tskip_limit = 0;
3220 static size_tskip_count;
3229 if(skip_count < skip_limit)
3272 stringscope =
client.GetScope();
3277 else if(!scope.empty())
3290 stringscope =
client.GetScope();
3295 else if(!scope.empty())
3325 for( ;en.
valid(); ++en) {
3327*en, curr, logging);
3334 unsigned intjob_id,
3364 CJobEvent*
event= job_iter->second.GetLastEvent();
3365time_start =
event->GetTimestamp();
3366run_timeout = job_iter->second.GetRunTimeout();
3368run_timeout = queue_run_timeout;
3375read_timeout = job_iter->second.GetReadTimeout();
3377read_timeout = queue_read_timeout;
3386exp_time = time_start + run_timeout;
3388exp_time = time_start + read_timeout;
3390 if(curr_time < exp_time) {
3407new_status = job_iter->second.GetStatusBeforeReading();
3412job_iter->second.SetStatus(new_status);
3413job_iter->second.SetLastTouch(curr_time);
3415 event= &job_iter->second.AppendEvent();
3416 event->SetStatus(new_status);
3417 event->SetEvent(event_type);
3418 event->SetTimestamp(curr_time);
3486purpose =
"execution";
3488purpose =
"reading";
3491.
Print(
"msg",
"Timeout expired, rescheduled for "+ purpose)
3492.
Print(
"msg_code",
"410")
3496.
Print(
"run_counter", job_iter->second.GetRunCount())
3497.
Print(
"read_counter", job_iter->second.GetReadCount())
3500.
Print(
"run_timeout", run_timeout)
3501.
Print(
"read_timeout", read_timeout);
3513 unsigned intlast_job,
3518 unsigned intjob_id;
3532 if(last_job != 0 && job_id >= last_job)
3562 if(
result.deleted > 0) {
3566 for(; en.
valid(); ++en) {
3567 unsigned int id= *en;
3625 unsigned intadd_job_id,
3650 unsigned intdel_rec = 0;
3654 while(en.
valid() && del_rec < max_deleted) {
3661 unsigned intjob_id = *en;
3664 if(del_count > 0) {
3666deleted_jobs.
set_bit(job_id);
3683 for(; en.
valid(); ++en) {
3717 unsigned intdel_limit = aff_reg_settings.
high_removal;
3723 unsigned intcandidates_size =
3726 if(candidates_size <
3753 unsigned intdel_limit = group_reg_settings.
high_removal;
3754 if(group_dict_size <
3759 unsigned intcandidates_size =
3762 if(candidates_size <
3811 unsigned intjob_id,
3825 stringscope =
client.GetScope();
3833}
else if(!scope.empty()) {
3842job_dump.reserve(2048);
3848job_dump = job_iter->second.Print(dump_fields,
3852job_dump.append(
"OK:GC erase time: ")
3855 if(dump_fields &
eScope)
3856job_dump.append(
"OK:scope: '")
3868 const string& group,
3869 const string& aff_token,
3870 constvector<TJobStatus> & job_statuses,
3871 unsigned intstart_after_job_id,
3872 unsigned int count,
3880vector<TJobStatus> statuses;
3883 if(job_statuses.empty()) {
3897statuses = job_statuses;
3902 stringscope =
client.GetScope();
3907 if(!group.empty()) {
3911jobs_to_dump.
clear();
3914 "' is not found. No jobs to dump.");
3918 if(!aff_token.empty()) {
3921jobs_to_dump.
clear();
3924 "' is not found. No jobs to dump.");
3932}
else if(!scope.empty()) {
3939dump_fields, order_first);
3944 unsigned intstart_after_job_id,
3945 unsigned int count,
3949 if(!jobs_to_dump.
any())
3953 size_tskipped_jobs = 0;
3955 while(en.
valid() && *en <= start_after_job_id) {
3960 if(
count> 0 && !order_first) {
3961 size_ttotal_jobs = jobs_to_dump.
count();
3962 size_tjobs_left = total_jobs - skipped_jobs;
3963 while(jobs_left >
count) {
3972buffer_size =
count;
3975 result.reserve(2048*buffer_size);
3978vector<CJob>
buffer(buffer_size);
3979 size_tread_jobs = 0;
3980 size_tprinted_count = 0;
3982 for( ; en.
valid(); ) {
3986 for( ; en.
valid() && read_jobs < buffer_size; ++en ) {
3989 buffer[read_jobs] = job_iter->second;
3994 if(printed_count >=
count)
4002one_job.reserve(2048);
4003 for(
size_tindex = 0; index < read_jobs; ++index) {
4010 unsigned intjob_id =
buffer[index].GetId();
4017one_job.append(
"OK:GC erase time: ")
4021 if(dump_fields &
eScope)
4022one_job.append(
"OK:scope: '")
4031 if(printed_count >=
count)
4065 bool& client_was_found,
4066 bool& session_was_reset,
4067 string& old_session,
4068 bool& had_wn_pref_affs,
4069 bool& had_reader_pref_affs)
4082client_was_found, session_was_reset,
4083old_session, had_wn_pref_affs,
4084had_reader_pref_affs);
4088 if(session_was_reset) {
4089 if(running_jobs.
any())
4091 if(reading_jobs.
any())
4121 unsigned intjob_id,
4131 ERR_POST(
"Cannot fetch job to reset it due to "<<
4148new_status = job_iter->second.GetStatusBeforeReading();
4153job_iter->second.SetStatus(new_status);
4154job_iter->second.SetLastTouch(current_time);
4156 CJobEvent*
event= &job_iter->second.AppendEvent();
4158 event->SetEvent(event_type);
4159 event->SetTimestamp(current_time);
4160 event->SetClientNode(
client.GetNode());
4161 event->SetClientSession(
client.GetSession());
4221 ERR_POST(
"Error resetting a running job when worker node is " 4237 ERR_POST(
"Error resetting a reading job when worker node is " 4253 ERR_POST(
"Error resetting a running job when worker node " 4269 ERR_POST(
"Error resetting a reading job when worker node " 4277 unsigned shortport,
4278 unsigned inttimeout,
4282 boolexclusive_new_affinity,
4289exclusive_new_affinity, new_format,
4291 if(
client.IsComplete())
4300 unsigned shortport,
4301 unsigned inttimeout,
4305 boolexclusive_new_affinity,
4310reader_aff, any_aff,
4311exclusive_new_affinity,
true,
4318 unsigned shortport)
4320 if(
client.IsComplete())
4349 ctx->SetRequestID();
4358aff_count += affinities;
4361extra.
Print(
"_type",
"statistics_thread")
4364.
Print(
"affinities", affinities)
4389vector<TJobStatus> statuses;
4416.append(
"OK:garbage_jobs: ")
4419.append(
"OK:affinity_registry_size: ")
4422.append(
"OK:client_registry_size: ")
4430 const string& group_token,
4431 const string& aff_token,
4433vector<string> & warnings)
const 4439 if(!group_token.empty()) {
4443warnings.push_back(
"eGroupNotFound:job group "+ group_token +
4447 if(!aff_token.empty()) {
4450warnings.push_back(
"eAffinityNotFound:affinity "+ aff_token +
4456 if(!warnings.empty()) {
4466 stringscope =
client.GetScope();
4469candidates.
clear();
4472 if(!group_token.empty())
4473candidates &= group_jobs;
4474 if(!aff_token.empty())
4475candidates &= aff_jobs;
4482}
else if(!scope.empty()) {
4487jobs[index] = candidates.
count();
4493 const string& group_token,
4494 const string& aff_token,
4495vector<string> & warnings)
const 4505 if(warnings.empty()) {
4509 ": "+ to_string(jobs_per_state[index]) +
"\n";
4510total += jobs_per_state[index];
4512 result+=
"OK:Total: "+ to_string(total) +
"\n";
4520vector<CNetScheduleAPI::EJobStatus> statuses;
4532 boolneed_notifications = (status ==
eNoPause&&
4536 if(need_notifications)
4544 unsigned shortport,
4553 const string& auth_token,
4564 if(!auth_token.empty()) {
4567job_iter->second.CompareAuthToken(auth_token);
4570 "Invalid authorization token format");
4573 "Authorization token does not match");
4578 "passport matched.");
4584 CJobEvent*
event= &job_iter->second.AppendEvent();
4587 event->SetTimestamp(curr);
4588 event->SetRetCode(ret_code);
4590 event->SetClientNode(
client.GetNode());
4591 event->SetClientSession(
client.GetSession());
4592 event->SetNodeAddr(
client.GetAddress());
4595job_iter->second.SetOutput(
output);
4596job_iter->second.SetLastTouch(curr);
4598job = job_iter->second;
4606 unsigned intjob_id,
4614 CJobEvent&
event= job_iter->second.AppendEvent();
4616 event.SetNodeAddr(
client.GetAddress());
4617 event.SetClientNode(
client.GetNode());
4618 event.SetClientSession(
client.GetSession());
4620 if(cmd_group ==
eGet) {
4628job_iter->second.SetLastTouch(curr);
4629 if(cmd_group ==
eGet) {
4631job_iter->second.SetRunTimeout(
kTimeZero);
4632job_iter->second.SetRunCount(job_iter->second.GetRunCount() + 1);
4635job_iter->second.SetReadTimeout(
kTimeZero);
4636job_iter->second.SetReadCount(job_iter->second.GetReadCount() + 1);
4639job = job_iter->second;
4647vector<TJobStatus> statuses;
4666 if(!jobs_to_dump.
any())
4671FILE * jobs_file =
NULL;
4680jobs_file = fopen(jobs_file_name.c_str(),
"wb");
4681 if(jobs_file ==
NULL)
4682 throwruntime_error(
"Cannot open file "+ jobs_file_name +
4686setbuf(jobs_file,
NULL);
4690header.
Write(jobs_file);
4693 for( ; en.
valid(); ++en) {
4696 ERR_POST(
"Dump at SHUTDOWN: error fetching job "<<
4701job_iter->second.Dump(jobs_file);
4703}
catch(
constexception & ex) {
4704 if(jobs_file !=
NULL)
4707 throwruntime_error(
"Error dumping queue "+
m_QueueName+
4708 ": "+
string(ex.what()));
4722 if(access(jobs_file_name.c_str(), F_OK) != -1)
4723 remove(jobs_file_name.c_str());
4737 unsigned intrecs = 0;
4739FILE * jobs_file =
NULL;
4741 if(!
CDir(dump_dname).Exists())
4743 if(!
CFile(jobs_file_name).Exists())
4750jobs_file = fopen(jobs_file_name.c_str(),
"rb");
4751 if(jobs_file ==
NULL)
4752 throwruntime_error(
"Cannot open file "+ jobs_file_name +
4753 " to load dumped jobs");
4756header.
Read(jobs_file);
4762input_buf.
get(), output_buf.
get(),
4764 unsigned intjob_id = job.
GetId();
4802aff_id, group_id, expiration);
4813}
catch(
constexception & ex) {
4814 if(jobs_file !=
NULL)
4818 throwruntime_error(
"Error loading queue "+
m_QueueName+
4819 " from its dump: "+
string(ex.what()));
4821 if(jobs_file !=
NULL)
4825 throwruntime_error(
"Unknown error loading queue "+
m_QueueName+
4854 const string& job_key,
4858 stringnotification;
4867job, job_key, job_status, reason);
4877 if(notification.empty())
4879job, job_key, job_status, reason);
Algorithms for bvector<> (main include)
void Release()
Manually force the resource to be released.
static std::string EventToString(EJobEvent event)
void SetNodeAddr(unsigned int node_ip)
void SetStatus(TJobStatus status)
void SetTimestamp(const CNSPreciseTime &t)
CNSPreciseTime GetLifetime(unsigned int job_id) const
bool DeleteIfTimedOut(unsigned int job_id, const CNSPreciseTime ¤t_time, unsigned int *aff_id, unsigned int *group_id)
void UpdateReadVacantTime(unsigned int job_id, const CNSPreciseTime &read_vacant_time)
void RegisterJob(unsigned int job_id, const CNSPreciseTime &submit_time, unsigned int aff_id, unsigned int group_id, const CNSPreciseTime &life_time)
void UpdateLifetime(unsigned int job_id, const CNSPreciseTime &life_time)
unsigned int GetAffinityID(unsigned int job_id) const
bool IsOutdatedJob(unsigned int job_id, ECommandGroup cmd_group, const CNSPreciseTime &timeout) const
void ChangeAffinityAndGroup(unsigned int job_id, unsigned int aff_id, unsigned int group_id)
unsigned GetNext(TJobStatus status, unsigned job_id) const
void SetStatus(unsigned int job_id, TJobStatus status)
void Erase(unsigned job_id)
void GetJobs(const vector< TJobStatus > &statuses, TNSBitVector &jobs) const
void AddPendingJob(unsigned int job_id)
void StatusStatistics(TJobStatus status, TNSBitVector::statistics *st) const
vector< unsigned int > GetJobCounters(const vector< TJobStatus > &statuses) const
void SetExactStatusNoLock(unsigned int job_id, TJobStatus status, bool set_clear)
unsigned int CountStatus(TJobStatus status) const
TJobStatus GetStatus(unsigned job_id) const
TNSBitVector GetOutdatedReadVacantJobs(CNSPreciseTime timeout, const TNSBitVector &read_jobs, const CJobGCRegistry &gc_registry) const
void ClearAll(TNSBitVector *bv)
void AddPendingBatch(unsigned job_id_from, unsigned job_id_to)
unsigned int GetJobByStatus(TJobStatus status, const TNSBitVector &unwanted_jobs, const TNSBitVector &restrict_jobs, bool restricted) const
TNSBitVector GetOutdatedPendingJobs(CNSPreciseTime timeout, const CJobGCRegistry &gc_registry) const
void SetPassport(unsigned int passport)
unsigned GetRunCount() const
CNSPreciseTime GetTimeout() const
bool GetSubmNeedProgressMsgNotif() const
unsigned GetSubmAddr() const
bool ShouldNotifyListener(const CNSPreciseTime ¤t_time) const
void SetAffinityId(unsigned aff_id)
void SetLastTouch(const CNSPreciseTime &t)
unsigned int GetListenerNotifAddr() const
unsigned short GetSubmNotifPort() const
const string & GetInput() const
unsigned GetGroupId() const
CNSPreciseTime GetRunTimeout() const
void SetGroupId(unsigned id)
unsigned short GetListenerNotifPort() const
TJobStatus GetStatus() const
CJobEvent & AppendEvent()
CNSPreciseTime GetSubmitTime(void) const
bool GetLsnrNeedProgressMsgNotif() const
bool ShouldNotifySubmitter(const CNSPreciseTime ¤t_time) const
unsigned GetAffinityId() const
CNSPreciseTime GetExpirationTime(const CNSPreciseTime &queue_timeout, const CNSPreciseTime &queue_run_timeout, const CNSPreciseTime &queue_read_timeout, const CNSPreciseTime &queue_pending_timeout, const CNSPreciseTime &event_time) const
CNSPreciseTime GetLastTouch() const
CNSPreciseTime GetReadTimeout() const
bool LoadFromDump(FILE *jobs_file, char *input_buf, char *output_buf, const SJobDumpHeader &header)
void RemoveJobFromAffinity(unsigned int job_id, unsigned int aff_id)
unsigned int ResolveAffinity(const string &token)
TNSBitVector GetJobsWithAffinity(unsigned int aff_id) const
void Dump(const string &dump_dir_name, const string &queue_name) const
void FinalizeAffinityDictionaryLoading(void)
TNSBitVector GetJobsWithAffinities(const TNSBitVector &affs) const
void RemoveDump(const string &dump_dir_name, const string &queue_name) const
bool CanAccept(const string &aff_token, size_t max_records) const
string Print(const CQueue *queue, const CNSClientsRegistry &clients_registry, const TNSBitVector &scope_jobs, const string &scope, size_t batch_size, bool verbose) const
string GetTokenByID(unsigned int aff_id) const
void ResolveAffinities(const list< string > &tokens, TNSBitVector &resolved_affs, vector< unsigned int > &aff_ids)
TNSBitVector GetRegisteredAffinities(void) const
unsigned int CollectGarbage(unsigned int max_to_del)
void LoadFromDump(const string &dump_dir_name, const string &queue_name)
unsigned int GetIDByToken(const string &aff_token) const
unsigned int CheckRemoveCandidates(void)
unsigned int ResolveAffinityToken(const string &token, unsigned int job_id, unsigned int client_id, ECommandGroup command_group)
void AddJobToAffinity(unsigned int job_id, unsigned int aff_id)
void AppendType(const CNSClientId &client, unsigned int type_to_append)
bool IsPreferredByAny(unsigned int aff_id, ECommandGroup cmd_group) const
void RegisterJob(const CNSClientId &client, unsigned int job_id, ECommandGroup cmd_group)
void SetPreferredAffinities(const CNSClientId &client, const TNSBitVector &aff_to_set, ECommandGroup cmd_group)
void SubtractBlacklistedJobs(const CNSClientId &client, ECommandGroup cmd_group, TNSBitVector &bv) const
void Purge(const CNSPreciseTime ¤t_time, const CNSPreciseTime &timeout_worker_node, unsigned int min_worker_nodes, const CNSPreciseTime &timeout_admin, unsigned int min_admins, const CNSPreciseTime &timeout_submitter, unsigned int min_submitters, const CNSPreciseTime &timeout_reader, unsigned int min_readers, const CNSPreciseTime &timeout_unknown, unsigned int min_unknowns, bool is_log)
void StaleNodes(const CNSPreciseTime ¤t_time, const CNSPreciseTime &wn_timeout, const CNSPreciseTime &reader_timeout, bool is_log)
void AddToSubmitted(const CNSClientId &client, size_t count)
string PrintClientsList(const CQueue *queue, size_t batch_size, bool verbose) const
void UnregisterJob(const CNSClientId &client, unsigned int job_id, ECommandGroup cmd_group)
TNSBitVector GetAllPreferredAffinities(ECommandGroup cmd_group) const
void RegisterBlacklistedJob(const CNSClientId &client, unsigned int job_id, ECommandGroup cmd_group)
bool CancelWaiting(CNSClient &client, ECommandGroup cmd_group, bool touch_notif_registry=true)
void SetBlacklistTimeouts(const CNSPreciseTime &blacklist_timeout, const CNSPreciseTime &read_blacklist_timeout)
void MoveJobToBlacklist(const CNSClientId &client, unsigned int job_id, ECommandGroup cmd_group)
void ClearClient(const CNSClientId &client, TNSBitVector &running_jobs, TNSBitVector &reading_jobs, bool &client_was_found, string &old_session, bool &had_wn_pref_affs, bool &had_reader_pref_affs)
void GCBlacklistedJobs(const CJobStatusTracker &tracker, ECommandGroup cmd_group)
void UpdatePreferredAffinities(const CNSClientId &client, const TNSBitVector &aff_to_add, const TNSBitVector &aff_to_del, ECommandGroup cmd_group)
void Touch(CNSClientId &client, TNSBitVector &running_jobs, TNSBitVector &reading_jobs, bool &client_was_found, bool &session_was_reset, string &old_session, bool &had_wn_pref_affs, bool &had_reader_pref_affs)
bool GetAffinityReset(const CNSClientId &client, ECommandGroup cmd_group) const
void SetLastScope(const CNSClientId &client)
void MarkAsAdmin(const CNSClientId &client)
void RegisterSocketWriteError(const CNSClientId &client)
int SetClientData(const CNSClientId &client, const string &data, int data_version)
void SetRegistries(CNSAffinityRegistry *aff_registry, CNSNotificationList *notif_registry)
void SetNodeWaiting(const CNSClientId &client, unsigned short port, const TNSBitVector &aff_ids, ECommandGroup cmd_group)
TNSBitVector GetPreferredAffinities(const CNSClientId &client, ECommandGroup cmd_group) const
bool WasGarbageCollected(const CNSClientId &client, ECommandGroup cmd_group) const
void AddBlacklistedJobs(const CNSClientId &client, ECommandGroup cmd_group, TNSBitVector &bv) const
void RemoveJob(unsigned int group_id, unsigned int job_id)
void RemoveDump(const string &dump_dir_name, const string &queue_name) const
unsigned int CollectGarbage(unsigned int max_to_del)
unsigned int CheckRemoveCandidates(void)
TNSBitVector GetJobs(const string &group, bool allow_exception=true) const
unsigned int ResolveGroup(const string &group)
bool CanAccept(const string &group, size_t max_records) const
void AddJobToGroup(unsigned int group_id, unsigned int job_id)
unsigned int AddJob(const string &group, unsigned int job_id)
unsigned int AddJobs(unsigned int group_id, unsigned int first_job_id, unsigned int count)
void FinalizeGroupDictionaryLoading(void)
string Print(const CQueue *queue, const TNSBitVector &scope_jobs, const string &scope, size_t batch_size, bool verbose) const
void ResolveGroups(const list< string > &tokens, TNSBitVector &group_ids_vector)
void RestrictByGroup(const string &group, TNSBitVector &bv) const
void Dump(const string &dump_dir_name, const string &queue_name) const
void LoadFromDump(const string &dump_dir_name, const string &queue_name)
string BuildJobChangedNotification(const CJob &job, const string &job_key, TJobStatus job_status, ENotificationReason reason)
void onQueueResumed(bool any_pending)
void Notify(unsigned int job_id, unsigned int aff_id, CNSClientsRegistry &clients_registry, CNSAffinityRegistry &aff_registry, CNSGroupsRegistry &group_registry, CNSScopeRegistry &scope_registry, const CNSPreciseTime ¬if_highfreq_period, const CNSPreciseTime ¬if_handicap, ECommandGroup cmd_group)
void AddToQueueResumedNotifications(unsigned int address, unsigned short port, bool new_format)
void NotifyJobChanges(unsigned int address, unsigned short port, const string ¬ification)
void UnregisterListener(const CNSClientId &client, unsigned short port, ECommandGroup cmd_group)
void CheckOutdatedJobs(const TNSBitVector &outdated_jobs, CNSClientsRegistry &clients_registry, const CNSPreciseTime ¬if_highfreq_period, ECommandGroup cmd_group)
void ClearExactGetNotifications(void)
void CheckTimeout(const CNSPreciseTime ¤t_time, CNSClientsRegistry &clients_registry, ECommandGroup cmd_group)
void NotifyPeriodically(const CNSPreciseTime ¤t_time, unsigned int notif_lofreq_mult, CNSClientsRegistry &clients_registry)
void RegisterListener(const CNSClientId &client, unsigned short port, unsigned int timeout, bool wnode_aff, bool any_job, bool exclusive_new_affinity, bool new_format, const TNSBitVector &groups, ECommandGroup cmd_group)
string Print(const CNSClientsRegistry &clients_registry, const CNSAffinityRegistry &aff_registry, const CNSGroupsRegistry &group_registry, bool verbose) const
CNSPreciseTime NotifyExactListeners(void)
static CNSPreciseTime Current(void)
TNSBitVector GetAllJobsInScopes(void) const
void AddJobs(const string &scope, unsigned int first_job_id, unsigned int count)
string Print(const CQueue *queue, size_t batch_size, bool verbose) const
bool CanAccept(const string &scope, size_t max_records) const
TNSBitVector GetJobs(const string &scope) const
string GetJobScope(unsigned int job_id) const
void RemoveJob(unsigned int job_id)
void AddJob(const string &scope, unsigned int job_id)
CJsonNode SetHosts(const string &host_names)
NetSchedule internal exception.
@ eStatus_OK
Command is ok and execution is good.
NetScheduler threaded server.
void SetJobsStartID(const string &qname, unsigned int value)
unsigned int GetJobsStartID(const string &qname)
SNSRegistryParameters GetAffRegistrySettings(void) const
bool ShouldPerfLogTransitions(const string &queue_name, const string &class_name) const
CCompoundIDPool GetCompoundIDPool(void) const
SNSRegistryParameters GetScopeRegistrySettings(void) const
SNSRegistryParameters GetGroupRegistrySettings(void) const
void AddClientInfo(const CQueueClientInfo &cinfo)
map< string, string > GetLinkedSection(const string §ion_name) const
unsigned GetNumParams() const
unsigned int GetMaxOutputSize() const
unsigned int GetFailedRetries() const
string GetParamValue(unsigned int n) const
unsigned int GetMaxInputSize() const
string GetParamName(unsigned int n) const
CFastMutex m_OperationLock
void x_ResetReadingDueToClear(const CNSClientId &client, const TNSBitVector &jobs)
void SetPauseStatus(const CNSClientId &client, TPauseStatus status)
CFastMutex m_JobsToDeleteLock
unsigned int CountActiveJobs(void) const
map< string, size_t > x_GetRunningJobsPerClientIP(void)
CNSScopeRegistry m_ScopeRegistry
void x_ResetRunningDueToNewSession(const CNSClientId &client, const TNSBitVector &jobs)
CNSPreciseTime m_ClientRegistryTimeoutSubmitter
TJobStatus ConfirmReadingJob(const CNSClientId &client, unsigned int job_id, const string &job_key, CJob &job, const string &auth_token)
string DecorateJob(unsigned int job_id) const
void TimeLineRemove(unsigned int job_id)
void PurgeClientRegistry(const CNSPreciseTime ¤t_time)
map< unsigned int, CJob > m_Jobs
void TimeLineMove(unsigned int job_id, const CNSPreciseTime &old_time, const CNSPreciseTime &new_time)
unsigned int m_DumpAffBufferSize
int SetClientData(const CNSClientId &client, const string &data, int data_version)
unsigned m_ReadFailedRetries
TPauseStatus m_PauseStatus
CNetScheduleServer * m_Server
TJobStatus x_ChangeReadingStatus(const CNSClientId &client, unsigned int job_id, const string &job_key, CJob &job, const string &auth_token, const string &err_msg, TJobStatus target_status, bool is_ns_rollback, bool no_retries)
unsigned CountStatus(TJobStatus) const
CQueueDataBase & m_QueueDB
CNSPreciseTime m_PendingTimeout
CJobStatusTracker m_StatusTracker
unsigned m_MaxJobsPerClient
void x_RegisterGetListener(const CNSClientId &client, unsigned short port, unsigned int timeout, const TNSBitVector &aff_ids, bool wnode_aff, bool any_aff, bool exclusive_new_affinity, bool new_format, const TNSBitVector &group_ids)
void x_CheckExecutionTimeout(const CNSPreciseTime &queue_run_timeout, const CNSPreciseTime &queue_read_timeout, unsigned job_id, const CNSPreciseTime &curr_time, bool logging)
unsigned int CancelAllJobs(const CNSClientId &client, bool logging)
string PrintNotificationsList(bool verbose) const
unsigned int m_ClientRegistryMinWorkerNodes
void SetAffinity(const CNSClientId &client, const list< string > &aff, ECommandGroup cmd_group)
const string & GetQueueName() const
void PrintStatistics(size_t &aff_count) const
void StatusStatistics(TJobStatus status, TNSBitVector::statistics *st) const
unsigned int LoadFromDump(const string &dump_dir_name)
string PrintClientsList(bool verbose) const
x_SJobPick x_FindOutdatedPendingJob(const CNSClientId &client, unsigned int picked_earlier, const TNSBitVector &group_ids)
void NotifyListenersPeriodically(const CNSPreciseTime ¤t_time)
CNSPreciseTime m_ReadTimeout
CStatisticsCounters m_StatisticsCountersLastPrinted
bool PutProgressMessage(unsigned int job_id, CJob &job, const string &msg)
unsigned int CancelSelectedJobs(const CNSClientId &client, const string &group, const string &aff_token, const vector< TJobStatus > &statuses, bool logging, vector< string > &warnings)
void CheckExecutionTimeout(bool logging)
unsigned SubmitBatch(const CNSClientId &client, vector< pair< CJob, string > > &batch, const string &group, bool logging, CNSRollbackInterface *&rollback_action)
TJobStatus ReadAndTouchJob(unsigned int job_id, CJob &job, CNSPreciseTime *lifetime)
CNSPreciseTime m_ClientRegistryTimeoutReader
unsigned int m_ClientRegistryMinUnknowns
void TimeLineAdd(unsigned int job_id, const CNSPreciseTime &job_time)
unsigned int GetJobsToDeleteCount(void) const
CNSPreciseTime m_ReadBlacklistTime
TJobStatus FailReadingJob(const CNSClientId &client, unsigned int job_id, const string &job_key, CJob &job, const string &auth_token, const string &err_msg, bool no_retries)
TJobStatus SetJobListener(unsigned int job_id, CJob &job, unsigned int address, unsigned short port, const CNSPreciseTime &timeout, bool need_stolen, bool need_progress_msg, size_t *last_event_index)
void ClearWorkerNode(const CNSClientId &client, bool &client_was_found, string &old_session, bool &had_wn_pref_affs, bool &had_reader_pref_affs)
CNSPreciseTime m_ReaderTimeout
void RegisterQueueResumeNotification(unsigned int address, unsigned short port, bool new_format)
string GetAffinityTokenByID(unsigned int aff_id) const
CJobTimeLine * m_RunTimeLine
void Dump(const string &dump_dir_name)
bool GetJobForReadingOrWait(const CNSClientId &client, unsigned int port, unsigned int timeout, const list< string > *aff_list, bool reader_affinity, bool any_affinity, bool exclusive_new_affinity, bool prioritized_aff, const list< string > *group_list, bool affinity_may_change, bool group_may_change, CJob *job, bool *no_more_jobs, CNSRollbackInterface *&rollback_action, string &added_pref_aff)
unsigned int PurgeAffinities(void)
void UpdatePerfLoggingSettings(const string &qclass)
void SetParameters(const SQueueParameters ¶ms)
CNetScheduleKeyGenerator m_KeyGenerator
TJobStatus JobDelayExpiration(unsigned int job_id, CJob &job, const CNSPreciseTime &tm)
void SetClientScope(const CNSClientId &client)
CQueueClientInfoList m_ProgramVersionList
unsigned int x_CancelJobs(const CNSClientId &client, const TNSBitVector &jobs_to_cancel, bool logging)
string PrintTransitionCounters(void) const
string PrintScopesList(bool verbose) const
CNSPreciseTime m_BlacklistTime
CNSPreciseTime NotifyExactListeners(void)
void CancelWaitRead(const CNSClientId &client)
CNetScheduleAccessList m_SubmHosts
TJobStatus FailJob(const CNSClientId &client, unsigned int job_id, const string &job_key, CJob &job, const string &auth_token, const string &err_msg, const string &output, int ret_code, bool no_retries, string warning)
TJobStatus ReturnReadingJob(const CNSClientId &client, unsigned int job_id, const string &job_key, CJob &job, const string &auth_token, bool is_ns_rollback, bool blacklist, TJobStatus target_status)
unsigned int GetNextJobIdForBatch(unsigned count)
TParameterList GetParameters() const
void MarkClientAsAdmin(const CNSClientId &client)
bool x_UnregisterGetListener(const CNSClientId &client, unsigned short port)
CNSClientsRegistry m_ClientsRegistry
string x_GetJobsDumpFileName(const string &dump_dname) const
TJobStatus JobDelayReadExpiration(unsigned int job_id, CJob &job, const CNSPreciseTime &tm)
string MakeJobKey(unsigned int job_id) const
string PrintJobDbStat(const CNSClientId &client, unsigned int job_id, TDumpFields dump_fields)
TJobStatus PutResult(const CNSClientId &client, const CNSPreciseTime &curr, unsigned int job_id, const string &job_key, CJob &job, const string &auth_token, int ret_code, const string &output)
unsigned int m_JobsToDeleteOps
unsigned int Submit(const CNSClientId &client, CJob &job, const string &aff_token, const string &group, bool logging, CNSRollbackInterface *&rollback_action)
TJobStatus GetStatusAndLifetime(unsigned int job_id, string &client_ip, string &client_sid, string &client_phid, string &progress_msg, CNSPreciseTime *lifetime)
void GetJobsPerState(const CNSClientId &client, const string &group_token, const string &aff_token, size_t *jobs, vector< string > &warnings) const
void RemoveDump(const string &dump_dir_name)
TJobStatus x_ResetDueTo(const CNSClientId &client, unsigned int job_id, const CNSPreciseTime ¤t_time, TJobStatus status_from, CJobEvent::EJobEvent event_type)
CNSPreciseTime m_ClientRegistryTimeoutAdmin
SPurgeAttributes CheckJobsExpiry(const CNSPreciseTime ¤t_time, SPurgeAttributes attributes, unsigned int last_job, TJobStatus status)
void x_LogSubmit(const CJob &job)
void x_Erase(const TNSBitVector &job_ids, TJobStatus status)
Erase jobs from all structures, request delayed db deletion.
unsigned int m_DumpGroupBufferSize
x_SJobPick x_FindOutdatedJobForReading(const CNSClientId &client, unsigned int picked_earlier, const TNSBitVector &group_ids)
CNSPreciseTime m_WNodeTimeout
list< pair< string, string > > TParameterList
CNetScheduleAccessList m_WnodeHosts
TJobStatus ReturnJob(const CNSClientId &client, unsigned int job_id, const string &job_key, CJob &job, const string &auth_token, string &warning, TJobReturnOption how)
unsigned int m_ClientRegistryMinSubmitters
void TimeLineExchange(unsigned int remove_job_id, unsigned int add_job_id, const CNSPreciseTime &new_time)
void x_ResetReadingDueToNewSession(const CNSClientId &client, const TNSBitVector &jobs)
CNSPreciseTime m_ClientRegistryTimeoutWorkerNode
string PrintGroupsList(const CNSClientId &client, bool verbose) const
TJobStatus GetJobStatus(unsigned job_id) const
void GetLinkedSections(map< string, map< string, string > > &linked_sections) const
unsigned int m_ReadJobsOps
TNSBitVector m_JobsToDelete
string PrintAllJobDbStat(const CNSClientId &client, const string &group, const string &aff_token, const vector< TJobStatus > &job_statuses, unsigned int start_after_job_id, unsigned int count, bool order_first, TDumpFields dump_fields, bool logging)
TJobStatus RescheduleJob(const CNSClientId &client, unsigned int job_id, const string &job_key, const string &auth_token, const string &aff_token, const string &group, bool &auth_token_ok, CJob &job)
CNSPreciseTime GetTimeout() const
CNSPreciseTime GetReadTimeout() const
string PrintAffinitiesList(const CNSClientId &client, bool verbose) const
string x_DumpJobs(const TNSBitVector &jobs_to_dump, unsigned int start_after_job_id, unsigned int count, TDumpFields dump_fields, bool order_first)
unsigned int m_ClientRegistryMinReaders
CNSNotificationList m_NotificationsList
bool GetJobOrWait(const CNSClientId &client, unsigned short port, unsigned int timeout, const list< string > *aff_list, bool wnode_affinity, bool any_affinity, bool exclusive_new_affinity, bool prioritized_aff, bool new_format, const list< string > *group_list, CJob *new_job, CNSRollbackInterface *&rollback_action, string &added_pref_aff)
CQueue(const string &queue_name, TQueueKind queue_kind, CNetScheduleServer *server, CQueueDataBase &qdb)
void RegisterSocketWriteError(const CNSClientId &client)
unsigned int m_ClientRegistryMinAdmins
void x_UpdateDB_ProvideJobNoLock(const CNSClientId &client, const CNSPreciseTime &curr, unsigned int job_id, ECommandGroup cmd_group, CJob &job)
CNSPreciseTime m_MaxPendingReadWaitTimeout
CNSPreciseTime m_ClientRegistryTimeoutUnknown
unsigned int PurgeGroups(void)
CStatisticsCounters m_StatisticsCounters
bool x_NoMoreReadJobs(const CNSClientId &client, const TNSBitVector &aff_list, bool reader_affinity, bool any_affinity, bool exclusive_new_affinity, const TNSBitVector &group_list, bool affinity_may_change, bool group_may_change)
CNSAffinityRegistry m_AffinityRegistry
unsigned int m_DumpBufferSize
const bool & m_LogBatchEachJob
x_SJobPick x_FindVacantJob(const CNSClientId &client, const TNSBitVector &explicit_affs, const vector< unsigned int > &aff_ids, bool use_pref_affinity, bool any_affinity, bool exclusive_new_affinity, bool prioritized_aff, const TNSBitVector &group_ids, bool has_groups, ECommandGroup cmd_group)
CNetScheduleAccessList m_ReaderHosts
CNSPreciseTime x_GetEstimatedJobLifetime(unsigned int job_id, TJobStatus status) const
map< string, string > m_LinkedSections
void PrintJobCounters(void) const
TJobStatus RedoJob(const CNSClientId &client, unsigned int job_id, const string &job_key, CJob &job)
TJobStatus RereadJob(const CNSClientId &client, unsigned int job_id, const string &job_key, CJob &job, bool &no_op)
CNSGroupsRegistry m_GroupRegistry
void x_NotifyJobChanges(const CJob &job, const string &job_key, ENotificationReason reason, const CNSPreciseTime ¤t_time)
CNSPreciseTime GetRunTimeout() const
CNSPreciseTime m_NotifHifreqPeriod
string PrintJobsStat(const CNSClientId &client, const string &group_token, const string &aff_token, vector< string > &warnings) const
void GetMaxIOSizesAndLinkedSections(unsigned int &max_input_size, unsigned int &max_output_size, map< string, map< string, string > > &linked_sections) const
unsigned int m_DumpClientBufferSize
void StaleNodes(const CNSPreciseTime ¤t_time)
void x_ResetRunningDueToClear(const CNSClientId &client, const TNSBitVector &jobs)
CJobGCRegistry m_GCRegistry
void PurgeBlacklistedJobs(void)
bool x_ValidateMaxJobsPerClientIP(unsigned int job_id, const map< string, size_t > &jobs_per_client_ip) const
TJobStatus GetStatusAndLifetimeAndTouch(unsigned int job_id, CJob &job, CNSPreciseTime *lifetime)
void TouchClientsRegistry(CNSClientId &client, bool &client_was_found, bool &session_was_reset, string &old_session, bool &had_wn_pref_affs, bool &had_reader_pref_affs)
void EraseJob(unsigned job_id, TJobStatus status)
void CancelWaitGet(const CNSClientId &client)
CNSPreciseTime m_MaxPendingWaitTimeout
list< string > ChangeAffinity(const CNSClientId &client, const list< string > &aff_to_add, const list< string > &aff_to_del, ECommandGroup cmd_group)
void x_UpdateDB_PutResultNoLock(unsigned job_id, const string &auth_token, const CNSPreciseTime &curr, int ret_code, const string &output, CJob &job, const CNSClientId &client)
bool m_ShouldPerfLogTransitions
CNSPreciseTime m_RunTimeout
void x_RegisterReadListener(const CNSClientId &client, unsigned short port, unsigned int timeout, const TNSBitVector &aff_ids, bool reader_aff, bool any_aff, bool exclusive_new_affinity, const TNSBitVector &group_ids)
unsigned int m_NotifLofreqMult
unsigned int DeleteBatch(unsigned int max_deleted)
CNSPreciseTime m_StatisticsCountersLastPrintedTimestamp
CNSPreciseTime m_HandicapTimeout
CRWLock m_RunTimeLineLock
vector< CNetScheduleAPI::EJobStatus > m_StatesForRead
TJobStatus Cancel(const CNSClientId &client, unsigned int job_id, const string &job_key, CJob &job, bool is_ns_rollback=false)
CNSPreciseTime m_NotifHifreqInterval
void CountNSGetRollback(size_t count)
void CountOutdatedPick(ECommandGroup cmd_group)
void CountDBDeletion(size_t count)
void CountRedo(CNetScheduleAPI::EJobStatus from)
void CountToPendingRescheduled(size_t count)
void CountReread(CNetScheduleAPI::EJobStatus from, CNetScheduleAPI::EJobStatus to)
void CountTransitionToDeleted(CNetScheduleAPI::EJobStatus from, size_t count)
void CountTransition(CNetScheduleAPI::EJobStatus from, CNetScheduleAPI::EJobStatus to, ETransitionPathOption path_option=eNone)
void CountNSSubmitRollback(size_t count)
void PrintDelta(CDiagContext_Extra &extra, const CStatisticsCounters &prev) const
void CountToPendingWithoutBlacklist(size_t count)
void CountNSReadRollback(size_t count)
void PrintTransitions(CDiagContext_Extra &extra) const
void CountSubmit(size_t count)
void MoveObject(time_t old_time, time_t new_time, unsigned object_id)
Move object from one time slot to another.
void AddObject(time_t tm, unsigned object_id)
Add object to the timeline.
bool RemoveObject(time_t object_time, unsigned object_id)
Remove object from the time line, object_time defines time slot.
void ExtractObjects(time_t tm, TBitVector *objects)
Extracts all objects up to 'tm' and puts them into 'objects' vector.
time_t GetHead() const
Return head of the timeline.
Constant iterator designed to enumerate "ON" bits.
bool valid() const noexcept
Checks if iterator is still valid.
Bitvector Bit-vector container with runtime compression of bits.
@ opt_free_0
Free unused 0 blocks.
bool get_bit(size_type n) const noexcept
returns true if bit n is set and false is bit n is 0.
bool any() const noexcept
Returns true if any bits in this bitset are set, and otherwise returns false.
bool empty() const noexcept
Returns true if the set is empty (no bits are set, otherwise returns false) Please note that this is ...
size_type size() const noexcept
Returns bvector's capacity (number of bits it can store)
void optimize(bm::word_t *temp_block=0, optmode opt_mode=opt_compress, statistics *stat=0)
Optimize memory bitvector's memory allocation.
bool set_bit(size_type n, bool val=true)
Sets bit n.
enumerator first() const
Returns enumerator pointing on the first non-zero bit.
bvector< Alloc > & set_range(size_type left, size_type right, bool value=true)
Sets all bits in the specified closed interval [left,right] Interval must be inside the bvector's siz...
void clear(const size_type *ids, size_type ids_size, bm::sort_order so=bm::BM_UNKNOWN)
clear list of bits in this bitset
size_type count() const noexcept
population count (count of ON bits)
container_type::const_iterator const_iterator
container_type::iterator iterator
const_iterator begin() const
const_iterator end() const
const_iterator find(const key_type &key) const
void Print(const CCompactSAMApplication::AlignInfo &ai)
static const int chunk_size
static DLIST_TYPE *DLIST_NAME() first(DLIST_LIST_TYPE *list)
static void DLIST_NAME() remove(DLIST_LIST_TYPE *list, DLIST_TYPE *item)
static const struct attribute attributes[]
static SQLCHAR output[256]
element_type * get(void) const
Get pointer.
void PrintRequestStop(void)
Print request stop message (for request-driven applications)
CDiagContext_Extra & Print(const string &name, const string &value)
The method does not print the argument, but adds it to the string.
CDiagContext & GetDiagContext(void)
Get diag context instance.
static void SetRequestContext(CRequestContext *ctx)
Shortcut to CDiagContextThreadData::GetThreadData().SetRequestContext()
void PrintRequestStart(const string &message)
Print request start message (for request-driven applications)
CDiagContext_Extra Extra(void) const
Create a temporary CDiagContext_Extra object.
void Flush(void)
Print the message and reset object.
#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.
void Warning(CExceptionArgs_Base &args)
EJobStatus
Job status codes.
static string StatusToString(EJobStatus status)
Printable status type.
string Generate(unsigned id) const
string GenerateCompoundID(unsigned id, CCompoundIDPool id_pool) const
@ eDeleted
The job has been wiped out of the database.
@ eDone
Job is ready (computed successfully)
@ eConfirmed
Final state - read confirmed.
@ eReading
Job has its output been reading.
@ eCanceled
Explicitly canceled.
@ eRunning
Running on a worker node.
@ eJobNotFound
No such job.
@ ePending
Waiting for execution.
@ eReadFailed
Final state - read failed.
@ eFailed
Failed to run (execution timeout)
@ eOutOfOrder
This jobs comes to the node before every regular jobs.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static string & ToUpper(string &str)
Convert string to upper case â string& version.
unsigned short GetPort() const
Get the listening port number back.
@ BM_GAP
GAP compression is ON.
CNSPreciseTime GetJobExpirationTime(const CNSPreciseTime &last_touch, TJobStatus status, const CNSPreciseTime &job_submit_time, const CNSPreciseTime &job_timeout, const CNSPreciseTime &job_run_timeout, const CNSPreciseTime &job_read_timeout, const CNSPreciseTime &queue_timeout, const CNSPreciseTime &queue_run_timeout, const CNSPreciseTime &queue_read_timeout, const CNSPreciseTime &queue_pending_timeout, const CNSPreciseTime &event_time)
const size_t g_ValidJobStatusesSize
const CNetScheduleAPI::EJobStatus g_ValidJobStatuses[]
Uint4 GetHost(TEndpointKey key)
const unsigned int kNetScheduleMaxDBDataSize
Int4 delta(size_t dimension_, const Int4 *score_)
const string k_NoAffinityToken
const CNSPreciseTime default_client_registry_timeout_unknown
const unsigned int default_dump_group_buffer_size
const CNSPreciseTime default_run_timeout(3600, 0)
const unsigned int default_max_jobs_per_client
const CNSPreciseTime default_wnode_timeout(40, 0)
const unsigned int default_notif_lofreq_mult
const unsigned int default_dump_aff_buffer_size
const CNSPreciseTime default_notif_hifreq_interval(0, kNSecsPerSecond/10)
const unsigned int default_dump_client_buffer_size
const unsigned int default_client_registry_min_submitters
const unsigned int default_client_registry_min_unknowns
const CNSPreciseTime default_pending_timeout(604800, 0)
const CNSPreciseTime default_reader_timeout(40, 0)
const CNSPreciseTime default_read_timeout(10, 0)
const unsigned int default_client_registry_min_admins
const CNSPreciseTime default_timeout(3600, 0)
const CNSPreciseTime default_client_registry_timeout_worker_node
const unsigned int default_dump_buffer_size
const unsigned int default_client_registry_min_worker_nodes
const unsigned int default_failed_retries
const CNSPreciseTime default_client_registry_timeout_admin
const CNSPreciseTime default_notif_hifreq_period(5, 0)
const CNSPreciseTime default_client_registry_timeout_reader
const CNSPreciseTime default_client_registry_timeout_submitter
const CNSPreciseTime default_blacklist_time
const unsigned int default_client_registry_min_readers
const bool default_scramble_job_keys
void g_DoErasePerfLogging(const CQueue &queue, const CJob &job)
void g_DoPerfLogging(const CQueue &queue, const CJob &job, int status)
const CNSPreciseTime kTimeZero
const CNSPreciseTime kTimeNever
string NS_FormatPreciseTimeAsSec(const CNSPreciseTime &t)
string NS_FormatPreciseTime(const CNSPreciseTime &t)
static const unsigned int s_ReserveDelta
CTimeLine< TNSBitVector > CJobTimeLine
void SerializePauseState(CNetScheduleServer *server)
const string kNoScopeOnly
const TNSBitVector kEmptyBitVector
@ eProgressMessageChanged
const string kJobsFileName("jobs.dump")
static string kNewLine("\n")
const unsigned kNetScheduleMaxOverflowSize
Query parser execution implementations.
Query string parsing components.
Defines CRequestContext class for NCBI C++ diagnostic API.
static SLJIT_INLINE sljit_ins st(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)
static SLJIT_INLINE sljit_ins msg(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)
static CNamedPipeClient * client
unsigned int low_mark_percentage
unsigned int dirt_percentage
unsigned int high_mark_percentage
unsigned int high_removal
unsigned int dump_buffer_size
unsigned int client_registry_min_submitters
CNSPreciseTime blacklist_time
map< string, string > linked_sections
CNSPreciseTime read_timeout
unsigned int client_registry_min_unknowns
CNSPreciseTime notif_hifreq_interval
unsigned int dump_aff_buffer_size
CNSPreciseTime notif_hifreq_period
unsigned int max_output_size
CNSPreciseTime read_blacklist_time
CNSPreciseTime pending_timeout
unsigned int max_input_size
CNSPreciseTime notif_handicap
unsigned int max_jobs_per_client
CNSPreciseTime client_registry_timeout_submitter
unsigned int read_failed_retries
CNSPreciseTime client_registry_timeout_unknown
CNSPreciseTime CalculateRuntimePrecision(void) const
unsigned int notif_lofreq_mult
unsigned int dump_client_buffer_size
CNSPreciseTime reader_timeout
unsigned int failed_retries
CNSPreciseTime max_pending_read_wait_timeout
unsigned int dump_group_buffer_size
unsigned int client_registry_min_worker_nodes
CNSPreciseTime max_pending_wait_timeout
CNSPreciseTime client_registry_timeout_admin
CNSPreciseTime client_registry_timeout_reader
CNSPreciseTime run_timeout
CNSPreciseTime client_registry_timeout_worker_node
CNSPreciseTime wnode_timeout
unsigned int client_registry_min_admins
unsigned int client_registry_min_readers
Statistical information about bitset's memory allocation details.
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