File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55readonly PULSARCTL_HOME=${PULSARCTL_HOME:- " /pulsarctl" }
66readonly TEST_ARGS=${TEST_ARGS:- " " }
77
8+ function ensureJavaInPath() {
9+ if command -v java > /dev/null 2>&1 ; then
10+ return
11+ fi
12+
13+ for dir in \
14+ /opt/jvm/bin \
15+ /opt/java/openjdk/bin \
16+ /usr/local/openjdk-17/bin \
17+ /usr/local/openjdk-11/bin \
18+ /usr/lib/jvm/default-jvm/bin \
19+ /usr/lib/jvm/java-17-openjdk/bin \
20+ /usr/lib/jvm/java-11-openjdk/bin
21+ do
22+ if [[ -x " ${dir} /java" ]]; then
23+ export PATH=" ${dir} :${PATH} "
24+ export JAVA_HOME=" ${dir%/ bin} "
25+ return
26+ fi
27+ done
28+
29+ echo " java executable not found in PATH or common JDK locations"
30+ exit 1
31+ }
32+
833function checkFunctionWorker() {
934 failed=0
1035 until curl --silent localhost:8080/admin/v2/persistent/public/functions/coordinate/stats; do
@@ -20,6 +45,7 @@ function checkFunctionWorker() {
2045}
2146
2247pushd ${PULSARCTL_HOME}
48+ ensureJavaInPath
2349# startup pulsar service
2450scripts/pulsar-service-startup.sh
2551
You can’t perform that action at this time.
0 commit comments