mgmapi.h File Reference

#include <ndb_types.h>
#include "ndb_logevent.h"
#include "mgmapi_config_parameters.h"

Go to the source code of this file.

Data Structures

struct  ndb_mgm_cluster_state
struct  Ndb_Mgm_Error_Msg
struct  ndb_mgm_node_state
struct  ndb_mgm_reply

Configuration handling

typedef ndb_mgm_configuration_iterator ndb_mgm_configuration_iterator
enum  ndb_mgm_clusterlog_level {
  NDB_MGM_ILLEGAL_CLUSTERLOG_LEVEL = -1, NDB_MGM_CLUSTERLOG_ON = 0, NDB_MGM_CLUSTERLOG_DEBUG = 1, NDB_MGM_CLUSTERLOG_INFO = 2,
  NDB_MGM_CLUSTERLOG_WARNING = 3, NDB_MGM_CLUSTERLOG_ERROR = 4, NDB_MGM_CLUSTERLOG_CRITICAL = 5, NDB_MGM_CLUSTERLOG_ALERT = 6,
  NDB_MGM_CLUSTERLOG_ALL = 7
}
int ndb_mgm_alloc_nodeid (NdbMgmHandle handle, unsigned version, int nodetype)
int ndb_mgm_check_connection (NdbMgmHandle handle)
ndb_mgm_configuration_iteratorndb_mgm_create_configuration_iterator (struct ndb_mgm_configuration *, unsigned type_of_section)
void ndb_mgm_destroy_configuration (struct ndb_mgm_configuration *)
void ndb_mgm_destroy_iterator (ndb_mgm_configuration_iterator *)
int ndb_mgm_filter_clusterlog (NdbMgmHandle h, enum ndb_mgm_clusterlog_level s, int e, struct ndb_mgm_reply *r)
int ndb_mgm_find (ndb_mgm_configuration_iterator *, int param, unsigned value)
int ndb_mgm_first (ndb_mgm_configuration_iterator *)
ndb_mgm_configurationndb_mgm_get_configuration (NdbMgmHandle handle, unsigned version)
int ndb_mgm_get_int64_parameter (const ndb_mgm_configuration_iterator *, int param, Uint64 *value)
int ndb_mgm_get_int_parameter (const ndb_mgm_configuration_iterator *, int param, unsigned *value)
const unsigned int * ndb_mgm_get_logfilter (NdbMgmHandle h)
Uint32 ndb_mgm_get_mgmd_nodeid (NdbMgmHandle handle)
int ndb_mgm_get_string_parameter (const ndb_mgm_configuration_iterator *, int param, const char **value)
int ndb_mgm_next (ndb_mgm_configuration_iterator *)
int ndb_mgm_purge_stale_sessions (NdbMgmHandle handle, char **)
int ndb_mgm_set_loglevel_clusterlog (NdbMgmHandle h, int n, enum ndb_mgm_event_category c, int l, struct ndb_mgm_reply *r)
int ndb_mgm_valid (const ndb_mgm_configuration_iterator *)

Functions: Listening to log events

typedef ndb_logevent_handleNdbLogEventHandle
int ndb_logevent_get_fd (const NdbLogEventHandle)
int ndb_logevent_get_latest_error (const NdbLogEventHandle)
const char * ndb_logevent_get_latest_error_msg (const NdbLogEventHandle)
int ndb_logevent_get_next (const NdbLogEventHandle, struct ndb_logevent *dst, unsigned timeout_in_milliseconds)
NdbLogEventHandle ndb_mgm_create_logevent_handle (NdbMgmHandle, const int filter[])
void ndb_mgm_destroy_logevent_handle (NdbLogEventHandle *)
int ndb_mgm_get_stat_port (NdbMgmHandle handle, struct ndb_mgm_reply *reply)
int ndb_mgm_listen_event (NdbMgmHandle handle, const int filter[])
int ndb_mgm_set_loglevel_node (NdbMgmHandle handle, int nodeId, enum ndb_mgm_event_category category, int level, struct ndb_mgm_reply *reply)

Functions: Backup

int ndb_mgm_abort_backup (NdbMgmHandle handle, unsigned int backup_id, struct ndb_mgm_reply *reply)
int ndb_mgm_start_backup (NdbMgmHandle handle, int wait_completed, unsigned int *backup_id, struct ndb_mgm_reply *reply)

Functions: Connect/Disconnect Management Server

int ndb_mgm_connect (NdbMgmHandle handle, int no_retries, int retry_delay_in_seconds, int verbose)
int ndb_mgm_disconnect (NdbMgmHandle handle)
int ndb_mgm_get_configuration_nodeid (NdbMgmHandle handle)
const char * ndb_mgm_get_connected_host (NdbMgmHandle handle)
int ndb_mgm_get_connected_port (NdbMgmHandle handle)
const char * ndb_mgm_get_connectstring (NdbMgmHandle handle, char *buf, int buf_sz)
int ndb_mgm_is_connected (NdbMgmHandle handle)
int ndb_mgm_set_configuration_nodeid (NdbMgmHandle handle, int nodeid)
int ndb_mgm_set_connectstring (NdbMgmHandle handle, const char *connect_string)

Functions: Create/Destroy Management Server Handles

NdbMgmHandle ndb_mgm_create_handle ()
void ndb_mgm_destroy_handle (NdbMgmHandle *handle)

Functions: Single User Mode

int ndb_mgm_enter_single_user (NdbMgmHandle handle, unsigned int nodeId, struct ndb_mgm_reply *reply)
int ndb_mgm_exit_single_user (NdbMgmHandle handle, struct ndb_mgm_reply *reply)

Functions: Controlling Clusterlog output

