This is an automated email from the ASF dual-hosted git repository.
hellostephen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 47cfd22f109 [test](cloud_p0) prepare java udf for some cases (#35991)
47cfd22f109 is described below
commit 47cfd22f1093c1cb4764a4e1733f3fca62dc057e
Author: Dongyang Li <[email protected]>
AuthorDate: Mon Jul 29 11:00:49 2024 +0800
[test](cloud_p0) prepare java udf for some cases (#35991)
## Proposed changes
Issue Number: close #xxx
<!--Describe your changes.-->
---------
Co-authored-by: stephen <[email protected]>
---
regression-test/pipeline/cloud_p0/deploy.sh | 1 +
regression-test/pipeline/common/doris-utils.sh | 43 ++++++++++++++++++++++++++
2 files changed, 44 insertions(+)
diff --git a/regression-test/pipeline/cloud_p0/deploy.sh
b/regression-test/pipeline/cloud_p0/deploy.sh
index c65de2b39c6..6b48a8cc7ee 100644
--- a/regression-test/pipeline/cloud_p0/deploy.sh
+++ b/regression-test/pipeline/cloud_p0/deploy.sh
@@ -76,6 +76,7 @@ exit_flag=0
if ! create_warehouse; then exit 1; fi
if ! warehouse_add_fe; then exit 1; fi
if ! warehouse_add_be; then exit 1; fi
+ if ! prepare_java_udf; then exit 1; fi
if ! start_doris_fe; then exit 1; fi
if ! start_doris_be; then exit 1; fi
if ! check_doris_ready; then exit 1; fi
diff --git a/regression-test/pipeline/common/doris-utils.sh
b/regression-test/pipeline/common/doris-utils.sh
index a38ec1b2f3d..1c7bc9c2095 100644
--- a/regression-test/pipeline/common/doris-utils.sh
+++ b/regression-test/pipeline/common/doris-utils.sh
@@ -101,6 +101,23 @@ function install_java() {
fi
}
+install_maven() {
+ if ! mvn -v >/dev/null; then
+ sudo apt update && sudo apt install maven -y >/dev/null
+ PATH="/usr/share/maven/bin:${PATH}"
+ export PATH
+ fi
+ if ! mvn -v >/dev/null; then
+ wget -c -t3 -q
"${MAVEN_DOWNLOAD_URL:-https://dlcdn.apache.org/maven/maven-3/3.9.8/binaries/apache-maven-3.9.8-bin.tar.gz}"
+ tar -xf apache-maven-3.9.8-bin.tar.gz -C /usr/share/
+ PATH="/usr/share/apache-maven-3.9.8/bin:${PATH}"
+ export PATH
+ fi
+ if ! mvn -v >/dev/null; then
+ echo "ERROR: install maven failed" && return 1
+ fi
+}
+
function start_doris_fe() {
if [[ ! -d "${DORIS_HOME:-}" ]]; then return 1; fi
if install_java && [[ -z "${JAVA_HOME}" ]]; then
@@ -734,6 +751,32 @@ function check_if_need_gcore() {
fi
}
+prepare_java_udf() {
+ if [[ ! -d "${DORIS_HOME:-}" ]]; then return 1; fi
+ # custom_lib相关的case需要在fe启动前把编译好的jar放到 $DORIS_HOME/fe/custom_lib/
+ install_java
+ install_maven
+ OLD_JAVA_HOME=${JAVA_HOME}
+ JAVA_HOME="$(find /usr/lib/jvm -maxdepth 1 -type d -name 'java-8-*' | sed
-n '1p')"
+ export JAVA_HOME
+ if bash "${DORIS_HOME}"/../run-regression-test.sh --clean &&
+ bash "${DORIS_HOME}"/../run-regression-test.sh --compile; then
+ echo
+ else
+ echo "ERROR: failed to compile java udf"
+ fi
+ JAVA_HOME=${OLD_JAVA_HOME}
+ export JAVA_HOME
+
+ if ls "${DORIS_HOME}"/fe/custom_lib/*.jar &&
+ ls "${DORIS_HOME}"/be/custom_lib/*.jar; then
+ echo "INFO: java udf prepared."
+ else
+ echo "ERROR: failed to prepare java udf"
+ return 1
+ fi
+}
+
function print_running_pipeline_tasks() {
webserver_port=$(get_doris_conf_value "${DORIS_HOME}"/be/conf/be.conf
webserver_port)
mkdir -p "${DORIS_HOME}"/be/log/
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]