Presto Worker Graceful Shutdown

梦想与她 提交于 2020-04-18 04:44:48

问题


As part of effort to auto-scale our presto cluster, we like to graceful shutdown a presto worker before let EC2 terminate it. After following command

curl -v -XPUT --data '"SHUTTING_DOWN"' -H "Content-type: application/json" http://250.0.46.167:8081/v1/info/state

The worker log indicates "com.facebook.presto.server.GracefulShutdownHandler Shutdown requested" immediately and soon the node in coordinator change to "shutting_down" state. The worker process finally exit after 4 minutes (due to double grace period of 2 minutes instead of pending query).

So far so good, however as expected for any managed daemon. The worker process is immediately restarted, and soon the node is back to "active" in coordinator.

We wish the graceful shutdown in Presto roughly work like below: shutdown request will be sent to the coordinator (instead of worker). coordinator tells the worker to shutdown and later logically removes it from active node list. If the worker restarts and register back, coordinator will ignore it for the next hour.

I wonder how current Presto clusters owner/operators handle this issue?

来源:https://stackoverflow.com/questions/53786212/presto-worker-graceful-shutdown

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!