mariadb/ndb/include/mgmcommon/ConfigRetriever.hpp

107 lines
2.9 KiB
C++
Raw Normal View History

/* Copyright (C) 2003 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#ifndef ConfigRetriever_H
#define ConfigRetriever_H
#include <ndb_types.h>
#include <mgmapi.h>
#include <BaseString.hpp>
/**
* @class ConfigRetriever
* @brief Used by nodes (DB, MGM, API) to get their config from MGM server.
*/
class ConfigRetriever {
public:
changed mysqladmin.c to mysqladmin.cc no need for dvlags to have DEFINE_CXA_PURE_VIRTUAL anymore aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals enabled multiple management servrs to fetch data configurations from eachother client/Makefile.am: changed mysqladmin.c to mysqladmin.cc client/mysqladmin.cc: changed mysqladmin.c to mysqladmin.cc configure.in: no need for dvlags to have DEFINE_CXA_PURE_VIRTUAL anymore ndb/include/mgmapi/mgmapi.h: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/include/mgmcommon/ConfigRetriever.hpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/include/ndbapi/ndb_cluster_connection.hpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/common/mgmcommon/ConfigRetriever.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/kernel/main.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/kernel/vm/Configuration.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals changed to config setting to always use noOfMetaTables to make sure we don't overflow arrays ndb/src/kernel/vm/Configuration.hpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmapi/LocalConfig.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmapi/LocalConfig.hpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmapi/mgmapi.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmclient/CommandInterpreter.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmclient/main.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmclient/ndb_mgmclient.hpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmclient/ndb_mgmclient.h: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmsrv/MgmtSrvr.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals enabled multiple management servrs to fetch data configurations from eachother ndb/src/mgmsrv/MgmtSrvr.hpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmsrv/MgmtSrvrConfig.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmsrv/main.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/ndbapi/ndb_cluster_connection.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/tools/waiter.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals
2004-11-18 18:38:38 +00:00
ConfigRetriever(const char * _connect_string,
Uint32 version, Uint32 nodeType);
~ConfigRetriever();
changed mysqladmin.c to mysqladmin.cc no need for dvlags to have DEFINE_CXA_PURE_VIRTUAL anymore aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals enabled multiple management servrs to fetch data configurations from eachother client/Makefile.am: changed mysqladmin.c to mysqladmin.cc client/mysqladmin.cc: changed mysqladmin.c to mysqladmin.cc configure.in: no need for dvlags to have DEFINE_CXA_PURE_VIRTUAL anymore ndb/include/mgmapi/mgmapi.h: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/include/mgmcommon/ConfigRetriever.hpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/include/ndbapi/ndb_cluster_connection.hpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/common/mgmcommon/ConfigRetriever.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/kernel/main.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/kernel/vm/Configuration.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals changed to config setting to always use noOfMetaTables to make sure we don't overflow arrays ndb/src/kernel/vm/Configuration.hpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmapi/LocalConfig.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmapi/LocalConfig.hpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmapi/mgmapi.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmclient/CommandInterpreter.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmclient/main.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmclient/ndb_mgmclient.hpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmclient/ndb_mgmclient.h: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmsrv/MgmtSrvr.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals enabled multiple management servrs to fetch data configurations from eachother ndb/src/mgmsrv/MgmtSrvr.hpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmsrv/MgmtSrvrConfig.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmsrv/main.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/ndbapi/ndb_cluster_connection.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/tools/waiter.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals
2004-11-18 18:38:38 +00:00
int do_connect(int no_retries, int retry_delay_in_seconds, int verbose);
/**
* 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.
*
* @return ndb_mgm_configuration object if succeeded,
* NULL if erroneous local config file or configuration error.
*/
struct ndb_mgm_configuration * getConfig();
changed mysqladmin.c to mysqladmin.cc no need for dvlags to have DEFINE_CXA_PURE_VIRTUAL anymore aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals enabled multiple management servrs to fetch data configurations from eachother client/Makefile.am: changed mysqladmin.c to mysqladmin.cc client/mysqladmin.cc: changed mysqladmin.c to mysqladmin.cc configure.in: no need for dvlags to have DEFINE_CXA_PURE_VIRTUAL anymore ndb/include/mgmapi/mgmapi.h: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/include/mgmcommon/ConfigRetriever.hpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/include/ndbapi/ndb_cluster_connection.hpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/common/mgmcommon/ConfigRetriever.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/kernel/main.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/kernel/vm/Configuration.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals changed to config setting to always use noOfMetaTables to make sure we don't overflow arrays ndb/src/kernel/vm/Configuration.hpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmapi/LocalConfig.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmapi/LocalConfig.hpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmapi/mgmapi.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmclient/CommandInterpreter.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmclient/main.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmclient/ndb_mgmclient.hpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmclient/ndb_mgmclient.h: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmsrv/MgmtSrvr.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals enabled multiple management servrs to fetch data configurations from eachother ndb/src/mgmsrv/MgmtSrvr.hpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmsrv/MgmtSrvrConfig.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmsrv/main.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/ndbapi/ndb_cluster_connection.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/tools/waiter.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals
2004-11-18 18:38:38 +00:00
void resetError();
int hasError();
const char * getErrorString();
/**
* @return Node id of this node (as stated in local config or connectString)
*/
changed mysqladmin.c to mysqladmin.cc no need for dvlags to have DEFINE_CXA_PURE_VIRTUAL anymore aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals enabled multiple management servrs to fetch data configurations from eachother client/Makefile.am: changed mysqladmin.c to mysqladmin.cc client/mysqladmin.cc: changed mysqladmin.c to mysqladmin.cc configure.in: no need for dvlags to have DEFINE_CXA_PURE_VIRTUAL anymore ndb/include/mgmapi/mgmapi.h: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/include/mgmcommon/ConfigRetriever.hpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/include/ndbapi/ndb_cluster_connection.hpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/common/mgmcommon/ConfigRetriever.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/kernel/main.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/kernel/vm/Configuration.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals changed to config setting to always use noOfMetaTables to make sure we don't overflow arrays ndb/src/kernel/vm/Configuration.hpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmapi/LocalConfig.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmapi/LocalConfig.hpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmapi/mgmapi.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmclient/CommandInterpreter.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmclient/main.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmclient/ndb_mgmclient.hpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmclient/ndb_mgmclient.h: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmsrv/MgmtSrvr.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals enabled multiple management servrs to fetch data configurations from eachother ndb/src/mgmsrv/MgmtSrvr.hpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmsrv/MgmtSrvrConfig.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmsrv/main.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/ndbapi/ndb_cluster_connection.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/tools/waiter.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals
2004-11-18 18:38:38 +00:00
Uint32 allocNodeId(int no_retries, int retry_delay_in_seconds);
int setNodeId(Uint32 nodeid);
/**
* Get config using socket
*/
struct ndb_mgm_configuration * getConfig(NdbMgmHandle handle);
/**
* Get config from file
*/
struct ndb_mgm_configuration * getConfig(const char * file);
/**
* Verify config
*/
bool verifyConfig(const struct ndb_mgm_configuration *, Uint32 nodeid);
changed mysqladmin.c to mysqladmin.cc no need for dvlags to have DEFINE_CXA_PURE_VIRTUAL anymore aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals enabled multiple management servrs to fetch data configurations from eachother client/Makefile.am: changed mysqladmin.c to mysqladmin.cc client/mysqladmin.cc: changed mysqladmin.c to mysqladmin.cc configure.in: no need for dvlags to have DEFINE_CXA_PURE_VIRTUAL anymore ndb/include/mgmapi/mgmapi.h: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/include/mgmcommon/ConfigRetriever.hpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/include/ndbapi/ndb_cluster_connection.hpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/common/mgmcommon/ConfigRetriever.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/kernel/main.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/kernel/vm/Configuration.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals changed to config setting to always use noOfMetaTables to make sure we don't overflow arrays ndb/src/kernel/vm/Configuration.hpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmapi/LocalConfig.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmapi/LocalConfig.hpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmapi/mgmapi.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmclient/CommandInterpreter.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmclient/main.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmclient/ndb_mgmclient.hpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmclient/ndb_mgmclient.h: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmsrv/MgmtSrvr.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals enabled multiple management servrs to fetch data configurations from eachother ndb/src/mgmsrv/MgmtSrvr.hpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmsrv/MgmtSrvrConfig.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmsrv/main.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/ndbapi/ndb_cluster_connection.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/tools/waiter.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals
2004-11-18 18:38:38 +00:00
Uint32 get_mgmd_port() const;
const char *get_mgmd_host() const;
const char *get_connectstring(char *buf, int buf_sz) const;
NdbMgmHandle get_mgmHandle() { return m_handle; };
Fixes for: use initial mgm connection as transporter connection ndb/include/mgmapi/mgmapi.h: ndb_mgm_convert_to_transporter may destroy the handle, now takes a pointer. ndb/include/mgmcommon/ConfigRetriever.hpp: If outside code is going to manipulate the NdbMgmHandle, allow it to do it via a get_mgmHandlePtr() call ndb/include/transporter/TransporterRegistry.hpp: connect_client and connect_ndb_mgmd may destroy the handle, now they take a pointer. ndb/src/common/transporter/TransporterRegistry.cpp: When start_service is binding to ports, report back the port numbers. We need this here now, as we re-use the initial mgm connection as a transporter, which is connected *before* start_service has allocated the dynamic port numbers. So the creation of this early transporter cannot be used to send the dynamic ports to the mgmd. We connect to the mgm server (using the handle that will be used in the client_Connect thread) if needed. This is thread safe as start_service is only ever called once, before the client connect thread starts. connect_client,connect_ndb_mgmd may destroy the NdbMgmHandle. It now accepts a pointer to it. ndb/src/kernel/vm/Configuration.cpp: Copy the m_mgmd_host string from the config_retreiver as the NdbMgmHandle in the ConfigRetreiver will be destroyed later (along with the host string). globalTransporterRegistry.connect_client will destroy the mgm handle, use a pointer to the handle. ndb/src/kernel/vm/Configuration.hpp: allow the dynamic allocation of m_mgmd_host. ndb/src/mgmapi/mgmapi.cpp: accept a pointer for ndb_mgm_convert_to_transporter as we destroy the handle.
2005-02-24 17:57:22 +11:00
NdbMgmHandle* get_mgmHandlePtr() { return &m_handle; };
changed mysqladmin.c to mysqladmin.cc no need for dvlags to have DEFINE_CXA_PURE_VIRTUAL anymore aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals enabled multiple management servrs to fetch data configurations from eachother client/Makefile.am: changed mysqladmin.c to mysqladmin.cc client/mysqladmin.cc: changed mysqladmin.c to mysqladmin.cc configure.in: no need for dvlags to have DEFINE_CXA_PURE_VIRTUAL anymore ndb/include/mgmapi/mgmapi.h: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/include/mgmcommon/ConfigRetriever.hpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/include/ndbapi/ndb_cluster_connection.hpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/common/mgmcommon/ConfigRetriever.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/kernel/main.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/kernel/vm/Configuration.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals changed to config setting to always use noOfMetaTables to make sure we don't overflow arrays ndb/src/kernel/vm/Configuration.hpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmapi/LocalConfig.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmapi/LocalConfig.hpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmapi/mgmapi.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmclient/CommandInterpreter.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmclient/main.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmclient/ndb_mgmclient.hpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmclient/ndb_mgmclient.h: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmsrv/MgmtSrvr.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals enabled multiple management servrs to fetch data configurations from eachother ndb/src/mgmsrv/MgmtSrvr.hpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmsrv/MgmtSrvrConfig.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmsrv/main.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/ndbapi/ndb_cluster_connection.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/tools/waiter.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals
2004-11-18 18:38:38 +00:00
Uint32 get_configuration_nodeid() const;
private:
BaseString errorString;
enum ErrorType {
changed mysqladmin.c to mysqladmin.cc no need for dvlags to have DEFINE_CXA_PURE_VIRTUAL anymore aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals enabled multiple management servrs to fetch data configurations from eachother client/Makefile.am: changed mysqladmin.c to mysqladmin.cc client/mysqladmin.cc: changed mysqladmin.c to mysqladmin.cc configure.in: no need for dvlags to have DEFINE_CXA_PURE_VIRTUAL anymore ndb/include/mgmapi/mgmapi.h: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/include/mgmcommon/ConfigRetriever.hpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/include/ndbapi/ndb_cluster_connection.hpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/common/mgmcommon/ConfigRetriever.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/kernel/main.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/kernel/vm/Configuration.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals changed to config setting to always use noOfMetaTables to make sure we don't overflow arrays ndb/src/kernel/vm/Configuration.hpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmapi/LocalConfig.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmapi/LocalConfig.hpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmapi/mgmapi.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmclient/CommandInterpreter.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmclient/main.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmclient/ndb_mgmclient.hpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmclient/ndb_mgmclient.h: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmsrv/MgmtSrvr.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals enabled multiple management servrs to fetch data configurations from eachother ndb/src/mgmsrv/MgmtSrvr.hpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmsrv/MgmtSrvrConfig.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmsrv/main.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/ndbapi/ndb_cluster_connection.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/tools/waiter.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals
2004-11-18 18:38:38 +00:00
CR_NO_ERROR = 0,
CR_ERROR = 1,
CR_RETRY = 2
};
ErrorType latestErrorType;
void setError(ErrorType, const char * errorMsg);
changed mysqladmin.c to mysqladmin.cc no need for dvlags to have DEFINE_CXA_PURE_VIRTUAL anymore aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals enabled multiple management servrs to fetch data configurations from eachother client/Makefile.am: changed mysqladmin.c to mysqladmin.cc client/mysqladmin.cc: changed mysqladmin.c to mysqladmin.cc configure.in: no need for dvlags to have DEFINE_CXA_PURE_VIRTUAL anymore ndb/include/mgmapi/mgmapi.h: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/include/mgmcommon/ConfigRetriever.hpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/include/ndbapi/ndb_cluster_connection.hpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/common/mgmcommon/ConfigRetriever.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/kernel/main.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/kernel/vm/Configuration.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals changed to config setting to always use noOfMetaTables to make sure we don't overflow arrays ndb/src/kernel/vm/Configuration.hpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmapi/LocalConfig.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmapi/LocalConfig.hpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmapi/mgmapi.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmclient/CommandInterpreter.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmclient/main.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmclient/ndb_mgmclient.hpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmclient/ndb_mgmclient.h: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmsrv/MgmtSrvr.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals enabled multiple management servrs to fetch data configurations from eachother ndb/src/mgmsrv/MgmtSrvr.hpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmsrv/MgmtSrvrConfig.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmsrv/main.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/ndbapi/ndb_cluster_connection.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/tools/waiter.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals
2004-11-18 18:38:38 +00:00
Uint32 _ownNodeId;
/*
Uint32 m_mgmd_port;
const char *m_mgmd_host;
changed mysqladmin.c to mysqladmin.cc no need for dvlags to have DEFINE_CXA_PURE_VIRTUAL anymore aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals enabled multiple management servrs to fetch data configurations from eachother client/Makefile.am: changed mysqladmin.c to mysqladmin.cc client/mysqladmin.cc: changed mysqladmin.c to mysqladmin.cc configure.in: no need for dvlags to have DEFINE_CXA_PURE_VIRTUAL anymore ndb/include/mgmapi/mgmapi.h: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/include/mgmcommon/ConfigRetriever.hpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/include/ndbapi/ndb_cluster_connection.hpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/common/mgmcommon/ConfigRetriever.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/kernel/main.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/kernel/vm/Configuration.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals changed to config setting to always use noOfMetaTables to make sure we don't overflow arrays ndb/src/kernel/vm/Configuration.hpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmapi/LocalConfig.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmapi/LocalConfig.hpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmapi/mgmapi.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmclient/CommandInterpreter.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmclient/main.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmclient/ndb_mgmclient.hpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmclient/ndb_mgmclient.h: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmsrv/MgmtSrvr.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals enabled multiple management servrs to fetch data configurations from eachother ndb/src/mgmsrv/MgmtSrvr.hpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmsrv/MgmtSrvrConfig.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmsrv/main.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/ndbapi/ndb_cluster_connection.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/tools/waiter.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals
2004-11-18 18:38:38 +00:00
*/
Uint32 m_version;
Uint32 m_node_type;
several config fixes for ndb, see respective file ndb/include/debugger/EventLogger.hpp: removed unused method ndb/include/mgmcommon/ConfigRetriever.hpp: put NdbMgmHandle in ConfigRetriever to enable holding connection open until setup complete ndb/include/mgmcommon/NdbConfig.h: moved naming of all "ndb" file into NdbConfig.c ndb/include/ndb_global.h: introduced define NDB_BASE_PORT to control default port for ndb ndb/src/common/debugger/EventLogger.cpp: removed unused method ndb/src/common/mgmcommon/ConfigInfo.cpp: introduced define NDB_BASE_PORT to control default port for ndb + added setting default Id's on nodes ndb/src/common/mgmcommon/ConfigRetriever.cpp: put NdbMgmHandle in ConfigRetriever to enable holding connection open until setup complete ndb/src/common/mgmcommon/IPCConfig.cpp: changed error message ndb/src/common/mgmcommon/LocalConfig.cpp: introduced define NDB_BASE_PORT to control default port for ndb ndb/src/common/mgmcommon/NdbConfig.c: moved naming of all "ndb" file into NdbConfig.c ndb/src/common/transporter/TransporterRegistry.cpp: spelling errors ndb/src/kernel/error/ErrorReporter.cpp: moved naming of all "ndb" file into NdbConfig.c ndb/src/kernel/error/ErrorReporter.hpp: moved naming of all "ndb" file into NdbConfig.c ndb/src/kernel/main.cpp: moved naming of all "ndb" file into NdbConfig.c ndb/src/kernel/vm/Configuration.cpp: moved allocation of ConfigRetriever object to Configuration to enable holing "config" open until setup finished ndb/src/kernel/vm/Configuration.hpp: moved allocation of ConfigRetriever object to Configuration to enable holing "config" open until setup finished ndb/src/mgmclient/main.cpp: fix default port number ndb/src/mgmsrv/MgmtSrvr.cpp: fix default port ndb/src/mgmsrv/Services.cpp: added spec of transporter in get_nodeid ndb/src/mgmsrv/main.cpp: moved naming of all "ndb" file into NdbConfig.c ndb/src/ndbapi/TransporterFacade.cpp: moved allocation of ConfigRetriever object to TransporterFacade to enable holing "config" open until setup finished ndb/src/ndbapi/TransporterFacade.hpp: moved allocation of ConfigRetriever object to TransporterFacade to enable holing "config" open until setup finished
2004-06-28 17:29:58 +00:00
NdbMgmHandle m_handle;
};
#endif