Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/workflows/pd-store-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,12 @@ jobs:
run: |
mvn clean package -U -Dmaven.javadoc.skip=true -Dmaven.test.skip=true -ntp --fail-at-end

- name: Run start-hugegraph-pd.sh foreground mode tests
run: |
VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
PD_DIR=hugegraph-pd/apache-hugegraph-pd-$VERSION/
$TRAVIS_DIR/test-start-hugegraph-pd.sh $PD_DIR

- name: Prepare env and service
run: |
$TRAVIS_DIR/start-pd.sh
Expand Down Expand Up @@ -163,6 +169,12 @@ jobs:
run: |
mvn clean package -U -Dmaven.javadoc.skip=true -Dmaven.test.skip=true -ntp --fail-at-end

- name: Run start-hugegraph-store.sh foreground mode tests
run: |
VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
STORE_DIR=hugegraph-store/apache-hugegraph-store-$VERSION/
$TRAVIS_DIR/test-start-hugegraph-store.sh $STORE_DIR

- name: Prepare env and service
run: |
$TRAVIS_DIR/start-pd.sh
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,18 @@ fi
if [ -z "$OPEN_TELEMETRY" ];then
OPEN_TELEMETRY="false"
fi
if [ -z "$DAEMON" ]; then
DAEMON="true"
fi

while getopts "g:j:y:" arg; do
while getopts "d:g:j:y:" arg; do
case ${arg} in
g) GC_OPTION="$OPTARG" ;;
j) USER_OPTION="$OPTARG" ;;
# Telemetry is used to collect metrics, traces and logs
d) DAEMON="$OPTARG" ;;
y) OPEN_TELEMETRY="$OPTARG" ;;
?) echo "USAGE: $0 [-g g1] [-j xxx] [-y true|false]" && exit 1 ;;
?) echo "USAGE: $0 [-d true|false] [-g g1] [-j xxx] [-y true|false]" && exit 1 ;;
esac
done

Expand Down Expand Up @@ -163,20 +167,33 @@ if [ $(ps -ef|grep -v grep| grep java|grep -cE ${CONF}) -ne 0 ]; then
echo "HugeGraphPDServer is already running..."
exit 0
fi
echo "Starting HugeGraphPDServer..."

JVM_OPTIONS="-Dlog4j.configurationFile=${CONF}/log4j2.xml -Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager"

# Turn on security check
if [[ "${STDOUT_MODE:-false}" == "true" ]]; then
exec ${JAVA} -Dname="HugeGraphPD" ${JVM_OPTIONS} ${JAVA_OPTIONS} -jar \
-Dspring.config.location=${CONF}/application.yml ${LIB}/hg-pd-service-*.jar &
if [[ $DAEMON == "true" ]]; then
echo "Starting HugeGraphPDServer in daemon mode..."
if [[ "${STDOUT_MODE:-false}" == "true" ]]; then
exec ${JAVA} -Dname="HugeGraphPD" ${JVM_OPTIONS} ${JAVA_OPTIONS} -jar \
-Dspring.config.location=${CONF}/application.yml ${LIB}/hg-pd-service-*.jar &
else
exec ${JAVA} -Dname="HugeGraphPD" ${JVM_OPTIONS} ${JAVA_OPTIONS} -jar \
-Dspring.config.location=${CONF}/application.yml ${LIB}/hg-pd-service-*.jar >> ${OUTPUT} 2>&1 &
fi
PID="$!"
# Write pid to file
echo "$PID" > "$PID_FILE"
echo "[+pid] $PID"
else
exec ${JAVA} -Dname="HugeGraphPD" ${JVM_OPTIONS} ${JAVA_OPTIONS} -jar \
-Dspring.config.location=${CONF}/application.yml ${LIB}/hg-pd-service-*.jar >> ${OUTPUT} 2>&1 &
echo "Starting HugeGraphPDServer in foreground mode..."
# Write $$ before exec — exec replaces this shell with Java, so $$ becomes Java's PID
echo "$$" > "$PID_FILE"
echo "[+pid] $$"
if [[ "${STDOUT_MODE:-false}" == "true" ]]; then
exec ${JAVA} -Dname="HugeGraphPD" ${JVM_OPTIONS} ${JAVA_OPTIONS} -jar \
-Dspring.config.location=${CONF}/application.yml ${LIB}/hg-pd-service-*.jar
else
exec ${JAVA} -Dname="HugeGraphPD" ${JVM_OPTIONS} ${JAVA_OPTIONS} -jar \
-Dspring.config.location=${CONF}/application.yml ${LIB}/hg-pd-service-*.jar >> ${OUTPUT} 2>&1
fi
fi

PID="$!"
# Write pid to file
echo "$PID" > "$PID_FILE"
echo "[+pid] $PID"
Loading
Loading