m_CassQueryRetryTimeoutMs(0),
88m_CassFallbackRdConsistency(
false),
92m_LatencyAware(
true),
130 const string& section)
138 const string& section)
180list<string> section_names;
182 autosection_itr = find(cbegin(section_names), cend(section_names),
m_Section);
183 if(section_itr == cend(section_names)) {
228 boolis_hostlist = (
m_CassHosts.find(
':') != string::npos)
233 ERR_POST(
Info<<
"Cassandra connection uses service name: '"<< hosts <<
"'");
238 ERR_POST(
Info<<
"Cassandra service name resolved as: '"<< hosts <<
"'");
240 ERR_POST(
Info<<
"Cassandra connection uses host list: '"<< hosts <<
"'");
245vector<string> items;
248 for(
const auto& item : items) {
250 stringitem_port_token;
253 shortitem_port = NStr::StringToNumeric<short>(item_port_token);
254 if(cass_port == 0) {
255cass_port = item_port;
257 if(item_port != cass_port) {
259to_string(cass_port) +
" and "+ to_string(item_port));
264 if(!cass_hosts.empty()) {
267cass_hosts += item_host;
269 ERR_POST(
Info<<
"Cassandra connection parameters parsed as: hosts - '" 270<< cass_hosts <<
"'; port - "<< to_string(cass_port));
308rv->DisableLogging();
314rv->SetConnectionPoint(hostlist, port);
324 ERR_POST(
"The cassandra connection timeout is out of range. Allowed " 332 ERR_POST(
"The cassandra query timeout is out of range. Allowed " 340 ERR_POST(
"The cassandra query retry timeout is out of range. Allowed " 357 stringallowed, default_name;
359 if(!item.first.empty()) {
360 if(!allowed.empty()) {
363allowed += item.second;
365default_name = item.first;
369 ERR_POST(
"The load balancing value is not recognized. Allowed values: "<<
377 ERR_POST(
"The number of IO threads is out of range. Allowed " 387 ERR_POST(
"The number of connections per host is out of range. Allowed " 396 ERR_POST(
"The TCP keep-alive the initial delay is out of range. Allowed " 404 ERR_POST(
"The cassandra write quorum is out of range. Allowed "#define BEGIN_IDBLOB_SCOPE
const int kMaxRetriesDefault
< 0 means not configured.
const unsigned int kNumConnPerHostMax
const unsigned int kKeepaliveMax
const unsigned int kKeepaliveDefault
const unsigned int kCassQueryTimeoutMax
const string kCassConfigSection
const unsigned int kCassFallbackWrConsistencyDefault
const unsigned int kNumConnPerHostDefault
const unsigned int kCassConnTimeoutMax
const unsigned int kNumThreadsIoMin
const unsigned int kCassConnTimeoutDefault
BEGIN_IDBLOB_SCOPE USING_NCBI_SCOPE
const unsigned int kCassQueryTimeoutDefault
const unsigned int kNumThreadsIoDefault
const loadbalancing_policy_t kLoadBalancingDefaultPolicy
const unsigned int kNumThreadsIoMax
const unsigned int kCassFallbackWrConsistencyMax
const unsigned int kNumConnPerHostMin
const map< string, loadbalancing_policy_t > kPolicyArgMap
unsigned int m_CassQueryRetryTimeoutMs
unsigned int m_CassConnTimeoutMs
bool m_CassFallbackRdConsistency
unsigned int m_CassQueryTimeoutMs
void SetDataNamespace(string const &data_namespace)
string GetPassword() const
void AppParseArgs(const CArgs &args)
string GetUserName() const
unsigned int m_NumThreadsIo
~CCassConnectionFactory()
void SetServiceName(string const &service)
loadbalancing_policy_t m_LoadBalancing
void LoadConfig(const string &cfg_name, const string §ion)
unsigned int m_CassFallbackWrConsistency
void GetHostPort(string &hostlist, short &port)
unsigned int m_NumConnPerHost
string m_LoadBalancingStr
shared_ptr< CCassConnection > CreateInstance()
CFastMutex m_RunTimeParams
void x_ValidateArgs(void)
string m_CassDataNamespace
static void UpdateLogging()
static bool s_Resolve(const string &service, vector< pair< string, int >> &result, TSERV_Type serv_type=fSERV_Any)
#define ERR_POST(message)
Error posting with file, line number information but without error codes.
@ eDiag_Error
Error message.
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
void Info(CExceptionArgs_Base &args)
virtual bool GetBool(const string §ion, const string &name, bool default_value, TFlags flags=0, EErrAction err_action=eThrow) const
Get boolean value of specified parameter name.
virtual void EnumerateSections(list< string > *sections, TFlags flags=fAllLayers) const
Enumerate section names.
virtual int GetInt(const string §ion, const string &name, int default_value, TFlags flags=0, EErrAction err_action=eThrow) const
Get integer value of specified parameter name.
bool Empty(TFlags flags=fAllLayers) const
Verify if Registry is empty.
virtual string GetString(const string §ion, const string &name, const string &default_value, TFlags flags=0) const
Get the parameter string value.
IO_PREFIX::istream CNcbiIstream
Portable alias for istream.
static list< string > & Split(const CTempString str, const CTempString delim, list< string > &arr, TSplitFlags flags=0, vector< SIZE_TYPE > *token_pos=NULL)
Split a string using specified delimiters.
static bool SplitInTwo(const CTempString str, const CTempString delim, string &str1, string &str2, TSplitFlags flags=0)
Split a string into two pieces using the specified delimiters.
static string & ToLower(string &str)
Convert string to lower case â string& version.
@ fSplit_MergeDelimiters
Merge adjacent delimiters.
Defines command line argument related classes.
Process information in the NCBI Registry, including working with configuration files.
std::istream & in(std::istream &in_, double &x_)
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