Skip to content

Commit

Permalink
Support customized plugin when init store
Browse files Browse the repository at this point in the history
Fix: #359

Change-Id: Iae7cb4694b2db22a187f74dc9b5408785e15806c
  • Loading branch information
Linary committed Feb 18, 2019
1 parent 0239d49 commit 8ee8e50
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
11 changes: 8 additions & 3 deletions hugegraph-dist/src/assembly/static/bin/init-store.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,13 @@ abs_path() {

BIN=`abs_path`
TOP="$(cd $BIN/../ && pwd)"
CONF=$TOP/conf
LIB=$TOP/lib
CONF="$TOP/conf"
LIB="$TOP/lib"
PLUGINS="$TOP/plugins"

. ${BIN}/util.sh

ensure_path_writable $PLUGINS

if [ -n "$JAVA_HOME" ]; then
JAVA="$JAVA_HOME"/bin/java
Expand All @@ -25,5 +30,5 @@ cd $TOP

echo "Initing HugeGraph Store..."

exec $JAVA -cp $LIB/hugegraph-dist-*.jar -Djava.ext.dirs=$LIB/ \
exec $JAVA -cp $LIB/hugegraph-dist-*.jar -Djava.ext.dirs=$LIB:$PLUGINS \
com.baidu.hugegraph.cmd.InitStore $CONF/gremlin-server.yaml | grep "com.baidu.hugegraph"
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ public static void main(String[] args)

String confFile = args[0];
RegisterUtil.registerBackends();
RegisterUtil.registerPlugins();

YamlConfiguration config = new YamlConfiguration();
config.load(confFile);
Expand Down

0 comments on commit 8ee8e50

Please sign in to comment.