This is an automated email from the ASF dual-hosted git repository.
roryqi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-uniffle.git
The following commit(s) were added to refs/heads/master by this push:
new f57360f2c [#960][followup] fix(dashboard): Fix get_pid_file_name
function for the dashboard. (#1346)
f57360f2c is described below
commit f57360f2c605c482e8f3f21b7a7d3f09bbe92c56
Author: RickyMa <[email protected]>
AuthorDate: Tue Dec 5 16:56:17 2023 +0800
[#960][followup] fix(dashboard): Fix get_pid_file_name function for the
dashboard. (#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
[#1056](https://github.com/apache/incubator-uniffle/pull/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.
---
bin/start-dashboard.sh | 2 +-
bin/stop-dashboard.sh | 2 +-
bin/utils.sh | 4 +++-
3 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/bin/start-dashboard.sh b/bin/start-dashboard.sh
index 9a5251500..d64318fe8 100644
--- a/bin/start-dashboard.sh
+++ b/bin/start-dashboard.sh
@@ -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}
diff --git a/bin/stop-dashboard.sh b/bin/stop-dashboard.sh
index 289aebae2..8c6b82ef1 100644
--- a/bin/stop-dashboard.sh
+++ b/bin/stop-dashboard.sh
@@ -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}"
diff --git a/bin/utils.sh b/bin/utils.sh
index 55c9abea9..c425a4bc7 100644
--- a/bin/utils.sh
+++ b/bin/utils.sh
@@ -59,7 +59,7 @@ 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"
@@ -67,6 +67,8 @@ function get_pid_file_name {
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