This section provides information about the data structures defined by the MGM API.
- Description
This structure models a Cluster log event, and is used for storing and retrieving log event information.
Definition.
ndb_logevent has 8 members, the first 7 of
which are shown in the following list:
void*: AnhandleNdbLogEventHandle, set byndb_logevent_get_next(). This handle is used only for purposes of comparison.type: Tells which type of event (Ndb_logevent_type) this is.unsigned: The time at which the log event was registered with the management server.timecategory: The log event category (ndb_mgm_event_category).severity: The log event severity (ndb_mgm_event_severity).unsigned: The log event level. This is a value in the range of 0 to 15, inclusive.levelunsigned: The node ID of the node that reported this event.source_nodeid
The 8th member of this structure
contains data specific to the log event, and is dependent on its
type. It is defined as the union of a number of data structures,
each corresponding to a log event type. Which structure to use
is determined by the value of type,
and is shown in the following table:
Table 3.7 Type Ndb_logevent_type values and structures used
Ndb_logevent_type Value |
Structure |
|---|---|
NDB_LE_Connected |
Connected:
|
NDB_LE_Disconnected |
Disconnected:
|
NDB_LE_CommunicationClosed |
CommunicationClosed:
|
NDB_LE_CommunicationOpened |
CommunicationOpened:
|
NDB_LE_ConnectedApiVersion |
ConnectedApiVersion:
|
NDB_LE_GlobalCheckpointStarted |
GlobalCheckpointStarted:
|
NDB_LE_GlobalCheckpointCompleted |
GlobalCheckpointCompleted:
|
NDB_LE_LocalCheckpointStarted |
LocalCheckpointStarted:
|
NDB_LE_LocalCheckpointCompleted |
LocalCheckpointCompleted:
|
NDB_LE_LCPStoppedInCalcKeepGci |
LCPStoppedInCalcKeepGci:
|
NDB_LE_LCPFragmentCompleted |
LCPFragmentCompleted:
|
NDB_LE_UndoLogBlocked |
UndoLogBlocked:
|
NDB_LE_NDBStartStarted |
NDBStartStarted:
|
NDB_LE_NDBStartCompleted |
NDBStartCompleted:
|
NDB_LE_STTORRYRecieved |
STTORRYRecieved:
|
NDB_LE_StartPhaseCompleted |
StartPhaseCompleted:
|
NDB_LE_CM_REGCONF |
CM_REGCONF:
|
NDB_LE_CM_REGREF |
CM_REGREF:
|
NDB_LE_FIND_NEIGHBOURS |
FIND_NEIGHBOURS:
|
NDB_LE_NDBStopStarted |
NDBStopStarted:
|
NDB_LE_NDBStopCompleted |
NDBStopCompleted:
|
NDB_LE_NDBStopForced |
NDBStopForced:
|
NDB_LE_NDBStopAborted |
NDBStopAborted:
|
NDB_LE_StartREDOLog |
StartREDOLog:
|
NDB_LE_StartLog |
StartLog:
|
NDB_LE_UNDORecordsExecuted |
UNDORecordsExecuted:
|
NDB_LE_NR_CopyDict |
NR_CopyDict:
|
NDB_LE_NR_CopyDistr |
NR_CopyDistr:
|
NDB_LE_NR_CopyFragsStarted |
NR_CopyFragsStarted:
|
NDB_LE_NR_CopyFragDone |
NR_CopyFragDone:
|
NDB_LE_NR_CopyFragsCompleted |
NR_CopyFragsCompleted:
|
NDB_LE_NodeFailCompleted |
NodeFailCompleted:(For block and
completing_node,
0 is interpreted as
“all”.) |
NDB_LE_NODE_FAILREP |
NODE_FAILREP:
|
NDB_LE_ArbitState |
ArbitState:
|
NDB_LE_ArbitResult |
ArbitResult:
|
NDB_LE_GCP_TakeoverStarted |
GCP_TakeoverStarted:
|
NDB_LE_GCP_TakeoverCompleted |
GCP_TakeoverCompleted:
|
NDB_LE_LCP_TakeoverStarted |
LCP_TakeoverStarted:
|
NDB_LE_TransReportCounters |
TransReportCounters:
|
NDB_LE_OperationReportCounters |
OperationReportCounters:
|
NDB_LE_TableCreated |
TableCreated:
|
NDB_LE_JobStatistic |
JobStatistic:
|
NDB_LE_SendBytesStatistic |
SendBytesStatistic:
|
NDB_LE_ReceiveBytesStatistic |
ReceiveBytesStatistic:
|
NDB_LE_MemoryUsage |
MemoryUsage:
|
NDB_LE_TransporterError |
TransporterError:
|
NDB_LE_TransporterWarning |
TransporterWarning:
|
NDB_LE_MissedHeartbeat |
MissedHeartbeat:
|
NDB_LE_DeadDueToHeartbeat |
DeadDueToHeartbeat:
|
NDB_LE_WarningEvent |
WarningEvent:
|
NDB_LE_SentHeartbeat |
SentHeartbeat:
|
NDB_LE_CreateLogBytes |
CreateLogBytes:
|
NDB_LE_InfoEvent |
InfoEvent:
|
NDB_LE_EventBufferStatus (Prior to NDB 7.5) |
EventBufferStatus::
|
NDB_LE_EventBufferStatus2 (NDB 7.5) |
EventBufferStatus2:
report_reason is one of
NO_REPORT,
COMPLETELY_BUFFERING,
PARTIALLY_DISCARDING,
COMPLETELY_DISCARDING,
PARTIALLY_BUFFERING,
BUFFERED_EPOCHS_OVER_THRESHOLD,
ENOUGH_FREE_EVENTBUFFER, or
LOW_FREE_EVENTBUFFER; see
Event Buffer Reporting in the Cluster Log, for
descriptions of these values |
NDB_LE_BackupStarted |
BackupStarted:
|
NDB_LE_BackupFailedToStart |
BackupFailedToStart:
|
NDB_LE_BackupCompleted |
BackupCompleted:
|
NDB_LE_BackupAborted |
BackupAborted:
|
NDB_LE_SingleUser |
SingleUser:
|
NDB_LE_StartReport |
StartReport:
|
- Description
Provides information on the status of a Cluster node.
Definition. This structure contains the following members:
int: The cluster node's node ID.node_id-
enum ndb_mgm_node_type: The node type.node_typeSee The ndb_mgm_node_type Type, for permitted values.
-
enum ndb_mgm_node_status: The node's status.node_statusSee The ndb_mgm_node_status Type, for permitted values.
-
int: The start phase.start_phaseThis is valid only if the
node_typeisNDB_MGM_NODE_TYPE_NDBand thenode_statusisNDB_MGM_NODE_STATUS_STARTING. -
int: The ID for heartbeats and master takeover.dynamic_idValid only for data (ndbd) nodes.
-
int: The node group to which the node belongs.node_groupValid only for data (ndbd) nodes.
int: Internal version number.versionint: The number of times this node has connected to or disconnected from the management server.connect_countchar: The IP address of this node as seen by the other nodes in the cluster.connect_address[]int: The MySQL version number, expressed as an integer (for example:mysql_version80200). Applies only to SQL nodes.int: The node ID of the API or SQL node having exclusive access when the cluster is in single user mode. Does not otherwise apply. Added in NDB 8.0.is_single_user
- Description
Provides information on the status of a Cluster node.
Definition. This structure contains the following members:
int: The cluster node's node ID.node_id-
enum ndb_mgm_node_type: The node type.node_typeSee The ndb_mgm_node_type Type, for permitted values.
-
enum ndb_mgm_node_status: The node's status.node_statusSee The ndb_mgm_node_status Type, for permitted values.
-
int: The start phase.start_phaseThis is valid only if the
node_typeisNDB_MGM_NODE_TYPE_NDBand thenode_statusisNDB_MGM_NODE_STATUS_STARTING. -
int: The ID for heartbeats and master takeover.dynamic_idValid only for data (ndbd) nodes.
-
int: The node group to which the node belongs.node_groupValid only for data (ndbd) nodes.
int: Internal version number.versionint: The number of times this node has connected to or disconnected from the management server.connect_countint: The MySQL version number, expressed as an integer (for example:mysql_version80200). Applies only to SQL nodes.int: The node ID of the API or SQL node having exclusive access when the cluster is in single user mode. Does not otherwise apply.is_single_userchar: The IP address of this node as seen by the other nodes in the cluster.connect_address[]
- Description
Provides information on the status of all Cluster nodes. This structure is returned by
ndb_mgm_get_status().
Definition. This structure has the following two members:
int: The number of elements in theno_of_nodesnode_statesarray.-
struct ndb_mgm_node_state: An array containing the states of the nodes.node_states[]Each element of this array is an
ndb_mgm_node_statestructure.
See ndb_mgm_get_status().
- Description
Provides information on the status of all Cluster nodes. This structure is returned by
ndb_mgm_get_status3(), and was added in NDB 8.0.
Definition. This structure has the following two members:
int: The number of elements in theno_of_nodesnode_statesarray.-
struct ndb_mgm_node_state2: An array containing the states of the nodes.node_states[]Each element of this array is an
ndb_mgm_node_state2structure.
- Description
Contains response information, consisting of a response code and a corresponding message, from the management server.
Definition. This structure contains two members, as shown here:
-
int: For a successful operation, this value isreturn_code0; otherwise, it contains an error code.For error codes, see The ndb_mgm_error Type.
char: contains the text of the response or error message.message[256]
See ndb_mgm_get_latest_error(), and ndb_mgm_get_latest_error_msg().