Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Correct way to restart presto-server service on EMR

I have to restart presto-server on EMR to load my plugin. With reference to official AWS EMR docs:

  • On some places they say

sudo restart presto-server

  • On others they say,

sudo stop presto-server followed by sudo start presto-server


While Restarting a service page favours the 2nd technique above,

Note: Stop/start is required; do not use the restart command.

I have found that both work without a glitch.


Questions:

  • What's the difference between sudo restart & sudo stop + sudo start?
  • Why the warning against restart?
  • Which one to use for presto-server?

Platform / Frameworks:

  • emr-5.15.0
  • Presto 0.212
like image 688
y2k-shubham Avatar asked Sep 17 '25 17:09

y2k-shubham


1 Answers

EMR 6.1

sudo systemctl stop presto-server
sudo systemctl start presto-server
sudo systemctl status presto-server

EMR 5.15 (likely anything before 5.30)

restart does not reload the service configuration file (unfortunately, i don't remember the path to the file; this is the file which tells e.g. which user Presto runs as). Depending on the changes you introduce, this may or may not be an issue. Eg. if you are changing Presto config files or plugins, this is not an issue. If, however, you're changing the Presto service definition file, restart will not pick up your changes, whereas stop + start will.

Note: while the answer hopefully is/was applicable to EMR 5.15, it seems not applicable to EMR 6.1.

like image 106
Piotr Findeisen Avatar answered Sep 19 '25 07:09

Piotr Findeisen