Skip to content

Commit

Permalink
fix bug SPARK-15203
Browse files Browse the repository at this point in the history
  • Loading branch information
WeichenXu123 committed May 18, 2016
1 parent c1fd9ca commit 55d911f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions sbin/spark-daemon.sh
Expand Up @@ -162,6 +162,16 @@ run_command() {
esac

echo "$newpid" > "$pid"

#here add this loop to check the daemon process turn into java process. It takes at most 5 seconds.
for i in {1..10}
do
if [[ $(ps -p "$newpid" -o comm=) =~ "java" ]]; then
break
fi
sleep 0.5
done

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
Expand Down

0 comments on commit 55d911f

Please sign in to comment.