Skip to content

Commit

Permalink
Updated the doc for graceful shutdown operations
Browse files Browse the repository at this point in the history
Explain the behaviour of presto gateway deactivation of backends
  • Loading branch information
endoplasmicR authored Mar 13, 2021
1 parent b827c57 commit a3053a4
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,18 @@ To delete a global property, specify the corresponding name (type String).
curl -X POST http://localhost:8080/presto/globalproperty/delete/{INSERT_NAME_HERE}
```

## Graceful shutdown
Presto gateway supports graceful shutdown of Presto clusters. Even when a cluster is deactivated, any submitted query states can still be retrieved based on the Query ID.

To graceful shutdown a Presto cluster without query losses, the steps are:
1. Set the backend to deactivate state, this prevents any new incoming queries from getting assigned to the backend.
2. Poll the Presto backend coorinator URL until the queued query count and the running query count both hit 0.
3. Terminate the Presto Coordinator & Worker Java process.


To gracefully shutdown a single worker process, see [this](https://trino.io/docs/current/admin/graceful-shutdown.html) for the operations.


## Contributing

Want to help build Presto Gateway? Check out our [contributing documentation](CONTRIBUTING.md)
Expand Down

0 comments on commit a3053a4

Please sign in to comment.