Github user srowen commented on a diff in the pull request:
https://github.com/apache/spark/pull/12978#discussion_r62428386
--- Diff: sbin/spark-daemon.sh ---
@@ -164,7 +164,7 @@ run_command() {
echo "$newpid" > "$pid"
sleep 2
# Check if the process has died; in that case we'll tail the log so the
user can see
- if [[ ! $(ps -p "$newpid" -o comm=) =~ "java" ]]; then
+ if [[ -z $(ps --no-headers -p "$newpid") ]]; then
--- End diff --
I don't see the option `--no-headers` on OS X, so I suspect it could be a
BSD vs Gnu thing. It will fail though.
I don't see how this change addresses the problem though. It still occurs 2
seconds after the start, but it's not checking whether the java process
started. Do you mean some kind of loop here, like checking 3 times?
What's the scenario where the bash script takes a long time to run?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]