separator =
m_Opts.
id.find(
'-');
64 if(separator == string::npos) {
66 "namespace separator in object key: "<<
m_Opts.
id);
72 m_Opts.
id.erase(0, separator + 1);
85 "must be explicitly specified.");
134 if(nst_service.empty()) {
135os <<
"mode=direct";
141 if(!ft_token.empty()) os <<
"&ft_token="<<
NStr::URLEncode(ft_token);
143 if(!app_domain.empty()) os <<
"&namespace="<<
NStr::URLEncode(app_domain);
179 if(storage_set)
return;
190printf(
"%s: %s\n", it.GetKey().c_str(),
217 if(print_server_address)
222 if(print_server_address)
242printf(
"[[server=%s; config_pathname=%s]]\n%s\n",
244server_reply.
GetString(
"ConfigurationFilePath").c_str(),
245server_reply.
GetString(
"Configuration").c_str());
295 "Error while reading input data");
303netstorage_object.
Close();
309 const stringnew_loc(netstorage_object.
GetLoc());
324 while(!netstorage_object.
Eof()) {
329netstorage_object.
Close();
402printf(
"%s\n", object_loc.c_str());
439 "' are mutually exclusive.\n");
444 "' are mutually exclusive.\n");
void g_PrintJSON(FILE *output_stream, CJsonNode node, const char *indent)
Pool of recycled CCompoundID objects.
bool IsOptionSet(int option) const
struct CGridCommandLineInterfaceApp::SOptions m_Opts
int ShutdownNetStorageServer()
int ReconfigureNetStorageServer()
CNetStorageAdmin m_NetStorageAdmin
void MarkOptionAsSet(int option)
enum CGridCommandLineInterfaceApp::EAPIClass m_APIClass
void NetStorage_PrintServerReply(CJsonNode &server_reply)
int PrintNetStorageServerConfig()
static void PrintLine(const string &line)
void CheckNetStorageOptions() const
CNetStorageByKey m_NetStorageByKey
int Cmd_NetStorageObjectInfo()
void SetUp_NetStorageCmd(EAPIClass api_class, EAdminCmdSeverity cmd_severity=eReadOnlyAdminCmd)
CNetStorageObject GetNetStorageObject()
int PrintNetStorageServerInfo()
int Cmd_RemoveNetStorageObject()
Iterator for JSON arrays and objects.
SJsonIteratorImpl * Iterate(EIterationMode mode=eNatural) const
For a container node (that is, either an array or an object), begin iteration over its elements.
void SetString(const string &key, const string &value)
Set a JSON object element to the specified string value.
string GetString(const string &key) const
For a JSON object node, return the string referred to by the specified key.
@ eFlatten
Iterate nested containers as if it were a single JSON object.
string GetServerAddress() const
bool IsLoadBalanced() const
CNetServiceIterator Iterate(EIterationMode mode=eSortByLoad)
CJsonNode MkNetStorageRequest(const string &request_type)
CJsonNode ExchangeJson(const CJsonNode &request, CNetServer::TInstance server_to_use=NULL, CNetServerConnection *conn=NULL)
string GetAppDomain() const
static string Create(const string &service_name, const string &cache_name, const string &key, const string &subkey, const TVersion &version=null)
string GetNCServiceName() const
ENetStorageObjectLocation GetLocation() const
bool HasServiceName() const
string GetServiceName() const
EFileTrackSite GetFileTrackSite() const
Basic network-based data object I/O.
CTimeout â Timeout interval.
Declarations of command line interface arguments and handlers.
#define INPUT_FILE_OPTION
#define OBJECT_KEY_OPTION
#define NETSTORAGE_OPTION
#define DIRECT_MODE_OPTION
const string & GetHost(void) const
Get host name.
CDiagContext & GetDiagContext(void)
Get diag context instance.
const string & GetUsername(void) const
Get username.
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
#define NCBI_THROW_FMT(exception_class, err_code, message)
The same as NCBI_THROW but with message processed as output to ostream.
string GetAttribute(const string &attr_name) const
Get the current value of the specified attribute.
bool Eof(void)
Check if the last Read() has hit EOF.
string GetLoc(void) const
Return object locator.
ENetStorageRemoveResult Remove(const string &key, TNetStorageFlags flags=0)
Remove a object addressed by a key and a set of flags.
TAttributeList GetAttributeList() const
CNetStorageObject Create(TNetStorageFlags flags=0)
Create new NetStorage object.
void Write(const void *buffer, size_t buf_size)
Write data to the object (starting at the current position)
size_t Read(void *buffer, size_t buf_size)
Read no more than 'buf_size' bytes of the object contents (starting at the current position)
void SetExpiration(const CTimeout &ttl)
Updates expiration on the object.
void Close(void)
Finalize and close the current object stream.
void SetAttribute(const string &attr_name, const string &attr_value)
Set the new value for the specified attribute.
CNetStorageObjectInfo GetInfo(void)
Return detailed information about the object.
CNetStorageObject Open(const string &object_loc)
Open an existing NetStorage object for reading.
CNetStorageObject Open(const string &unique_key, TNetStorageFlags flags=0)
Create a new object or open an existing object using the supplied unique key.
string Relocate(const string &object_loc, TNetStorageFlags flags, TNetStorageProgressCb cb=TNetStorageProgressCb())
Relocate a object according to the specified combination of flags.
ENetStorageRemoveResult Remove(const string &object_loc)
Remove the object addressed by 'object_loc'.
string Relocate(const string &unique_key, TNetStorageFlags flags, TNetStorageFlags old_flags=0, TNetStorageProgressCb cb=TNetStorageProgressCb())
Relocate a object according to the specified combination of flags.
CJsonNode ToJSON()
Pack the whole structure in a single JSON object.
function< void(CJsonNode)> TNetStorageProgressCb
Progress callback.
static string URLEncode(const CTempString str, EUrlEncode flag=eUrlEnc_SkipMarkChars)
URL-encode string.
void RemoveStdReplyFields(CJsonNode &server_reply)
const string version
version string
const GenericPointer< typename T::ValueType > T2 value
CJsonNode g_ExecToJson(IExecToJson &exec_to_json, CNetService service, CNetService::EIterationMode iteration_mode=CNetService::eSortByLoad)
This function is for use by the grid_cli utility only.
void Parse(bool icache_mode, bool require_version)
struct CGridCommandLineInterfaceApp::SOptions::SNCID ncid
TNetStorageFlags netstorage_flags
EOutputFormat output_format
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