MySQL NDB Cluster API Developer Guide  /  The MGM API  /  MGM API Data Types

3.3 MGM API Data Types

This section provides information about the data types defined by the MGM API.

The types described in this section are all defined in the file /storage/ndb/include/mgmapi/mgmapi.h, with the exception of Ndb_logevent_type, ndb_mgm_event_severity, ndb_mgm_logevent_handle_error, and ndb_mgm_event_category, which are defined in /storage/ndb/include/mgmapi/ndb_logevent.h.

The ndb_mgm_node_type Type

Description

This is used to classify the different types of nodes in an NDB Cluster.

Enumeration values

Possible values are shown, along with descriptions, in the following table:

Table 3.1  Type ndb_mgm_node_type values and descriptions.

Value Description
NDB_MGM_NODE_TYPE_UNKNOWN Unknown
NDB_MGM_NODE_TYPE_API API Node (SQL node)
NDB_MGM_NODE_TYPE_NDB Data node
NDB_MGM_NODE_TYPE_MGM Management node

The ndb_mgm_node_status Type

Description

This type describes a Cluster node's status.

Enumeration values

Possible values are shown, along with descriptions, in the following table:

Table 3.2  Type ndb_mgm_node_status values and descriptions.

Value Description
NDB_MGM_NODE_STATUS_UNKNOWN The node's status is not known
NDB_MGM_NODE_STATUS_NO_CONTACT The node cannot be contacted
NDB_MGM_NODE_STATUS_NOT_STARTED The node has not yet executed the startup protocol
NDB_MGM_NODE_STATUS_STARTING The node is executing the startup protocol
NDB_MGM_NODE_STATUS_STARTED The node is running
NDB_MGM_NODE_STATUS_SHUTTING_DOWN The node is shutting down
NDB_MGM_NODE_STATUS_RESTARTING The node is restarting
NDB_MGM_NODE_STATUS_SINGLEUSER The node is running in single-user (maintenance) mode
NDB_MGM_NODE_STATUS_RESUME The node is in resume mode
NDB_MGM_NODE_STATUS_CONNECTED The node is connected

The ndb_mgm_error Type

Description

The values for this type are the error codes that may be generated by MGM API functions. These may be found in Section 3.5, “MGM API Errors”.

See also ndb_mgm_get_latest_error(), for more information.

The Ndb_logevent_type Type

Description

These are the types of log events available in the MGM API, grouped by event category. (See The ndb_mgm_event_category Type.)

Most of these log event types have one or more corresponding log event messages; these are listed in NDB Cluster Log Messages.

Enumeration values

Possible values are shown, along with descriptions, in the following table:

Table 3.3 Type Ndb_logevent_type values, descriptions, and event categories

