Skip to content

Commit

Permalink
feat: pre-load some data in container(#840)
Browse files Browse the repository at this point in the history
  • Loading branch information
aroundabout committed Jul 26, 2023
1 parent 82b09fa commit 947d530
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 197 deletions.
12 changes: 6 additions & 6 deletions hugegraph-dist/src/assembly/static/bin/start-hugegraph.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ BIN=$(abs_path)
TOP="$(cd "$BIN"/../ && pwd)"
CONF="$TOP/conf"
LOGS="$TOP/logs"
SCRIPTS="$TOP/scripts"
PID_FILE="$BIN/pid"

. "$BIN"/util.sh
Expand All @@ -79,20 +80,19 @@ if [ ! -d "$LOGS" ]; then
mkdir -p "$LOGS"
fi

GERMLIN_SERVER_YAML="gremlin-server.yaml"

if [ $PRELOAD ]; then
GERMLIN_SERVER_YAML="gremlin-server-preload.yaml"
if [[ $PRELOAD == "true" ]]; then
sed -i -e 's/empty-sample.groovy/example.groovy/g' "${CONF}"/gremlin-server.yaml
sed -i -e '/registerRocksDB/d; /serverStarted/d' "${SCRIPTS}"/example.groovy
fi


if [[ $DAEMON == "true" ]]; then
echo "Starting HugeGraphServer in daemon mode..."
"${BIN}"/hugegraph-server.sh "${CONF}"/"${GERMLIN_SERVER_YAML}" "${CONF}"/rest-server.properties \
"${BIN}"/hugegraph-server.sh "${CONF}"/gremlin-server.yaml "${CONF}"/rest-server.properties \
"${OPEN_SECURITY_CHECK}" "${USER_OPTION}" "${GC_OPTION}" >>"${LOGS}"/hugegraph-server.log 2>&1 &
else
echo "Starting HugeGraphServer in foreground mode..."
"${BIN}"/hugegraph-server.sh "${CONF}"/"${GERMLIN_SERVER_YAML}" "${CONF}"/rest-server.properties \
"${BIN}"/hugegraph-server.sh "${CONF}"/gremlin-server.yaml "${CONF}"/rest-server.properties \
"${OPEN_SECURITY_CHECK}" "${USER_OPTION}" "${GC_OPTION}" >>"${LOGS}"/hugegraph-server.log 2>&1
fi

Expand Down
126 changes: 0 additions & 126 deletions hugegraph-dist/src/assembly/static/conf/gremlin-server-preload.yaml

This file was deleted.

65 changes: 0 additions & 65 deletions hugegraph-dist/src/assembly/static/scripts/example-preload.groovy

This file was deleted.

0 comments on commit 947d530

Please sign in to comment.