const unsigned int * ndb_mgm_get_clusterlog_severity_filter (NdbMgmHandle handle)
int ndb_mgm_set_clusterlog_loglevel (NdbMgmHandle handle, int nodeId, enum ndb_mgm_event_category category, int level, struct ndb_mgm_reply *reply)
int ndb_mgm_set_clusterlog_severity_filter (NdbMgmHandle handle, enum ndb_mgm_event_severity severity, int enable, struct ndb_mgm_reply *reply)

Functions: Used to convert between different data formats

const char * ndb_mgm_get_event_category_string (enum ndb_mgm_event_category)
const char * ndb_mgm_get_event_severity_string (enum ndb_mgm_event_severity)
const char * ndb_mgm_get_node_status_string (enum ndb_mgm_node_status status)
const char * ndb_mgm_get_node_type_alias_string (enum ndb_mgm_node_type type, const char **str)
const char * ndb_mgm_get_node_type_string (enum ndb_mgm_node_type type)
ndb_mgm_event_category ndb_mgm_match_event_category (const char *)
enum ndb_mgm_node_status ndb_mgm_match_node_status (const char *status)
enum ndb_mgm_node_type ndb_mgm_match_node_type (const char *type)

Functions: Error Handling

int ndb_mgm_get_latest_error (const NdbMgmHandle handle)
const char * ndb_mgm_get_latest_error_desc (const NdbMgmHandle handle)
int ndb_mgm_get_latest_error_line (const NdbMgmHandle handle)
const char * ndb_mgm_get_latest_error_msg (const NdbMgmHandle handle)

Functions: Cluster status

ndb_mgm_cluster_statendb_mgm_get_status (NdbMgmHandle handle)

Functions: Start/stop nodes

int ndb_mgm_restart (NdbMgmHandle handle, int no_of_nodes, const int *node_list)
int ndb_mgm_restart2 (NdbMgmHandle handle, int no_of_nodes, const int *node_list, int initial, int nostart, int abort)
int ndb_mgm_start (NdbMgmHandle handle, int no_of_nodes, const int *node_list)
int ndb_mgm_stop (NdbMgmHandle handle, int no_of_nodes, const int *node_list)
int ndb_mgm_stop2 (NdbMgmHandle handle, int no_of_nodes, const int *node_list, int abort)

Typedefs

typedef ndb_mgm_handleNdbMgmHandle

Enumerations

enum  ndb_mgm_error {
  NDB_MGM_NO_ERROR = 0, NDB_MGM_ILLEGAL_CONNECT_STRING = 1001, NDB_MGM_ILLEGAL_SERVER_HANDLE = 1005, NDB_MGM_ILLEGAL_SERVER_REPLY = 1006,
  NDB_MGM_ILLEGAL_NUMBER_OF_NODES = 1007, NDB_MGM_ILLEGAL_NODE_STATUS = 1008, NDB_MGM_OUT_OF_MEMORY = 1009, NDB_MGM_SERVER_NOT_CONNECTED = 1010,
  NDB_MGM_COULD_NOT_CONNECT_TO_SOCKET = 1011, NDB_MGM_START_FAILED = 2001, NDB_MGM_STOP_FAILED = 2002, NDB_MGM_RESTART_FAILED = 2003,
  NDB_MGM_COULD_NOT_START_BACKUP = 3001, NDB_MGM_COULD_NOT_ABORT_BACKUP = 3002, NDB_MGM_COULD_NOT_ENTER_SINGLE_USER_MODE = 4001, NDB_MGM_COULD_NOT_EXIT_SINGLE_USER_MODE = 4002,
  NDB_MGM_USAGE_ERROR = 5001
}
enum  ndb_mgm_info { NDB_MGM_INFO_CLUSTER, NDB_MGM_INFO_CLUSTERLOG }
enum  ndb_mgm_node_status {
  NDB_MGM_NODE_STATUS_UNKNOWN = 0, NDB_MGM_NODE_STATUS_NO_CONTACT = 1, NDB_MGM_NODE_STATUS_NOT_STARTED = 2, NDB_MGM_NODE_STATUS_STARTING = 3,
  NDB_MGM_NODE_STATUS_STARTED = 4, NDB_MGM_NODE_STATUS_SHUTTING_DOWN = 5, NDB_MGM_NODE_STATUS_RESTARTING = 6, NDB_MGM_NODE_STATUS_SINGLEUSER = 7,
  NDB_MGM_NODE_STATUS_RESUME = 8, NDB_MGM_NODE_STATUS_MIN = 0, NDB_MGM_NODE_STATUS_MAX = 8
}
enum  ndb_mgm_node_type {
  NDB_MGM_NODE_TYPE_UNKNOWN = -1, NDB_MGM_NODE_TYPE_API = NODE_TYPE_API, NDB_MGM_NODE_TYPE_NDB = NODE_TYPE_DB, NDB_MGM_NODE_TYPE_MGM = NODE_TYPE_MGM,
  NDB_MGM_NODE_TYPE_REP = NODE_TYPE_REP, NDB_MGM_NODE_TYPE_MIN = 0, NDB_MGM_NODE_TYPE_MAX = 3
}
enum  ndb_mgm_signal_log_mode { NDB_MGM_SIGNAL_LOG_MODE_IN, NDB_MGM_SIGNAL_LOG_MODE_OUT, NDB_MGM_SIGNAL_LOG_MODE_INOUT, NDB_MGM_SIGNAL_LOG_MODE_OFF }

Variables

const struct Ndb_Mgm_Error_Msg ndb_mgm_error_msgs []
const int ndb_mgm_noOfErrorMsgs


Generated on Wed Jul 20 21:09:32 2005 for MySQL 5.0.9 Beta by  doxygen 1.4.3