Type Description Category
NDB_LE_Connected The node has connected NDB_MGM_EVENT_CATEGORY_CONNECTION
NDB_LE_Disconnected The node was disconnected NDB_MGM_EVENT_CATEGORY_CONNECTION
NDB_LE_CommunicationClosed Communication with the node has been closed NDB_MGM_EVENT_CATEGORY_CONNECTION
NDB_LE_CommunicationOpened Communication with the node has been started NDB_MGM_EVENT_CATEGORY_CONNECTION
NDB_LE_ConnectedApiVersion The API version used by an API node; in the case of a MySQL server (SQL node), this is the same as displayed by SELECT VERSION() NDB_MGM_EVENT_CATEGORY_CONNECTION
NDB_LE_GlobalCheckpointStarted A global checkpoint has been started NDB_MGM_EVENT_CATEGORY_CHECKPOINT
NDB_LE_GlobalCheckpointCompleted A global checkpoint has been completed NDB_MGM_EVENT_CATEGORY_CHECKPOINT
NDB_LE_LocalCheckpointStarted The node has begun a local checkpoint NDB_MGM_EVENT_CATEGORY_CHECKPOINT
NDB_LE_LocalCheckpointCompleted The node has completed a local checkpoint NDB_MGM_EVENT_CATEGORY_CHECKPOINT
NDB_LE_LCPStoppedInCalcKeepGci The lcoal checkpoint was aborted, but the last global checkpoint was preserved NDB_MGM_EVENT_CATEGORY_CHECKPOINT
NDB_LE_LCPFragmentCompleted Copying of a table fragment was completed NDB_MGM_EVENT_CATEGORY_CHECKPOINT
NDB_LE_NDBStartStarted The node has begun to start NDB_MGM_EVENT_CATEGORY_STARTUP
NDB_LE_NDBStartCompleted The node has completed the startup process NDB_MGM_EVENT_CATEGORY_STARTUP
NDB_LE_STTORRYRecieved The node received an STTORRY signal, indicating that the reading of configuration data is underway; see Configuration Read Phase (STTOR Phase -1), and STTOR Phase 0, for more information NDB_MGM_EVENT_CATEGORY_STARTUP
NDB_LE_StartPhaseCompleted A node start phase has been completed NDB_MGM_EVENT_CATEGORY_STARTUP
NDB_LE_CM_REGCONF The node has received a CM_REGCONF signal; see STTOR Phase 1, for more information NDB_MGM_EVENT_CATEGORY_STARTUP
NDB_LE_CM_REGREF The node has received a CM_REGREF signal; see STTOR Phase 1, for more information NDB_MGM_EVENT_CATEGORY_STARTUP
NDB_LE_FIND_NEIGHBOURS The node has discovered its neighboring nodes in the cluster NDB_MGM_EVENT_CATEGORY_STARTUP
NDB_LE_NDBStopStarted The node is beginning to shut down NDB_MGM_EVENT_CATEGORY_STARTUP
NDB_LE_NDBStopCompleted Node shutdown completed NDB_MGM_EVENT_CATEGORY_STARTUP
NDB_LE_NDBStopForced The node is being forced to shut down (usually indicates a severe problem in the cluster) NDB_MGM_EVENT_CATEGORY_STARTUP
NDB_LE_NDBStopAborted The started to shut down, but was forced to continue running; this happens, for example, when a STOP command was issued in the management client for a node such that the cluster would no longer be able to keep all data available if the node were shut down NDB_MGM_EVENT_CATEGORY_STARTUP
NDB_LE_StartREDOLog Redo logging has been started NDB_MGM_EVENT_CATEGORY_STARTUP
NDB_LE_StartLog Logging has started NDB_MGM_EVENT_CATEGORY_STARTUP
NDB_LE_UNDORecordsExecuted The node has read and executed all records from the redo log NDB_MGM_EVENT_CATEGORY_STARTUP
NDB_LE_StartReport The node is issuing a start report NDB_MGM_EVENT_CATEGORY_STARTUP
NDB_LE_NR_CopyDict The node is copying the data dictionary NDB_MGM_EVENT_CATEGORY_NODE_RESTART
NDB_LE_NR_CopyDistr The node is copying data distribution information NDB_MGM_EVENT_CATEGORY_NODE_RESTART
NDB_LE_NR_CopyFragsStarted The node is copying table fragments NDB_MGM_EVENT_CATEGORY_NODE_RESTART
NDB_LE_NR_CopyFragDone The node has completed copying a table fragment NDB_MGM_EVENT_CATEGORY_NODE_RESTART
NDB_LE_NR_CopyFragsCompleted The node has completed copying all necessary table fragments NDB_MGM_EVENT_CATEGORY_NODE_RESTART
NDB_LE_NodeFailCompleted All (remaining) nodes has been notified of the failure of a data node NDB_MGM_EVENT_CATEGORY_NODE_RESTART
NDB_LE_NODE_FAILREP A data node has failed NDB_MGM_EVENT_CATEGORY_NODE_RESTART
NDB_LE_ArbitState This event is used to report on the current state of arbitration in the cluster NDB_MGM_EVENT_CATEGORY_NODE_RESTART
NDB_LE_ArbitResult This event is used to report on the outcome of node arbitration NDB_MGM_EVENT_CATEGORY_NODE_RESTART
NDB_LE_GCP_TakeoverStarted The node is attempting to become the master node (to assume responsibility for GCPs) NDB_MGM_EVENT_CATEGORY_NODE_RESTART
NDB_LE_GCP_TakeoverCompleted The node has become the master (and assumed responsibility for GCPs) NDB_MGM_EVENT_CATEGORY_NODE_RESTART
NDB_LE_LCP_TakeoverStarted The node is attempting to become the master node (to assume responsibility for LCPs) NDB_MGM_EVENT_CATEGORY_NODE_RESTART
NDB_LE_LCP_TakeoverCompleted The node has become the master (and assumed responsibility for LCPs) NDB_MGM_EVENT_CATEGORY_NODE_RESTART
NDB_LE_TransReportCounters This indicates a report of transaction activity, which is given approximately once every 10 seconds NDB_MGM_EVENT_CATEGORY_STATISTIC
NDB_LE_OperationReportCounters Indicates a report on the number of operations performed by this node (also provided approximately once every 10 seconds) NDB_MGM_EVENT_CATEGORY_STATISTIC
NDB_LE_TableCreated A new table has been created NDB_MGM_EVENT_CATEGORY_STATISTIC
NDB_LE_UndoLogBlocked Undo logging is blocked because the log buffer is close to overflowing NDB_MGM_EVENT_CATEGORY_STATISTIC
NDB_LE_JobStatistic ... NDB_MGM_EVENT_CATEGORY_STATISTIC
NDB_LE_SendBytesStatistic Indicates a report of the average number of bytes transmitted per send operation by this node NDB_MGM_EVENT_CATEGORY_STATISTIC
NDB_LE_ReceiveBytesStatistic Indicates a report of the average number of bytes received per send operation to this node NDB_MGM_EVENT_CATEGORY_STATISTIC
NDB_LE_MemoryUsage A DUMP 1000 command has been issued to this node, and it is reporting its memory usage in turn NDB_MGM_EVENT_CATEGORY_STATISTIC
NDB_LE_TransporterError A transporter error has occurred; see NDB Transporter Errors, for transporter error codes and messages NDB_MGM_EVENT_CATEGORY_ERROR
NDB_LE_TransporterWarning A potential problem is occurring in the transporter; see NDB Transporter Errors, for transporter error codes and messages NDB_MGM_EVENT_CATEGORY_ERROR
NDB_LE_MissedHeartbeat Indicates a data node has missed a hreatbeat expected from another data node NDB_MGM_EVENT_CATEGORY_ERROR
NDB_LE_DeadDueToHeartbeat A data node has missed at least 3 heartbeats in succssion from another data node, and is reporting that it can no longer communicate with that data node NDB_MGM_EVENT_CATEGORY_ERROR
NDB_LE_WarningEvent Indicates a warning message NDB_MGM_EVENT_CATEGORY_ERROR
NDB_LE_SentHeartbeat A node heartbeat has been sent NDB_MGM_EVENT_CATEGORY_INFO
NDB_LE_CreateLogBytes ... NDB_MGM_EVENT_CATEGORY_INFO
NDB_LE_InfoEvent Indicates an informational message NDB_MGM_EVENT_CATEGORY_INFO
NDB_LE_SingleUser The cluster has entered or exited single user mode NDB_MGM_EVENT_CATEGORY_INFO
NDB_LE_EventBufferStatus This type of event indicates potentially excessive usage of the event buffer NDB_MGM_EVENT_CATEGORY_INFO
NDB_LE_EventBufferStatus2 Extension of NDB_LE_EventBufferStatus providing improved reporting of event buffer status; added in NDB 7.5 NDB_MGM_EVENT_CATEGORY_INFO
NDB_LE_EventBufferStatus3 Extension of NDB_LE_EventBufferStatus which uses 64-bit values for total, maximum, and allocated bytes; added in NDB 7.5.23, 7.6.19, and 8.0.26 NDB_MGM_EVENT_CATEGORY_INFO
NDB_LE_BackupStarted A backup has been started NDB_MGM_EVENT_CATEGORY_BACKUP
NDB_LE_BackupFailedToStart A backup has failed to start NDB_MGM_EVENT_CATEGORY_BACKUP
NDB_LE_BackupCompleted A backup has been completed successfully NDB_MGM_EVENT_CATEGORY_BACKUP
NDB_LE_BackupAborted A backup in progress was terminated by the user NDB_MGM_EVENT_CATEGORY_BACKUP

