summaryrefslogtreecommitdiff
path: root/storage/ndb/include/mgmcommon
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2014-08-21 18:11:46 +0200
committerSergei Golubchik <serg@mariadb.org>2014-10-11 18:53:06 +0200
commit7f5e51b940d65cf541403a50af74163b9aed5cb8 (patch)
treee540d3cd4d678cd276a9d496490ac5e527f30a78 /storage/ndb/include/mgmcommon
parent57dd1f6f3fcbc7a46e1b3e71257987315f7aa687 (diff)
downloadmariadb-git-7f5e51b940d65cf541403a50af74163b9aed5cb8.tar.gz
MDEV-34 delete storage/ndb and sql/*ndb* (and collateral changes)
remove: * NDB from everywhere * IM from mtr-v1 * packaging/rpm-oel and packaging/rpm-uln * few unused spec files * plug.in file * .bzrignore
Diffstat (limited to 'storage/ndb/include/mgmcommon')
-rw-r--r--storage/ndb/include/mgmcommon/ConfigRetriever.hpp112
-rw-r--r--storage/ndb/include/mgmcommon/IPCConfig.hpp83
-rw-r--r--storage/ndb/include/mgmcommon/MgmtErrorReporter.hpp68
3 files changed, 0 insertions, 263 deletions
diff --git a/storage/ndb/include/mgmcommon/ConfigRetriever.hpp b/storage/ndb/include/mgmcommon/ConfigRetriever.hpp
deleted file mode 100644
index a40145090d7..00000000000
--- a/storage/ndb/include/mgmcommon/ConfigRetriever.hpp
+++ /dev/null
@@ -1,112 +0,0 @@
-/* Copyright (c) 2003-2007 MySQL AB
- Use is subject to license terms
-
- 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; version 2 of the License.
-
- 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 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:
- ConfigRetriever(const char * _connect_string,
- Uint32 version, Uint32 nodeType,
- const char * _bind_address = 0,
- int timeout_ms = 30000);
- ~ConfigRetriever();
-
- int do_connect(int no_retries, int retry_delay_in_seconds, int verbose);
- int disconnect();
-
- /**
- * 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();
-
- void resetError();
- int hasError();
- const char * getErrorString();
-
- /**
- * @return Node id of this node (as stated in local config or connectString)
- */
- 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);
-
- 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; };
- NdbMgmHandle* get_mgmHandlePtr() { return &m_handle; };
- void end_session(bool end) { m_end_session= end; };
-
- Uint32 get_configuration_nodeid() const;
-private:
- BaseString errorString;
- enum ErrorType {
- CR_NO_ERROR = 0,
- CR_ERROR = 1,
- CR_RETRY = 2
- };
- ErrorType latestErrorType;
-
- void setError(ErrorType, const char * errorMsg);
-
- Uint32 _ownNodeId;
- bool m_end_session;
-
- /*
- Uint32 m_mgmd_port;
- const char *m_mgmd_host;
- */
-
- Uint32 m_version;
- Uint32 m_node_type;
- NdbMgmHandle m_handle;
-};
-
-#endif
-
-
diff --git a/storage/ndb/include/mgmcommon/IPCConfig.hpp b/storage/ndb/include/mgmcommon/IPCConfig.hpp
deleted file mode 100644
index 1137a6758db..00000000000
--- a/storage/ndb/include/mgmcommon/IPCConfig.hpp
+++ /dev/null
@@ -1,83 +0,0 @@
-/* Copyright (c) 2003-2005 MySQL AB
- Use is subject to license terms
-
- 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; version 2 of the License.
-
- 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */
-
-#ifndef IPCConfig_H
-#define IPCConfig_H
-
-#include <ndb_types.h>
-#include <ndb_limits.h>
-#include <kernel_types.h>
-#include <Properties.hpp>
-
-/**
- * @class IPCConfig
- * @brief Config transporters in TransporterRegistry using Properties config
- */
-class IPCConfig
-{
-public:
- IPCConfig(Properties * props);
- ~IPCConfig();
-
- /** @return 0 for OK */
- int init();
-
- NodeId ownId() const;
-
- /** @return No of transporters configured */
- int configureTransporters(class TransporterRegistry * theTransporterRegistry);
-
- /**
- * Supply a nodeId,
- * and get next higher node id
- * @return false if none found, true otherwise
- *
- * getREPHBFrequency and getNodeType uses the last Id supplied to
- * getNextRemoteNodeId.
- */
- bool getNextRemoteNodeId(NodeId & nodeId) const;
- Uint32 getREPHBFrequency(NodeId id) const;
- const char* getNodeType(NodeId id) const;
-
- NodeId getNoOfRemoteNodes() const {
- return theNoOfRemoteNodes;
- }
-
- void print() const { props->print(); }
-
- static Uint32 configureTransporters(Uint32 nodeId,
- const struct ndb_mgm_configuration &,
- class TransporterRegistry &);
-
-private:
- NodeId the_ownId;
- Properties * props;
-
- bool addRemoteNodeId(NodeId nodeId);
- NodeId theNoOfRemoteNodes;
- NodeId theRemoteNodeIds[MAX_NODES];
-};
-
-inline
-NodeId
-IPCConfig::ownId() const
-{
- return the_ownId;
-}
-
-
-
-#endif // IPCConfig_H
diff --git a/storage/ndb/include/mgmcommon/MgmtErrorReporter.hpp b/storage/ndb/include/mgmcommon/MgmtErrorReporter.hpp
deleted file mode 100644
index 42667a29bc5..00000000000
--- a/storage/ndb/include/mgmcommon/MgmtErrorReporter.hpp
+++ /dev/null
@@ -1,68 +0,0 @@
-/* Copyright (c) 2003-2005 MySQL AB
- Use is subject to license terms
-
- 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; version 2 of the License.
-
- 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */
-
-//******************************************************************************
-// Description: This file contains the error reporting macros to be used
-// within management server.
-//
-// Author: Peter Lind
-//******************************************************************************
-
-
-#include <ndb_global.h> // exit
-#include <NdbOut.hpp>
-
-#define REPORT_WARNING(message) \
- ndbout << "WARNING: " << message << endl
-
-//****************************************************************************
-// Description: Report a warning, the message is printed on ndbout.
-// Parameters:
-// message: A text describing the warning.
-// Returns: -
-//****************************************************************************
-
-
-#define REPORT_ERROR(message) \
- ndbout << "ERROR: " << message << endl
-
-//****************************************************************************
-// Description: Report an error, the message is printed on ndbout.
-// Parameters:
-// message: A text describing the error.
-// Returns: -
-//****************************************************************************
-
-
-#ifdef MGMT_TRACE
-
-#define TRACE(message) \
- ndbout << "MGMT_TRACE: " << message << endl
-#else
-#define TRACE(message)
-
-#endif
-
-//****************************************************************************
-// Description: Print a message on ndbout.
-// Parameters:
-// message: The message
-// Returns: -
-//****************************************************************************
-
-#define MGM_REQUIRE(x) \
- if (!(x)) { ndbout << __FILE__ << " " << __LINE__ \
- << ": Warning! Requirement failed" << endl; }