Skip to content

Commit

Permalink
[apache#960][followup] fix(dashboard): Fix get_pid_file_name function…
Browse files Browse the repository at this point in the history
… for the dashboard. (apache#1346)

### What changes were proposed in this pull request?

Fix get_pid_file_name function for the dashboard.

### Why are the changes needed?

This is the follow up pr of  [apache#1056](apache#1056)

### Does this PR introduce _any_ user-facing change?

No.

### How was this patch tested?

By running the script: start-dashboard.sh and stop-dashboard.sh.
  • Loading branch information
rickyma authored and zuston committed Dec 7, 2023
1 parent f42734b commit 07a7337
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bin/start-dashboard.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,5 +82,5 @@ fi

$RUNNER $ARGS $JVM_ARGS $JAVA11_EXTRA_ARGS -cp $CLASSPATH $MAIN_CLASS --conf "$COORDINATOR_CONF_FILE" $@ &> $OUT_PATH &

get_pid_file_name uniffle-dashboard
get_pid_file_name dashboard
echo $! >${RSS_PID_DIR}/${pid_file}
2 changes: 1 addition & 1 deletion bin/stop-dashboard.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ set -o errexit # exit the script if any statement returns a non-true return va
source "$(dirname "$0")/utils.sh"
load_rss_env

common_shutdown "uniffle-dashboard" "${RSS_PID_DIR}"
common_shutdown "dashboard" "${RSS_PID_DIR}"
4 changes: 3 additions & 1 deletion bin/utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,16 @@ function common_shutdown {
}

#---
# args: Process name, coordinator or shuffle-server
# args: Process name, coordinator, shuffle-server or dashboard
#---
function get_pid_file_name {
process_name="$1"
if [[ $process_name == "coordinator" ]]; then
pid_file="coordinator.pid"
elif [[ $process_name == "shuffle-server" ]]; then
pid_file="shuffle-server.pid"
elif [[ $process_name == "dashboard" ]]; then
pid_file="dashboard.pid"
else
echo "Invalid process name: $process_name"
exit 1
Expand Down

0 comments on commit 07a7337

Please sign in to comment.