The ndb_mgm_event_severity Type

Description

These are the log event severities used to filter the cluster log by ndb_mgm_set_clusterlog_severity_filter(), and to filter listening to events by ndb_mgm_listen_event().

Enumeration values

Possible values are shown, along with descriptions, in the following table:

Table 3.4  Type ndb_mgm_event_severity values and descriptions

Value Description
NDB_MGM_ILLEGAL_EVENT_SEVERITY Invalid event severity specified
NDB_MGM_EVENT_SEVERITY_ON Cluster logging is enabled
NDB_MGM_EVENT_SEVERITY_DEBUG Used for NDB Cluster development only
NDB_MGM_EVENT_SEVERITY_INFO Informational messages
NDB_MGM_EVENT_SEVERITY_WARNING Conditions that are not errors as such, but that might require special handling
NDB_MGM_EVENT_SEVERITY_ERROR Nonfatal error conditions that should be corrected
NDB_MGM_EVENT_SEVERITY_CRITICAL Critical conditions such as device errors or out of memory errors
NDB_MGM_EVENT_SEVERITY_ALERT Conditions that require immediate attention, such as corruption of the cluster
NDB_MGM_EVENT_SEVERITY_ALL All severity levels

See ndb_mgm_set_clusterlog_severity_filter(), and ndb_mgm_listen_event(), for information on how this type is used by those functions.

