[ 
https://issues.apache.org/jira/browse/DRILL-4286?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15323477#comment-15323477
 ] 

Paul Rogers commented on DRILL-4286:
------------------------------------

I’ve been looking into how graceful shutdown might be done since. Without it, 
removing nodes in YARN will kill in-flight queries which some users might find 
awkward.

There are several approaches to solution. Here is one that builds on what we 
already have.

Drillbits advertise themselves in ZooKeeper today. A solution is to add a 
second znode that contains additional information such as server state. When 
distributing a query, the Foreman would consider node state as well as node 
existence, to locate available Drillbits.

Drill does contain graceful shutdown logic (in response to a SIGTERM), which 
drains running queries. This is why you see the dots from the command line when 
stopping Drill. However, the shutdown does not prevent new queries from 
arriving and so works best in a singe-node cluster with user cooperation.

The shut-down feature could be extended to work with the node state: other 
nodes stop sending new work, the target node waits for in-flight queries to 
stop.

For YARN, the final piece is a new API to trigger the graceful shutdown as YARN 
can’t send a SIGTERM.

> Have an ability to put server in quiescent mode of operation
> ------------------------------------------------------------
>
>                 Key: DRILL-4286
>                 URL: https://issues.apache.org/jira/browse/DRILL-4286
>             Project: Apache Drill
>          Issue Type: New Feature
>          Components: Execution - Flow
>            Reporter: Victoria Markman
>
> I think drill will benefit from mode of operation that is called "quiescent" 
> in some databases. 
> From IBM Informix server documentation:
> {code}
> Change gracefully from online to quiescent mode
> Take the database server gracefully from online mode to quiescent mode to 
> restrict access to the database server without interrupting current 
> processing. After you perform this task, the database server sets a flag that 
> prevents new sessions from gaining access to the database server. The current 
> sessions are allowed to finish processing. After you initiate the mode 
> change, it cannot be canceled. During the mode change from online to 
> quiescent, the database server is considered to be in Shutdown mode.
> {code}
> This is different from shutdown, when processes are terminated. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to