You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@drill.apache.org by br...@apache.org on 2018/03/19 21:56:05 UTC

drill git commit: DRILL-4286 doc for graceful shutdown feature

Repository: drill
Updated Branches:
  refs/heads/gh-pages 09bc08bc1 -> 78f7f3b8a


DRILL-4286 doc for graceful shutdown feature


Project: http://git-wip-us.apache.org/repos/asf/drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/drill/commit/78f7f3b8
Tree: http://git-wip-us.apache.org/repos/asf/drill/tree/78f7f3b8
Diff: http://git-wip-us.apache.org/repos/asf/drill/diff/78f7f3b8

Branch: refs/heads/gh-pages
Commit: 78f7f3b8a2b6b0322b218551b55631181041f469
Parents: 09bc08b
Author: Bridget Bevens <bb...@maprtech.com>
Authored: Mon Mar 19 14:55:13 2018 -0700
Committer: Bridget Bevens <bb...@maprtech.com>
Committed: Mon Mar 19 14:55:13 2018 -0700

----------------------------------------------------------------------
 .../050-starting-drill-in-distributed-mode.md   | 53 +++++++++++++++++---
 1 file changed, 47 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/drill/blob/78f7f3b8/_docs/install/050-starting-drill-in-distributed-mode.md
----------------------------------------------------------------------
diff --git a/_docs/install/050-starting-drill-in-distributed-mode.md b/_docs/install/050-starting-drill-in-distributed-mode.md
index edbba49..e94b5f1 100644
--- a/_docs/install/050-starting-drill-in-distributed-mode.md
+++ b/_docs/install/050-starting-drill-in-distributed-mode.md
@@ -1,6 +1,6 @@
 ---
 title: "Starting Drill in Distributed Mode"
-date: 2018-02-08 00:38:56 UTC
+date: 2018-03-19 21:55:14 UTC
 parent: "Installing Drill in Distributed Mode"
 ---
 
@@ -15,11 +15,11 @@ In addition to starting a Drillbit, you use the **drillbit.sh** command to perfo
 * Stop or restart a Drillbit
 * Configure a Drillbit to restart by default
 
-You can use a configuration file to start Drillbits. Using such a file is handy for controlling Drillbits on multiple nodes.
+You can use a configuration file to start Drillbits. A configuration file is useful for controlling Drillbits on multiple nodes.
 
 ### drillbit.sh Command Syntax
 
-`drillbit.sh [--config <conf-dir>] (start|stop|status|restart|autorestart)`
+`drillbit.sh [--config <conf-dir>] (start|stop|graceful_stop|status|restart|autorestart)`
 
 For example, to restart a Drillbit on a tarball installation, navigate to the Drill installation directory, and issue the following command from the installation directory:
 
@@ -82,7 +82,48 @@ To exit the Drill shell, issue the following command:
 
 `!quit`
 
-## Stopping Drill
-Navigate to the Drill installation directory, and issue the following command to stop a Drillbit:
+## Stopping Drill 
+
+You can abruptly stop the Drill process on a node, or you can have the Drill process on the node shutdown gracefully. When you stop the Drill process on a node, active queries cannot complete if they require additional time to complete beyond the default five second wait period. In Drill 1.12 and later, you can use the Graceful Shutdown option, which transitions a Drillbit into a quiescent state in which the Drill process can complete in-progress queries before shutting down.  
+
+###Stopping Drill   
+To stop the Drill process on the node, issue the `drillbit.sh stop` command, as shown:  
+
+       bin/drillbit.sh stop   
+
+###Graceful Shutdown  
+
+Graceful shutdown is enabled by default. You can gracefully shutdown a Drillbit from the command line or the Drill Web Console. When you initiate a graceful shutdown from the Drill Web Console, the console posts an alert stating that a graceful shutdown was triggered. You can see the progress of the shutdown as the Drillbit completes queries and transitions through the quiescent state.  
+
+**How A Drillbit Shuts Down Gracefully**  
+
+When a Drillbit shuts down gracefully, it transitions through a quiescent state to complete in-progress queries. 
+
+The following list describes the various states that a Drillbit transitions through, including the quiescent state and phases within that state:  
+
+- **Start**: The Drillbit is initializing. For example, when you issue the `drillbit.sh start` or `drillbit.sh restart` command.  
+- **Online**: The Drillbit has started and registered with the cluster coordinator, such as ZooKeeper. ZooKeeper then shares the state of the Drillbit with other Drillbits in the cluster. Drillbits in the online state can all accept and process queries.  
+- **Quiescent**: When a Drillbit receives a graceful shutdown request, the Drillbit transitions into the quiescent state and shares its status change with the ZooKeeper. The ZooKeeper notifies the other Drillbits in the cluster of the Drillbit’s status change. Once the other Drillbits get the status update, they do not assign work to the Drillbit. However, if the Foreman assigns work to the Drillbit as the status update occurs, the Drillbit waits to complete work before shutting down. The quiescent state has three phases: grace, draining, and offline.  
+       - **Grace**: A period in which a Drillbit can accept new queries from the Foreman. You can configure (at the system level) the amount of time a Drillbit can remain in this phase using the `drill.exe.grace_period_ms` option. Set this value in milliseconds. The default value is 0. There is no maximum limit. Ideally, you should give as little time as possible or no longer than twice the default heartbeat time of the ZooKeeper. For example, if the heartbeat is 5 seconds, set the value to the equivalent of 10 seconds in milliseconds (10000).   
+       - **Draining**:  When the grace period ends, the Drillbit enters the draining phase of the quiescent state. In this phase, the Drillbit cannot accept new queries, but waits for the running queries to complete. You can view the draining queries in the Drill Web Console. The Index page in the Web Console shows the queries and fragments currently running on the node.  
+       - **Offline**: The phase the Drillbit enters after completing all queries.   
+- **Shutdown**: The final state in which a Drillbit removes itself from the ZooKeeper registry.  
+
+**Shutting Down a Drillbit Gracefully**  
+You can gracefully shutdown a node from the command line or the Drill Web Console. 
+ 
+From the command line, run the following command on the node you want to shut down:  
+
+       drillbit.sh graceful_stop
+
+From the Drill Web Console, enter the following URL in your browser’s address bar:
+
+       http://<IP address or host name>:8047 or https://<IP address or host name>:8047
+
+In the Drill Web Console, open the Index page, and click Shutdown next to the Drillbit you want to shut down.
   
-`bin/drillbit.sh stop`
+
+
+
+
+