The ndb_logevent_handle_error Type

Description

This type is used to describe log event errors.

Enumeration values

Possible values are shown, along with descriptions, in the following table:

Table 3.5  Type ndb_logevent_handle_error values and descriptions

Value Description
NDB_LEH_NO_ERROR No error
NDB_LEH_READ_ERROR Read error
NDB_LEH_MISSING_EVENT_SPECIFIER Invalid, incomplete, or missing log event specification
NDB_LEH_UNKNOWN_EVENT_TYPE Unknown log event type
NDB_LEH_UNKNOWN_EVENT_VARIABLE Unknown log event variable
NDB_LEH_INTERNAL_ERROR Internal error
NDB_LEH_CONNECTION_ERROR Connection error, or lost connection with management server

NDB_LEH_CONNECTION_ERROR was added in NDB 7.4.13. (BUG #19474782)

The ndb_mgm_event_category Type

Description

These are the log event categories referenced in The Ndb_logevent_type Type. They are also used by the MGM API functions ndb_mgm_set_clusterlog_loglevel() and ndb_mgm_listen_event().

Enumeration values

Possible values are shown, along with descriptions, in the following table:

Table 3.6  Type ndb_mgm_event_category values and descriptions

Value Description
NDB_MGM_ILLEGAL_EVENT_CATEGORY Invalid log event category
NDB_MGM_EVENT_CATEGORY_STARTUP Log events occurring during startup
NDB_MGM_EVENT_CATEGORY_SHUTDOWN Log events occurring during shutdown
NDB_MGM_EVENT_CATEGORY_STATISTIC Statistics log events
NDB_MGM_EVENT_CATEGORY_CHECKPOINT Log events related to checkpoints
NDB_MGM_EVENT_CATEGORY_NODE_RESTART Log events occurring during node restart
NDB_MGM_EVENT_CATEGORY_CONNECTION Log events relating to connections between cluster nodes
NDB_MGM_EVENT_CATEGORY_BACKUP Log events relating to backups
NDB_MGM_EVENT_CATEGORY_CONGESTION Log events relating to congestion
NDB_MGM_EVENT_CATEGORY_INFO Uncategorised log events (severity level INFO)
NDB_MGM_EVENT_CATEGORY_ERROR Uncategorised log events (severity level WARNING, ERROR, CRITICAL, or ALERT)

See ndb_mgm_set_clusterlog_loglevel(), and ndb_mgm_listen_event(), for more information.