List:Commits« Previous MessageNext Message »
From:jon Date:June 27 2006 7:11pm
Subject:svn commit - mysqldoc@docsrva: r2531 - trunk/ndbapi
View as plain text  
Author: jstephens
Date: 2006-06-27 19:11:37 +0200 (Tue, 27 Jun 2006)
New Revision: 2531

Log:
Node start/stop/restart functions.

Modified:
   trunk/ndbapi/mgm-api.xml

Modified: trunk/ndbapi/mgm-api.xml
===================================================================
--- trunk/ndbapi/mgm-api.xml	2006-06-27 14:14:52 UTC (rev 2530)
+++ trunk/ndbapi/mgm-api.xml	2006-06-27 17:11:37 UTC (rev 2531)
@@ -2129,24 +2129,937 @@
 
       <title>Cluster Status</title>
 
-<!-- <abstract> -->
+      <abstract>
 
-      <para></para>
+        <para>
+          This section discusses how to obtain the status of
+          <literal>NDB</literal> Cluster nodes.
+        </para>
 
-<!-- </abstract> -->
+      </abstract>
 
+      <section id="mgm-api-ndb-mgm-get-status">
+
+        <title><literal>ndb_mgm_get_status()</literal></title>
+
+        <formalpara>
+
+          <title>Description</title>
+
+          <para>
+            This function is used to obtain the status of the nodes in
+            an <literal>NDB</literal> Cluster.
+          </para>
+
+        </formalpara>
+
+        <note>
+          <para>
+            The caller must free the pointer returned by this function.
+          </para>
+        </note>
+
+        <formalpara>
+
+          <title>Signature</title>
+
+          <para>
+<programlisting>
+struct ndb_mgm_cluster_state* ndb_mgm_get_status
+    (
+      NdbMgmHandle <replaceable>handle</replaceable>
+    )
+</programlisting>
+          </para>
+
+        </formalpara>
+
+        <formalpara>
+
+          <title>Parameters</title>
+
+          <para>
+            This function takes a single parameter &mdash; a management
+            server <replaceable>handle</replaceable>.
+          </para>
+
+        </formalpara>
+
+        <formalpara>
+
+          <title>Return Value</title>
+
+          <para>
+            A pointer to an <literal>ndb_mgm_cluster_state</literal>
+            data structure. See
+            <xref linkend="struct-ndb-mgm-cluster-state"/>, for more
+            information.
+          </para>
+
+        </formalpara>
+
+        <formalpara>
+
+          <title>Example</title>
+
+          <para>
+<programlisting>
+[<emphasis>To be supplied...</emphasis>]
+</programlisting>
+          </para>
+
+        </formalpara>
+
+      </section>
+
     </section>
 
     <section id="mgm-api-functions-start-stop-nodes">
 
       <title>Starting &amp; Stopping Nodes</title>
 
-<!-- <abstract> -->
+      <abstract>
 
-      <para></para>
+        <para>
+          The MGM API provides several functions which can be used to
+          start, stop, and restart one or more Cluster data nodes. These
+          functions are discussed in this section.
+        </para>
 
-<!-- </abstract> -->
+      </abstract>
 
