Skip to content

Commit

Permalink
Merge pull request #139 from lyft/endoplasmicR-patch-1
Browse files Browse the repository at this point in the history
Updated the doc for graceful shutdown operations
  • Loading branch information
endoplasmicR authored Mar 17, 2021
2 parents b827c57 + a3053a4 commit 4cfbdd7
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 4cfbdd7

Please sign in to comment.