Skip to content

Commit 94cdb05

Browse files
chenghao-intelAndrew Or
authored andcommitted
[SPARK-5825] [Spark Submit] Remove the double checking instance name when stopping the service
`spark-daemon.sh` will confirm the process id by fuzzy matching the class name while stopping the service, however, it will fail if the java process arguments is very long (greater than 4096 characters). This PR looses the check for the service process. Author: Cheng Hao <[email protected]> Closes apache#4611 from chenghao-intel/stopping_service and squashes the following commits: a0051f6 [Cheng Hao] loosen the process checking while stopping a service
1 parent 90095bf commit 94cdb05

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sbin/spark-daemon.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ case $option in
166166

167167
if [ -f $pid ]; then
168168
TARGET_ID="$(cat "$pid")"
169-
if [[ $(ps -p "$TARGET_ID" -o args=) =~ $command ]]; then
169+
if [[ $(ps -p "$TARGET_ID" -o comm=) =~ "java" ]]; then
170170
echo "stopping $command"
171171
kill "$TARGET_ID"
172172
else

0 commit comments

Comments
 (0)