+      <formalpara>
+
+        <title>Starting, Stopping, and Restarting Nodes</title>
+
+        <para>
+          You can start, stop, and restart Cluster nodes using the
+          following functions:
+
+          <itemizedlist>
+
+            <listitem>
+              <formalpara>
+
+                <title>Starting Nodes</title>
+
+                <para>
+                  Use <literal>ndb_mgm_start()</literal>.
+                </para>
+
+              </formalpara>
+            </listitem>
+
+            <listitem>
+              <formalpara>
+
+                <title>Stopping Nodes</title>
+
+                <para>
+                  Use <literal>ndb_mgm_stop()</literal>,
+                  <literal>ndb_mgm_stop2()</literal>, or
+                  <literal>ndb_mgm_stop3()</literal>.
+                </para>
+
+              </formalpara>
+            </listitem>
+
+            <listitem>
+              <formalpara>
+
+                <title>Restarting Nodes</title>
+
+                <para>
+                  Use <literal>ndb_mgm_restart()</literal>,
+                  <literal>ndb_mgm_restart2()</literal>, or
+                  <literal>ndb_mgm_restart3()</literal>.
+                </para>
+
+              </formalpara>
+            </listitem>
+
+          </itemizedlist>
+
+          These functions are detailed in the next few sections.
+        </para>
+
+      </formalpara>
+
+      <section id="mgm-api-ndb-mgm-start">
+
+        <title><literal>ndb_mgm_start()</literal></title>
+
+        <formalpara>
+
+          <title>Description</title>
+
+          <para>
+            This function can be used to start one or more Cluster
+            nodes. The nodes to be started must have been started with
+            the nostart option (<option>-n</option>), meaning that the
+            data node binary was started and is waiting for a
+            <literal>START</literal> management command which actually
+            enables the node.
+          </para>
+
+        </formalpara>
+
+        <formalpara>
+
+          <title>Signature</title>
+
+          <para>
+<programlisting>
+int ndb_mgm_start
+    (
+      NdbMgmHandle <replaceable>handle</replaceable>,
+		  int          <replaceable>number</replaceable>,
+		  const int*   <replaceable>list</replaceable>
+    )
+</programlisting>
+          </para>
+
+        </formalpara>
+
+        <formalpara>
+
+          <title>Parameters</title>
+
+          <para>
+            ndb_mgm_start() takes 3 parameters:
+
+            <itemizedlist>
+
+              <listitem>
+                <para>
+                  An <literal>NdbMgmHandle</literal>.
+                </para>
+              </listitem>
+
+              <listitem>
+                <para>
+                  A <replaceable>number</replaceable> of nodes to be
+                  started. Use <literal>0</literal> to start all of the
+                  data nodes in the cluster.
+                </para>
+              </listitem>
+
+              <listitem>
+                <para>
+                  A <replaceable>list</replaceable> of the node IDs of
+                  the nodes to be started.
+                </para>
+              </listitem>
+
+            </itemizedlist>
+          </para>
+
+        </formalpara>
+
+        <formalpara>
+
+          <title>Return Value</title>
+
+          <para>
+            The number of nodes actually started; in the event of
+            failure, <literal>-1</literal> is returned.
+          </para>
+
+        </formalpara>
+
+        <formalpara>
+
+          <title>Example</title>
+
+          <para>
+<programlisting>
+[<emphasis>To be supplied...</emphasis>]
+</programlisting>
+          </para>
+
+        </formalpara>
+
+      </section>
+
+      <section id="mgm-api-ndb-mgm-stop">
+
+        <title><literal>ndb_mgm_stop()</literal></title>
+
+        <formalpara>
+
+          <title>Description</title>
+
+          <para>
+            This function stops one or more data nodes.
+          </para>
+
+        </formalpara>
+
+        <formalpara>
+
+          <title>Signature</title>
+
+          <para>
+<programlisting>
+int ndb_mgm_stop
+    (
+      NdbMgmHandle <replaceable>handle</replaceable>, 
+      int          <replaceable>number</replaceable>,
+		  const int*   <replaceable>list</replaceable>
+    )
+</programlisting>
+          </para>
+
+        </formalpara>
+
+        <formalpara>
+
+          <title>Parameters</title>
+
+          <para>
+            ndb_mgm_stop() takes 3 parameters:
+
+            <itemizedlist>
+
+              <listitem>
+                <para>
+                  An <literal>NdbMgmHandle</literal>.
+                </para>
+              </listitem>
+
+              <listitem>
+                <para>
+                  The <replaceable>number</replaceable> of nodes to be
+                  stopped. Use <literal>0</literal> to stop all of the
+                  data nodes in the cluster.
+                </para>
+              </listitem>
+
+              <listitem>
+                <para>
+                  A <replaceable>list</replaceable> of the node IDs of
+                  the nodes to be stopped.
+                </para>
+              </listitem>
+
+            </itemizedlist>
+
+            Calling this function is equivalent to calling
+            <literal>ndb_mgm_stop2(<replaceable>handle</replaceable>,
+            <replaceable>number</replaceable>,
+            <replaceable>list</replaceable>, 0)</literal>. See
+            <xref linkend="mgm-api-ndb-mgm-stop2"/>.
+          </para>
+
+        </formalpara>
+
+        <formalpara>
+
+          <title>Return Value</title>
+
+          <para>
+            The number of nodes actually stopped; in the event of
+            failure, <literal>-1</literal> is returned.
+          </para>
+
+        </formalpara>
+
+        <formalpara>
+
+          <title>Example</title>
+
+          <para>
+<programlisting>
+[<emphasis>To be supplied...</emphasis>]
+</programlisting>
+          </para>
+
+        </formalpara>
+
+      </section>
+
+      <section id="mgm-api-ndb-mgm-stop2">
+
+        <title><literal>ndb_mgm_stop2()</literal></title>
+
+        <formalpara>
+
+          <title>Description</title>
+
+          <para>
+            Like <literal>ndb_mgm_stop()</literal>, this function stops
+            one or more data nodes. However, it offers the ability to
+            specify whether or not the nodes shut down gracefully.
+          </para>
+
+        </formalpara>
+
+        <formalpara>
+
+          <title>Signature</title>
+
+          <para>
+<programlisting>
+int ndb_mgm_stop2
+    (
+      NdbMgmHandle <replaceable>handle</replaceable>, 
+      int          <replaceable>number</replaceable>,
+		  const int*   <replaceable>list</replaceable>,
+      int          <replaceable>abort</replaceable>
+    )
+</programlisting>
+          </para>
+
+        </formalpara>
+
+        <formalpara>
+
+          <title>Parameters</title>
+
+          <para>
+            ndb_mgm_stop2() takes 4 parameters:
+
+            <itemizedlist>
+
+              <listitem>
+                <para>
+                  An <literal>NdbMgmHandle</literal>.
+                </para>
+              </listitem>
+
+              <listitem>
+                <para>
+                  The <replaceable>number</replaceable> of nodes to be
+                  stopped. Use <literal>0</literal> to stop all of the
+                  data nodes in the cluster.
+                </para>
+              </listitem>
+
+              <listitem>
+                <para>
+                  A <replaceable>list</replaceable> of the node IDs of
+                  the nodes to be stopped.
+                </para>
+              </listitem>
+
+              <listitem>
+                <para>
+                  The value of <replaceable>abort</replaceable>
+                  determines how the nodes will be shut down.
+                  <literal>1</literal> indicates the the nodes will shut
+                  down immediately; <literal>0</literal> indicates that
+                  the nodes will stop gracefully.
+                </para>
+              </listitem>
+
+            </itemizedlist>
+          </para>
+
+        </formalpara>
+
+        <formalpara>
+
+          <title>Return Value</title>
+
+          <para>
+            The number of nodes actually stopped; in the event of
+            failure, <literal>-1</literal> is returned.
+          </para>
+
+        </formalpara>
+
+        <formalpara>
+
+          <title>Example</title>
+
+          <para>
+<programlisting>
+[<emphasis>To be supplied...</emphasis>]
+</programlisting>
+          </para>
+
+        </formalpara>
+
+      </section>
+
+      <section id="mgm-api-ndb-mgm-stop3">
+
+        <title><literal>ndb_mgm_stop3()</literal></title>
+
+        <formalpara>
+
+          <title>Description</title>
+
+          <para>
+            Like <literal>ndb_mgm_stop()</literal> and
+            <literal>ndb_mgm_stop2()</literal>, this function stops one
+            or more data nodes. Like <literal>ndb_mgm_stop2()</literal>,
+            it offers the ability to specify whether the nodes should
+            shut down gracefully. In addition, it provides for a way to
+            check to see whether disconnection is required prior to
+            stopping a node.
+          </para>
+
+        </formalpara>
+
+        <formalpara>
+
+          <title>Signature</title>
+
+          <para>
+<programlisting>
+int ndb_mgm_stop2
+    (
+      NdbMgmHandle <replaceable>handle</replaceable>, 
+      int          <replaceable>number</replaceable>,
+		  const int*   <replaceable>list</replaceable>,
+      int          <replaceable>abort</replaceable>,
+      int*         <replaceable>disconnect</replaceable>
+    )
+</programlisting>
+          </para>
+
+        </formalpara>
+
+        <formalpara>
+
+          <title>Parameters</title>
+
+          <para>
+            ndb_mgm_stop3() takes 5 parameters:
+
+            <itemizedlist>
+
+              <listitem>
+                <para>
+                  An <literal>NdbMgmHandle</literal>.
+                </para>
+              </listitem>
+
+              <listitem>
+                <para>
+                  The <replaceable>number</replaceable> of nodes to be
+                  stopped. Use <literal>0</literal> to stop all of the
+                  data nodes in the cluster.
+                </para>
+              </listitem>
+
+              <listitem>
+                <para>
+                  A <replaceable>list</replaceable> of the node IDs of
+                  the nodes to be stopped.
+                </para>
+              </listitem>
+
+              <listitem>
+                <para>
+                  The value of <replaceable>abort</replaceable>
+                  determines how the nodes will be shut down.
+                  <literal>1</literal> indicates the the nodes will shut
+                  down immediately; <literal>0</literal> indicates that
+                  the nodes will stop gracefully.
+                </para>
+              </listitem>
+
+              <listitem>
+                <para>
+                  If <replaceable>disconnect</replaceable> returns
+                  <literal>1</literal> (<literal>true</literal>),
this
+                  means the you must disconnect before you can apply the
+                  command to stop. For example, donnecting is required
+                  when stopping the management server to which the
+                  handle is connected.
+                </para>
+              </listitem>
+
+            </itemizedlist>
+          </para>
+
+        </formalpara>
+
+        <formalpara>
+
+          <title>Return Value</title>
+
+          <para>
+            The number of nodes actually stopped; in the event of
+            failure, <literal>-1</literal> is returned.
+          </para>
+
+        </formalpara>
+
+        <formalpara>
+
+          <title>Example</title>
+
+          <para>
+<programlisting>
+[<emphasis>To be supplied...</emphasis>]
+</programlisting>
+          </para>
+
+        </formalpara>
+
+      </section>
+
+      <section id="mgm-api-ndb-mgm-restart">
+
+        <title><literal>ndb_mgm_restart()</literal></title>
+
+        <formalpara>
+
+          <title>Description</title>
+
+          <para>
+            This function can be used to restart one or more Cluster
+            data nodes.
+          </para>
+
+        </formalpara>
+
+        <formalpara>
+
+          <title>Signature</title>
+
+          <para>
+<programlisting>
+int ndb_mgm_restart
+    (
+      NdbMgmHandle <replaceable>handle</replaceable>, 
+      int          <replaceable>number</replaceable>,
+      const int*   <replaceable>list</replaceable>
+    )
+</programlisting>
+          </para>
+
+        </formalpara>
+
+        <formalpara>
+
+          <title>Parameters</title>
+
+          <para>
+            ndb_mgm_restart() takes 3 parameters:
+
+            <itemizedlist>
+
+              <listitem>
+                <para>
+                  An <literal>NdbMgmHandle</literal>.
+                </para>
+              </listitem>
+
+              <listitem>
+                <para>
+                  The <replaceable>number</replaceable> of nodes to be
+                  stopped. Use <literal>0</literal> to stop all of the
+                  data nodes in the cluster.
+                </para>
+              </listitem>
+
+              <listitem>
+                <para>
+                  A <replaceable>list</replaceable> of the node IDs of
+                  the nodes to be stopped.
+                </para>
+              </listitem>
+
+            </itemizedlist>
+
+            Calling this function is equivalent to calling
+           
<literal>ndb_mgm_restart2(<replaceable>handle</replaceable>,
+            <replaceable>number</replaceable>,
+            <replaceable>list</replaceable>, 0, 0, 0)</literal>; see
+            <xref linkend="mgm-api-ndb-mgm-restart2"/>, for more
+            information.
+          </para>
+
+        </formalpara>
+
+        <formalpara>
+
+          <title>Return Value</title>
+
+          <para>
+            The number of nodes actually restarted;
+            <literal>-1</literal> on failure.
+          </para>
+
+        </formalpara>
+
+        <formalpara>
+
+          <title>Example</title>
+
+          <para>
+<programlisting>
+[<emphasis>To be supplied...</emphasis>]
+</programlisting>
+          </para>
+
+        </formalpara>
+
+      </section>
+
+      <section id="mgm-api-ndb-mgm-restart2">
+
+        <title><literal>ndb_mgm_restart2()</literal></title>
+
+        <formalpara>
+
+          <title>Description</title>
+
+          <para>
+            Like <literal>ndb_mgm_restart()</literal>, this function can
+            be used to restart one or more Cluster data nodes. However,
+            <literal>ndb_mgm_restart2()</literal> provides additional
+            restart options, including initial restart, waiting start,
+            and immediate (forced) restart.
+          </para>
+
+        </formalpara>
+
+        <formalpara>
+
+          <title>Signature</title>
+
+          <para>
+<programlisting>
+int ndb_mgm_restart2
+    (
+      NdbMgmHandle <replaceable>handle</replaceable>, 
+      int          <replaceable>number</replaceable>,
+      const int*   <replaceable>list</replaceable>,
+      int          <replaceable>initial</replaceable>
+      int          <replaceable>nostart</replaceable>,
+      int          <replaceable>abort</replaceable>
+    )
+</programlisting>
+          </para>
+
+        </formalpara>
+
+        <formalpara>
+
+          <title>Parameters</title>
+
+          <para>
+            ndb_mgm_restart2() takes 6 parameters:
+
+            <itemizedlist>
+
+              <listitem>
+                <para>
+                  An <literal>NdbMgmHandle</literal>.
+                </para>
+              </listitem>
+
+              <listitem>
+                <para>
+                  The <replaceable>number</replaceable> of nodes to be
+                  stopped. Use <literal>0</literal> to stop all of the
+                  data nodes in the cluster.
+                </para>
+              </listitem>
+
+              <listitem>
+                <para>
+                  A <replaceable>list</replaceable> of the node IDs of
+                  the nodes to be stopped.
+                </para>
+              </listitem>
+
+              <listitem>
+                <para>
+                  If <replaceable>initial</replaceable> is true
+                  (<literal>1</literal>), then each node undergoes an
+                  initial restart &mdash; that is, its filesystem is
+                  removed.
+                </para>
+              </listitem>
+
+              <listitem>
+                <para>
+                  If <literal>nostart</literal> is true, then the nodes
+                  are not actually started, but instead are left ready
+                  for a start command.
+                </para>
+              </listitem>
+
+              <listitem>
+                <para>
+                  If <replaceable>abort</replaceable> is true, then the
+                  nodes are restarted immediately, bypassing any
+                  graceful restart.
+                </para>
+              </listitem>
+
+            </itemizedlist>
+          </para>
+
+        </formalpara>
+
+        <formalpara>
+
+          <title>Return Value</title>
+
+          <para>
+            The number of nodes actually restarted;
+            <literal>-1</literal> on failure.
+          </para>
+
+        </formalpara>
+
+        <formalpara>
+
+          <title>Example</title>
+
+          <para>
+<programlisting>
+[<emphasis>To be supplied...</emphasis>]
+</programlisting>
+          </para>
+
+        </formalpara>
+
+      </section>
+
+      <section id="mgm-api-ndb-mgm-restart3">
+
+        <title><literal>ndb_mgm_restart3()</literal></title>
+
+        <formalpara>
+
+          <title>Description</title>
+
+          <para>
+            Like <literal>ndb_mgm_restart2()</literal>, this function
+            can be used to cause an initial restart, waiting restart,
+            and immediate (forced) restart on one or more Cluster data
+            nodes. However, <literal>ndb_mgm_restart3()</literal>
+            provides additional the additional options of checking
+            whether disconnection is required prior to the restart.
+          </para>
+
+        </formalpara>
+
+        <formalpara>
+
+          <title>Signature</title>
+
+          <para>
+<programlisting>
+int ndb_mgm_restart3
+    (
+      NdbMgmHandle <replaceable>handle</replaceable>, 
+      int          <replaceable>number</replaceable>,
+      const int*   <replaceable>list</replaceable>,
+      int          <replaceable>initial</replaceable>
+      int          <replaceable>nostart</replaceable>,
+      int          <replaceable>abort</replaceable>,
+      int*         <replaceable>disconnect</replaceable>
+    )
+</programlisting>
+          </para>
+
+        </formalpara>
+
+        <formalpara>
+
+          <title>Parameters</title>
+
+          <para>
+            ndb_mgm_restart() takes 7 parameters:
+
+            <itemizedlist>
+
+              <listitem>
+                <para>
+                  An <literal>NdbMgmHandle</literal>.
+                </para>
+              </listitem>
+
+              <listitem>
+                <para>
+                  The <replaceable>number</replaceable> of nodes to be
+                  stopped. Use <literal>0</literal> to stop all of the
+                  data nodes in the cluster.
+                </para>
+              </listitem>
+
+              <listitem>
+                <para>
+                  A <replaceable>list</replaceable> of the node IDs of
+                  the nodes to be stopped.
+                </para>
+              </listitem>
+
+              <listitem>
+                <para>
+                  If <replaceable>initial</replaceable> is true
+                  (<literal>1</literal>), then each node undergoes an
+                  initial restart &mdash; that is, its filesystem is
+                  removed.
+                </para>
+              </listitem>
+
+              <listitem>
+                <para>
+                  If <literal>nostart</literal> is true, then the nodes
+                  are not actually started, but instead are left ready
+                  for a start command.
+                </para>
+              </listitem>
+
+              <listitem>
+                <para>
+                  If <replaceable>abort</replaceable> is true, then the
+                  nodes are forced to restart immediately without
+                  performing a graceful restart.
+                </para>
+              </listitem>
+
+              <listitem>
+                <para>
+                  If <replaceable>disconnect</replaceable> returns
+                  <literal>1</literal> (<literal>true</literal>),
this
+                  means the you must disconnect before you can apply the
+                  command to restart. For example, disconnecting is
+                  required when stopping the management server to which
+                  the handle is connected.
+                </para>
+              </listitem>
+
+            </itemizedlist>
+          </para>
+
+        </formalpara>
+
+        <formalpara>
+
+          <title>Return Value</title>
+
+          <para>
+            The number of nodes actually restarted;
+            <literal>-1</literal> on failure.
+          </para>
+
+        </formalpara>
+
+        <formalpara>
+
+          <title>Example</title>
+
+          <para>
+<programlisting>
+[<emphasis>To be supplied...</emphasis>]
+</programlisting>
+          </para>
+
+        </formalpara>
+
+      </section>
+
     </section>
 
     <section id="mgm-api-functions-cluster-log">
