NCBI C++ ToolKit
|
#include <connect/services/netschedule_api.hpp>
#include <connect/services/ns_output_parser.hpp>
#include <connect/services/netstorage.hpp>
Go to the source code of this file.
Go to the SVN repository for this file.
Classes | |
class | IJobInfoProcessor |
class | CJobInfoToJSON |
class | NNetStorage::CExecToJson |
Namespaces | |
NNetStorage | |
Macros | |
#define | TOKEN_TYPE__NETCACHE_BLOB_KEY "NetCacheBlobKey" |
#define | TOKEN_TYPE__NETSCHEDULE_JOB_KEY "NetScheduleJobKey" |
#define | TOKEN_TYPE__NETSTORAGEOBJECT_LOC "NetStorageObjectLoc" |
#define TOKEN_TYPE__NETSCHEDULE_JOB_KEY "NetScheduleJobKey" |
#define TOKEN_TYPE__NETSTORAGEOBJECT_LOC "NetStorageObjectLoc" |
CJsonNode g_ExecAnyCmdToJson | ( | CNetService | service, |
const string & | command, | ||
bool | multiline | ||
) |
Definition at line 774 of file util.cpp.
References command, g_ExecToJson(), and multiline.
Referenced by CGridCommandLineInterfaceApp::Cmd_Exec(), and NAutomation::SNetService::ExecExec().
CJsonNode g_LegacyStatToJson | ( | CNetServer | server, |
bool | verbose | ||
) |
Definition at line 72 of file util.cpp.
References CJsonNode::AppendString(), CNetScheduleAPI::eJobNotFound, NStr::eTrunc_Begin, CNetServer::ExecWithRetry(), g_FixMisplacedPID(), CJsonNode::GuessType(), CJsonNode::HasKey(), isspace(), ncbi::grid::netcache::search::fields::key, CJsonNode::NewArrayNode(), CJsonNode::NewObjectNode(), output, CJsonNode::SetByKey(), CJsonNode::SetInteger(), CJsonNode::SetString(), NStr::SplitInTwo(), NStr::StringToInt8(), CNetScheduleAPI::StringToStatus(), NStr::TruncateSpaces_Unsafe(), and rapidjson::value.
Referenced by NAutomation::SNetScheduleServer::ExecServerStatus(), and CGridCommandLineInterfaceApp::PrintNetScheduleStats().
Definition at line 738 of file util.cpp.
References indent(), and PrintJSONNode().
Referenced by CGridCommandLineInterfaceApp::Cmd_Exec(), CGridCommandLineInterfaceApp::Cmd_JobInfo(), CGridCommandLineInterfaceApp::Cmd_NetStorageObjectInfo(), CGridCommandLineInterfaceApp::Cmd_QueueInfo(), CGridCommandLineInterfaceApp::Cmd_Reconf(), CGridCommandLineInterfaceApp::Cmd_ServerInfo(), CGridCommandLineInterfaceApp::Cmd_Stats(), CGridCommandLineInterfaceApp::Cmd_WhatIs(), CMessageDumperSender::InputMessage(), CMessageDumperSender::OutputMessage(), CGridCommandLineInterfaceApp::PrintNetScheduleStats(), CGridCommandLineInterfaceApp::PrintNetScheduleStats_Generic(), CGridCommandLineInterfaceApp::PrintNetStorageServerInfo(), and CGridCommandLineInterfaceApp::ReconfigureNetStorageServer().
void g_ProcessJobInfo | ( | CNetScheduleAPI | ns_api, |
const string & | job_key, | ||
IJobInfoProcessor * | processor, | ||
bool | verbose, | ||
CCompoundIDPool::TInstance | id_pool = NULL |
||
) |
Definition at line 572 of file util.cpp.
References IJobInfoProcessor::BeginJobEvent(), CNetScheduleAdmin::DumpJob(), CAttrListParser::eAttributeWithValue, CNetScheduleAPI::eConfirmed, CNetScheduleAPI::eDone, CNetScheduleAPI::eJobNotFound, CAttrListParser::eNoMoreAttributes, CNetScheduleAPI::eReadFailed, CNetScheduleAPI::eReading, CNetScheduleJob::error_msg, NStr::fSplit_MergeDelimiters, NStr::fSplit_Truncate, CNetScheduleAPI::GetAdmin(), CNetScheduleAPI::GetJobDetails(), CNetScheduleNewJob::input, CNetScheduleNewJob::job_id, CAttrListParser::NextAttribute(), CNetScheduleJob::output, output, NStr::ParseQuoted(), IJobInfoProcessor::ProcessInput(), IJobInfoProcessor::ProcessJobEventField(), IJobInfoProcessor::ProcessJobInfoField(), IJobInfoProcessor::ProcessJobMeta(), IJobInfoProcessor::ProcessOutput(), IJobInfoProcessor::ProcessRawLine(), CAttrListParser::Reset(), NStr::SplitInTwo(), NStr::StartsWith(), CNetScheduleAPI::StatusToString(), and TEMP_STRING_CTOR.
Referenced by CGridCommandLineInterfaceApp::Cmd_JobInfo(), and NAutomation::SNetScheduleService::ExecJobInfo().
CJsonNode g_QueueClassInfoToJson | ( | CNetScheduleAPI | ns_api | ) |
Definition at line 210 of file util.cpp.
References CNetService::eIncludePenalized, g_ExecToJson(), and CNetScheduleAPI::GetService().
Referenced by CGridCommandLineInterfaceApp::Cmd_QueueInfo(), and NAutomation::SNetScheduleService::ExecQueueClassInfo().
CJsonNode g_QueueInfoToJson | ( | CNetScheduleAPI | ns_api, |
const string & | queue_name | ||
) |
Definition at line 194 of file util.cpp.
References CNetService::eIncludePenalized, g_ExecToJson(), CNetScheduleAPI::GetAdmin(), and CNetScheduleAPI::GetService().
Referenced by CGridCommandLineInterfaceApp::Cmd_QueueInfo(), and NAutomation::SNetScheduleService::ExecQueueInfo().
CJsonNode g_ReconfAndReturnJson | ( | CNetScheduleAPI | ns_api | ) |
Definition at line 218 of file util.cpp.
References CNetService::eIncludePenalized, g_ExecToJson(), and CNetScheduleAPI::GetService().
Referenced by CGridCommandLineInterfaceApp::Cmd_Reconf(), and NAutomation::SNetScheduleService::ExecReconf().
void g_ResumeNetSchedule | ( | CNetScheduleAPI | netschedule_api | ) |
Definition at line 817 of file util.cpp.
References cmd, CNetService::ExecOnAllServers(), g_AppendClientIPSessionIDHitID(), and CNetScheduleAPI::GetService().
Referenced by NAutomation::SNetScheduleService::ExecResume(), and CGridCommandLineInterfaceApp::NetSchedule_SuspendResume().
void g_ResumeWorkerNode | ( | CNetServer | worker_node | ) |
Definition at line 839 of file util.cpp.
References CNetServer::ExecWithRetry().
Referenced by CGridCommandLineInterfaceApp::Cmd_Resume(), and NAutomation::SWorkerNode::ExecResume().
CJsonNode g_ServerInfoToJson | ( | CNetService | service, |
bool | server_version_key | ||
) |
Definition at line 799 of file util.cpp.
References CNetService::eIncludePenalized, and g_ExecToJson().
Referenced by SServerInfoToJson::ExecOn().
void g_SuspendNetSchedule | ( | CNetScheduleAPI | netschedule_api, |
bool | pullback_mode | ||
) |
Definition at line 808 of file util.cpp.
References cmd, CNetService::ExecOnAllServers(), g_AppendClientIPSessionIDHitID(), and CNetScheduleAPI::GetService().
Referenced by NAutomation::SNetScheduleService::ExecSuspend(), and CGridCommandLineInterfaceApp::NetSchedule_SuspendResume().
void g_SuspendWorkerNode | ( | CNetServer | worker_node, |
bool | pullback_mode, | ||
unsigned | timeout | ||
) |
Definition at line 826 of file util.cpp.
References cmd, CNetServer::ExecWithRetry(), and NStr::NumericToString().
Referenced by CGridCommandLineInterfaceApp::Cmd_Suspend(), and NAutomation::SWorkerNode::ExecSuspend().
CJsonNode g_WhatIs | ( | const string & | id, |
CCompoundIDPool | id_pool = CCompoundIDPool() |
||
) |
Definition at line 876 of file util.cpp.
References CJobInfoToJSON::GetRootNode(), CJsonNode::NewObjectNode(), CNetCacheKey::ParseBlobKey(), CNetScheduleKey::ParseJobKey(), CJobInfoToJSON::ProcessJobMeta(), result, s_GetBlobMeta(), CNetStorageObjectLoc::ToJSON(), TOKEN_TYPE__NETSCHEDULE_JOB_KEY, TOKEN_TYPE__NETSTORAGEOBJECT_LOC, and CNetScheduleKey::version.
Referenced by CGridCommandLineInterfaceApp::Cmd_WhatIs(), and NAutomation::CAutomationProc::ExecWhatIs().