Skip to content

Conversation

@hiyer
Copy link
Collaborator

@hiyer hiyer commented May 6, 2019

This helps avoid cluster-specific checks. e.g. Spark History Server should only be restarted on spark clusters. Instead of checking - in the bootstrap function - if we're running on a spark cluster, the service will be restarted only if it is monitored by monit.

In future this will be extended to handle systemd/upstart.

@hiyer hiyer requested a review from akaranjkar-qu May 6, 2019 09:53
@hiyer hiyer self-assigned this May 6, 2019
hadoop/util.sh Outdated
# Restart services in reverse order of how
# they were stopped
for (( i=0; i <last; i++ )); do
start_daemon "${running_svcs[~i]}"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's more readable to loop from $last-1 down to 0, instead of using bitwise negated i as the index. But we can leave it like this if it's idiomatic Bash

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's pretty standard, but I'm ok with changing it if you feel it's confusing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants