This is an automated email from the ASF dual-hosted git repository.
zuston 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 3b0cbb99c [#960] fix(dashboard): simplify dependency and correct the
startup script (#1347)
3b0cbb99c is described below
commit 3b0cbb99c139233d95c6cb80d46b0d81e8fb8e09
Author: yl09099 <[email protected]>
AuthorDate: Wed Dec 13 17:44:04 2023 +0800
[#960] fix(dashboard): simplify dependency and correct the startup script
(#1347)
### What changes were proposed in this pull request?
simplify dependency and correct the startup script.
### Why are the changes needed?
Fix: #960
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
Needn't.
---
bin/start-dashboard.sh | 11 +++--------
bin/utils.sh | 16 ++++++++++++----
dashboard/pom.xml | 2 +-
docs/dashboard_guide.md | 4 ++--
4 files changed, 18 insertions(+), 15 deletions(-)
diff --git a/bin/start-dashboard.sh b/bin/start-dashboard.sh
index d64318fe8..97db3324a 100644
--- a/bin/start-dashboard.sh
+++ b/bin/start-dashboard.sh
@@ -22,11 +22,11 @@ set -o nounset # exit the script if you try to use an
uninitialised variable
set -o errexit # exit the script if any statement returns a non-true return
value
source "$(dirname "$0")/utils.sh"
-load_rss_env
+load_rss_env 0
cd "$RSS_HOME"
-COORDINATOR_CONF_FILE="${RSS_CONF_DIR}/coordinator.conf"
+DASHBOARD_CONF_FILE="${RSS_CONF_DIR}/dashboard.conf"
JAR_DIR="${RSS_HOME}/jars"
LOG_CONF_FILE="${RSS_CONF_DIR}/log4j.properties"
LOG_PATH="${RSS_LOG_DIR}/dashboard.log"
@@ -34,8 +34,6 @@ OUT_PATH="${RSS_LOG_DIR}/dashboard.out"
MAIN_CLASS="org.apache.uniffle.dashboard.web.JettyServerFront"
-HADOOP_DEPENDENCY="$("$HADOOP_HOME/bin/hadoop" classpath --glob)"
-
echo "Check process existence"
is_jvm_process_running "$JPS" $MAIN_CLASS
@@ -48,9 +46,6 @@ done
mkdir -p "${RSS_LOG_DIR}"
mkdir -p "${RSS_PID_DIR}"
-CLASSPATH=$CLASSPATH:$HADOOP_CONF_DIR:$HADOOP_DEPENDENCY
-JAVA_LIB_PATH="-Djava.library.path=$HADOOP_HOME/lib/native"
-
echo "class path is $CLASSPATH"
JVM_ARGS=" -server \
@@ -80,7 +75,7 @@ else
exit 1
fi
-$RUNNER $ARGS $JVM_ARGS $JAVA11_EXTRA_ARGS -cp $CLASSPATH $MAIN_CLASS --conf
"$COORDINATOR_CONF_FILE" $@ &> $OUT_PATH &
+$RUNNER $ARGS $JVM_ARGS $JAVA11_EXTRA_ARGS -cp $CLASSPATH $MAIN_CLASS --conf
"$DASHBOARD_CONF_FILE" $@ &> $OUT_PATH &
get_pid_file_name dashboard
echo $! >${RSS_PID_DIR}/${pid_file}
diff --git a/bin/utils.sh b/bin/utils.sh
index c425a4bc7..809ee40c0 100644
--- a/bin/utils.sh
+++ b/bin/utils.sh
@@ -152,6 +152,11 @@ function is_port_in_use {
function load_rss_env {
set -o allexport
+ is_dashboard=0
+ if [ $# -eq 1 ]; then
+ is_dashboard=1
+ fi
+
# find rss-env.sh
set +o nounset
if [ -f "${RSS_CONF_DIR}/rss-env.sh" ]; then
@@ -172,9 +177,13 @@ function load_rss_env {
echo "No env JAVA_HOME."
exit 1
fi
- if [ -z "$HADOOP_HOME" ]; then
- echo "No env HADOOP_HOME."
- exit 1
+ if [[ -z "$HADOOP_HOME" ]]; then
+ if [[ $is_dashboard -eq 1 ]]; then
+ echo "Dashboard need not HADOOP_HOME."
+ else
+ echo "No env HADOOP_HOME."
+ exit 1
+ fi
fi
# export default value
@@ -214,4 +223,3 @@ function load_rss_env {
set +o allexport
}
-
diff --git a/dashboard/pom.xml b/dashboard/pom.xml
index a1237c1ba..a8870a392 100644
--- a/dashboard/pom.xml
+++ b/dashboard/pom.xml
@@ -30,7 +30,7 @@
<dependencies>
<dependency>
<groupId>org.apache.uniffle</groupId>
- <artifactId>coordinator</artifactId>
+ <artifactId>rss-common</artifactId>
</dependency>
</dependencies>
diff --git a/docs/dashboard_guide.md b/docs/dashboard_guide.md
index 34d48e7df..5b413a408 100644
--- a/docs/dashboard_guide.md
+++ b/docs/dashboard_guide.md
@@ -23,8 +23,8 @@ limitations under the License.
This document explains how to install and start Uniffle's dashboard.
### Configure related parameters
-In $RSS_HOME/conf directory, configure the dashboard data request port and
front-end access port in the coordinator
-``` shell
+In $RSS_HOME/conf directory, Create a dashboard.conf configuration file and
configure the data request port and front-end access port in dashboard.conf.
+``` properties
## Front-end access port
rss.dashboard.http.port 19997
## The dashboard request data port, which is the Coordinator's HTTP port