Author: jstephens
Date: 2006-06-27 08:18:10 +0200 (Tue, 27 Jun 2006)
New Revision: 2524
Log:
MGM error handling functions.
Modified:
trunk/ndbapi/mgm-api.xml
Modified: trunk/ndbapi/mgm-api.xml
===================================================================
--- trunk/ndbapi/mgm-api.xml 2006-06-27 05:35:02 UTC (rev 2523)
+++ trunk/ndbapi/mgm-api.xml 2006-06-27 06:18:10 UTC (rev 2524)
@@ -32,14 +32,12 @@
</para>
<important>
-
<para>
You should not share an <literal>NdbMgmHandle</literal> between
threads. While it is possible to do so (if you implement your
own locks), this is not recommended, and each thread should use
its own management server handle.
</para>
-
</important>
<para>
@@ -213,12 +211,10 @@
</programlisting>
<note>
-
<para>
Available log events are listed in
<filename>/storage/ndb/include/mgmapi/ndb_logevent.h</filename>.
</para>
-
</note>
</section>
@@ -242,12 +238,305 @@
<title>Error-Handling Functions</title>
-<!-- <abstract> -->
+ <abstract>
- <para></para>
+ <para>
+ The MGM API used for Error handling are discussed in this
+ section.
+ </para>
-<!-- </abstract> -->
+ </abstract>
+ <para>
+ Each MGM API error is characterised by an error code and an
+ error message. There may also be an error description that may
+ provide additional information about the error. The API provides
+ functions to obtain this information in the event of an error.
+ </para>
+
+ <section id="mgm-api-ndb-mgm-get-latest-error">
+
+
<title><literal>ndb_mgm_get_latest_error()</literal></title>
+
+ <formalpara>
+
+ <title>Description</title>
+
+ <para>
+ This function is used to get the latest error code
+ associated with a given management server handle.
+ </para>
+
+ </formalpara>
+
+ <formalpara>
+
+ <title>Signature</title>
+
+ <para>
+<programlisting>
+int ndb_mgm_get_latest_error
+ (
+ const NdbMgmHandle <replaceable>handle</replaceable>
+ )
+</programlisting>
+ </para>
+
+ </formalpara>
+
+ <formalpara>
+
+ <title>Parameters</title>
+
+ <para>
+ An <literal>NdbMgMHandle</literal>.
+ </para>
+
+ </formalpara>
+
+ <formalpara>
+
+ <title>Return Value</title>
+
+ <para>
+ An error code corresponding to an
+ <literal>ndb_mgm_error</literal> value; see
+ <xref linkend="mgm-api-ndb-mgm-error"/>. You can obtain the
+ related error message using
+ <literal>ndb_mgm_get_latest_error_msg()</literal>; see
+ <xref linkend="mgm-api-ndb-mgm-get-latest-error-msg"/>.
+ </para>
+
+ </formalpara>
+
+ <formalpara>
+
+ <title>Example</title>
+
+ <para>
+<programlisting>
+[<emphasis>To be supplied...</emphasis>]
+</programlisting>
+ </para>
+
+ </formalpara>
+
+ </section>
+
+ <section id="mgm-api-ndb-mgm-get-latest-error-msg">
+
+
<title><literal>ndb_mgm_get_latest_error_msg()</literal></title>
+
+ <formalpara>
+
+ <title>Description</title>
+
+ <para>
+ This function is used to obtain the latest general error
+ message associated with an <literal>NdbMgmHandle</literal>.
+ </para>
+
+ </formalpara>
+
+ <formalpara>
+
+ <title>Signature</title>
+
+ <para>
+<programlisting>
+const char* ndb_mgm_get_latest_error_msg
+ (
+ const NdbMgmHandle <replaceable>handle</replaceable>
+ )
+</programlisting>
+ </para>
+
+ </formalpara>
+
+ <formalpara>
+
+ <title>Parameters</title>
+
+ <para>
+ An <literal>NdbMgmHandle</literal>.
+ </para>
+
+ </formalpara>
+
+ <formalpara>
+
+ <title>Return Value</title>
+
+ <para>
+ The error message text. More specific information can be
+ obtained using
+ <literal>ndb_mgm_get_latest_error_desc()</literal>; see
+ <xref linkend="mgm-api-ndb-mgm-get-latest-error-desc"/>, for
+ details.
+ </para>
+
+ </formalpara>
+
+ <formalpara>
+
+ <title>Example</title>
+
+ <para>
+<programlisting>
+[<emphasis>To be supplied...</emphasis>]
+</programlisting>
+ </para>
+
+ </formalpara>
+
+ </section>
+
+ <section id="mgm-api-ndb-mgm-get-latest-error-desc">
+
+
<title><literal>ndb_mgm_get_latest_error_desc()</literal></title>
+
+ <formalpara>
+
+ <title>Description</title>
+
+ <para>
+ Get the most recent error description associated with an
+ <literal>NdbMgmHandle</literal>; this description provides
+ additional information regarding the error message.
+ </para>
+
+ </formalpara>
+
+ <formalpara>
+
+ <title>Signature</title>
+
+ <para>
+<programlisting>
+const char* ndb_mgm_get_latest_error_desc
+ (
+ constNdbMgmHandle <replaceable>handle</replaceable>
+ )
+</programlisting>
+ </para>
+
+ </formalpara>
+
+ <formalpara>
+
+ <title>Parameters</title>
+
+ <para>
+ An <literal>NdbMgmHandle</literal>.
+ </para>
+
+ </formalpara>
+
+ <formalpara>
+
+ <title>Return Value</title>
+
+ <para>
+ The error description text.
+ </para>
+
+ </formalpara>
+
+ <formalpara>
+
+ <title>Example</title>
+
+ <para>
+<programlisting>
+[<emphasis>To be supplied...</emphasis>]
+</programlisting>
+ </para>
+
+ </formalpara>
+
+ </section>
+
+ <section id="mgm-api-ndb-mgm-set-error-stream">
+
+
<title><literal>ndb_mgm_set_error_stream()</literal></title>
+
+ <formalpara>
+
+ <title>Description</title>
+
+ <para>
+ The function can be used to set the error output stream.
+ </para>
+
+ </formalpara>
+
+ <formalpara>
+
+ <title>Signature</title>
+
+ <para>
+<programlisting>
+void ndb_mgm_set_error_stream
+ (
+ NdbMgmHandle <replaceable>handle</replaceable>,
+ FILE* <replaceable>file</replaceable>
+ )
+</programlisting>
+ </para>
+
+ </formalpara>
+
+ <formalpara>
+
+ <title>Parameters</title>
+
+ <para>
+ This function requires two parameters:
+
+ <itemizedlist>
+
+ <listitem>
+ <para>
+ An <literal>NdbMgmHandle</literal>
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ A pointer to the file to which which errors are to be
+ sent.
+ </para>
+ </listitem>
+
+ </itemizedlist>
+ </para>
+
+ </formalpara>
+
+ <formalpara>
+
+ <title>Return Value</title>
+
+ <para>
+ <emphasis>None</emphasis>.
+ </para>
+
+ </formalpara>
+
+ <formalpara>
+
+ <title>Example</title>
+
+ <para>
+<programlisting>
+[<emphasis>To be supplied...</emphasis>]
+</programlisting>
+ </para>
+
+ </formalpara>
+
+ </section>
+
</section>
<section id="mgm-api-management-server-handles">
@@ -336,14 +625,285 @@
</section>
+ <section id="mgm-api-types">
+
+ <title>MGM Enumerated Types</title>
+
+ <abstract>
+
+ <para>
+ This section contains definitions of each of the enumerated
+ types available in the MGM API.
+ </para>
+
+ </abstract>
+
+ <section id="mgm-api-ndb-mgm-node-type">
+
+ <title><literal>ndb_mgm_node_type</literal></title>
+
+ <formalpara>
+
+ <title>Description</title>
+
+ <para></para>
+
+ </formalpara>
+
+ <formalpara>
+
+ <title>Enumeration Values</title>
+
+ <para>
+ <informaltable>
+ <tgroup cols="2">
+ <colspec colwidth="35*"/>
+ <colspec colwidth="65*"/>
+ <thead>
+ <row>
+ <entry>Value</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry><literal></literal></entry>
+ <entry></entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </para>
+
+ </formalpara>
+
+ </section>
+
+ <section id="mgm-api-ndb-mgm-node-status">
+
+ <title><literal>ndb_mgm_node_status</literal></title>
+
+ <formalpara>
+
+ <title>Description</title>
+
+ <para></para>
+
+ </formalpara>
+
+ <formalpara>
+
+ <title>Enumeration Values</title>
+
+ <para>
+ <informaltable>
+ <tgroup cols="2">
+ <colspec colwidth="35*"/>
+ <colspec colwidth="65*"/>
+ <thead>
+ <row>
+ <entry>Value</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry><literal></literal></entry>
+ <entry></entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </para>
+
+ </formalpara>
+
+ </section>
+
+ <section id="mgm-api-ndb-mgm-error">
+
+ <title>The <literal>ndb_mgm_error</literal> Type</title>
+
+ <formalpara>
+
+ <title>Description</title>
+
+ <para></para>
+
+ </formalpara>
+
+ <formalpara>
+
+ <title>Enumeration Values</title>
+
+ <para>
+ <informaltable>
+ <tgroup cols="2">
+ <colspec colwidth="35*"/>
+ <colspec colwidth="65*"/>
+ <thead>
+ <row>
+ <entry>Value</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry><literal></literal></entry>
+ <entry></entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </para>
+
+ </formalpara>
+
+ </section>
+
+ <section id="mgm-api-ndb-logevent-type">
+
+ <title>The <literal>Ndb_mgm_logevent_type</literal>
Type</title>
+
+ <formalpara>
+
+ <title>Description</title>
+
+ <para></para>
+
+ </formalpara>
+
+ <formalpara>
+
+ <title>Enumeration Values</title>
+
+ <para>
+ <informaltable>
+ <tgroup cols="2">
+ <colspec colwidth="35*"/>
+ <colspec colwidth="65*"/>
+ <thead>
+ <row>
+ <entry>Value</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry><literal></literal></entry>
+ <entry></entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </para>
+
+ </formalpara>
+
+ </section>
+
+ <section id="mgm-api-ndb-mgm-event-severity">
+
+ <title>The <literal>ndb_mgm_event_severity</literal>
Type</title>
+
+ <formalpara>
+
+ <title>Description</title>
+
+ <para></para>
+
+ </formalpara>
+
+ <formalpara>
+
+ <title>Enumeration Values</title>
+
+ <para>
+ <informaltable>
+ <tgroup cols="2">
+ <colspec colwidth="35*"/>
+ <colspec colwidth="65*"/>
+ <thead>
+ <row>
+ <entry>Value</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry><literal></literal></entry>
+ <entry></entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </para>
+
+ </formalpara>
+
+ </section>
+
+ <section id="mgm-api-ndb-mgm-event-category">
+
+ <title>The <literal>ndb_mgm_event_category</literal>
Type</title>
+
+ <abstract>
+
+ <para>
+ This type describes the <literal>...</literal>'s frgamentation
+ type.
+ </para>
+
+ </abstract>
+
+ <formalpara>
+
+ <title>Description</title>
+
+ <para></para>
+
+ </formalpara>
+
+ <formalpara>
+
+ <title>Enumeration Values</title>
+
+ <para>
+ <informaltable>
+ <tgroup cols="2">
+ <colspec colwidth="35*"/>
+ <colspec colwidth="65*"/>
+ <thead>
+ <row>
+ <entry>Value</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry><literal></literal></entry>
+ <entry></entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </para>
+
+ </formalpara>
+
+ </section>
+
+ </section>
+
<section id="mgm-api-structures">
- <title>MGM Structure List</title>
+ <title>MGM Structures</title>
<abstract>
<para>
- Covers the C structures available in the MGM API
+ This section covers the programming structures available in the
+ MGM API.
</para>
</abstract>
@@ -352,13 +912,15 @@
<title>The <literal>ndb_logevent</literal>
Structure</title>
- <abstract>
+ <formalpara>
+ <title>Description</title>
+
<para>
- Models a Cluster log event.
+ This structure models a Cluster log event.
</para>
- </abstract>
+ </formalpara>
</section>
@@ -366,13 +928,15 @@
<title>The <literal>ndb_mgm_node_state</literal>
Structure</title>
- <abstract>
+ <formalpara>
+ <title>Description</title>
+
<para>
Provides information on the status of a Cluster node.
</para>
- </abstract>
+ </formalpara>
</section>
@@ -380,13 +944,15 @@
<title>The <literal>ndb_mgm_cluster_state</literal>
Structure</title>
- <abstract>
+ <formalpara>
+ <title>Descrption</title>
+
<para>
Provides information on the status of the Cluster as a whole.
</para>
- </abstract>
+ </formalpara>
</section>
@@ -394,13 +960,15 @@
<title>The <literal>ndb_mgm_reply</literal>
Structure</title>
- <abstract>
+ <formalpara>
+ <title>Description</title>
+
<para>
Contains response information from the management server.
</para>
- </abstract>
+ </formalpara>
</section>
| Thread |
|---|
| • svn commit - mysqldoc@docsrva: r2524 - trunk/ndbapi | jon | 27 Jun |