@@ -2470,7 +3383,7 @@
 
     </abstract>
 
-    <section id="mgm-api-ndb-logevent-struct">
+    <section id="struct-ndb-logevent">
 
       <title>The <literal>ndb_logevent</literal>
Structure</title>
 
@@ -2486,7 +3399,7 @@
 
     </section>
 
-    <section id="mgm-api-ndb-mgm-node-state-struct">
+    <section id="struct-ndb-mgm-node-state">
 
       <title>The <literal>ndb_mgm_node_state</literal>
Structure</title>
 
@@ -2502,13 +3415,13 @@
 
     </section>
 
-    <section id="mgm-api-ndb-mgm-cluster-state-struct">
+    <section id="struct-ndb-mgm-cluster-state">
 
       <title>The <literal>ndb_mgm_cluster_state</literal>
Structure</title>
 
       <formalpara>
 
-        <title>Descrption</title>
+        <title>Description</title>
 
         <para>
           Provides information on the status of the Cluster as a whole.
@@ -2518,7 +3431,7 @@
 
     </section>
 
-    <section id="mgm-api-ndb-mgm-reply-struct">
+    <section id="struct-ndb-mgm-reply">
 
       <title>The <literal>ndb_mgm_reply</literal>
Structure</title>
 

Thread
svn commit - mysqldoc@docsrva: r2531 - trunk/ndbapijon27 Jun