Skip to content
Snippets Groups Projects
Commit a3ceb875 authored by WeichenXu's avatar WeichenXu Committed by Sean Owen
Browse files

[SPARK-15203][DEPLOY] The spark daemon shell script error, daemon process...

[SPARK-15203][DEPLOY] The spark daemon shell script error, daemon process start successfully but script output fail message

## What changes were proposed in this pull request?

fix the bug:
The spark daemon shell script error, daemon process start successfully but script output fail message

## How was this patch tested?

existing test.

Author: WeichenXu <WeichenXu123@outlook.com>

Closes #13172 from WeichenXu123/fix-spark-15203.
parent 4e739331
No related branches found
No related tags found
No related merge requests found
...@@ -162,6 +162,16 @@ run_command() { ...@@ -162,6 +162,16 @@ run_command() {
esac esac
echo "$newpid" > "$pid" echo "$newpid" > "$pid"
#Poll for up to 5 seconds for the java process to start
for i in {1..10}
do
if [[ $(ps -p "$newpid" -o comm=) =~ "java" ]]; then
break
fi
sleep 0.5
done
sleep 2 sleep 2
# Check if the process has died; in that case we'll tail the log so the user can see # 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 [[ ! $(ps -p "$newpid" -o comm=) =~ "java" ]]; then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment