|
MySQL 5.6.14 Source Code Document
|
Used by nodes (DB, MGM, API) to get their config from MGM server. More...
#include <ConfigRetriever.hpp>
Public Member Functions | |
| ConfigRetriever (const char *_connect_string, int force_nodeid, Uint32 version, ndb_mgm_node_type nodeType, const char *_bind_address=0, int timeout_ms=30000) | |
| int | do_connect (int no_retries, int retry_delay_in_seconds, int verbose) |
| int | disconnect () |
| bool | is_connected () |
| struct ndb_mgm_configuration * | getConfig (Uint32 nodeid) |
| void | resetError () |
| int | hasError () |
| const char * | getErrorString () |
| Uint32 | allocNodeId (int no_retries, int retry_delay_in_seconds) |
| int | setNodeId (Uint32 nodeid) |
| struct ndb_mgm_configuration * | getConfig (NdbMgmHandle handle) |
| struct ndb_mgm_configuration * | getConfig (const char *file) |
| bool | verifyConfig (const struct ndb_mgm_configuration *, Uint32 nodeid) |
| Uint32 | get_mgmd_port () const |
| const char * | get_mgmd_host () const |
| const char * | get_connectstring (char *buf, int buf_sz) const |
| NdbMgmHandle | get_mgmHandle () |
| NdbMgmHandle * | get_mgmHandlePtr () |
| void | end_session (bool end) |
| Uint32 | get_configuration_nodeid () const |
Used by nodes (DB, MGM, API) to get their config from MGM server.
Definition at line 29 of file ConfigRetriever.hpp.
| Uint32 ConfigRetriever::allocNodeId | ( | int | no_retries, |
| int | retry_delay_in_seconds | ||
| ) |
Definition at line 369 of file ConfigRetriever.cpp.


|
read |
Get configuration for current node.
Configuration is fetched from one MGM server configured in local config file. The method loops over all the configured MGM servers and tries to establish a connection. This is repeated until a connection is established, so the function hangs until a connection is established.
Definition at line 152 of file ConfigRetriever.cpp.


|
read |
Get config using socket
Definition at line 171 of file ConfigRetriever.cpp.

|
read |
Get config from file
Definition at line 191 of file ConfigRetriever.cpp.

| bool ConfigRetriever::verifyConfig | ( | const struct ndb_mgm_configuration * | conf, |
| Uint32 | nodeid | ||
| ) |
Verify config
Check hostnames
Definition at line 262 of file ConfigRetriever.cpp.

