Github user WeichenXu123 commented on a diff in the pull request:

    https://github.com/apache/spark/pull/12978#discussion_r63700865
  
    --- Diff: sbin/spark-daemon.sh ---
    @@ -162,6 +162,15 @@ run_command() {
       esac
     
       echo "$newpid" > "$pid"
    +
    +  for i in {1..10}
    +  do
    +    if [[ $(ps -p "$newpid" -o comm=) =~ "java" ]]; then
    +       break
    +    fi
    +    sleep 0.5
    --- End diff --
    
    Oh..the sleep 2 statement can't move.
    
    the loop may take at most 5 seconds to check whether the daemon turn into 
java daemon. When it become java daemon, it jump out the loop.
    
    **then must sleep 2 seconds,**
    then check whether the java daemon die. Because java daemon may exist for 
some time and then throw an Exception and die. So here need to wait for some 
time.


---
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]

Reply via email to