add s2graphql, h2 service to launch
Project: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/commit/f8c323b8 Tree: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/tree/f8c323b8 Diff: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/diff/f8c323b8 Branch: refs/heads/master Commit: f8c323b83a16e58dd9e4f24ecf108e0ab3897010 Parents: 0c9f74f Author: Chul Kang <[email protected]> Authored: Tue Apr 10 17:45:22 2018 +0900 Committer: Chul Kang <[email protected]> Committed: Wed Apr 11 02:57:40 2018 +0900 ---------------------------------------------------------------------- bin/s2graph-daemon.sh | 8 +++++++- bin/s2graph.sh | 5 +++-- bin/start-s2graph.sh | 7 ++++++- bin/stop-s2graph.sh | 5 ++++- 4 files changed, 20 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-s2graph/blob/f8c323b8/bin/s2graph-daemon.sh ---------------------------------------------------------------------- diff --git a/bin/s2graph-daemon.sh b/bin/s2graph-daemon.sh index 18c327b..d0ffe80 100755 --- a/bin/s2graph-daemon.sh +++ b/bin/s2graph-daemon.sh @@ -20,7 +20,7 @@ usage="This script is intended to be used by other scripts in this directory." usage=$"$usage\n Please refer to start-s2graph.sh and stop-s2graph.sh" usage=$"$usage\n Usage: s2graph-daemon.sh (start|stop|restart|run|status)" -usage="$usage (s2rest_play|s2rest_netty|...) <args...>" +usage="$usage (s2rest_play|s2rest_netty|s2graphql|...) <args...>" bin=$(cd "$(dirname "${BASH_SOURCE-$0}")">/dev/null; pwd) @@ -65,9 +65,15 @@ case $service in s2rest_play) main="play.core.server.NettyServer" ;; +s2graphql) + main="org.apache.s2graph.graphql.Server" + ;; hbase) main="org.apache.hadoop.hbase.master.HMaster" ;; +h2) + main="org.h2.tools.Server" + ;; *) panic "Unknown service: $service" esac http://git-wip-us.apache.org/repos/asf/incubator-s2graph/blob/f8c323b8/bin/s2graph.sh ---------------------------------------------------------------------- diff --git a/bin/s2graph.sh b/bin/s2graph.sh index 58ddc28..bef373a 100755 --- a/bin/s2graph.sh +++ b/bin/s2graph.sh @@ -17,6 +17,7 @@ # starts/stops/restarts an S2Graph server usage="Usage: s2graph.sh (start|stop|restart|run|status)" +usage="$usage (s2rest_play|s2rest_netty|s2graphql|...)" bin=$(cd "$(dirname "${BASH_SOURCE-$0}")">/dev/null; pwd) @@ -25,8 +26,8 @@ bin=$(cd "$(dirname "${BASH_SOURCE-$0}")">/dev/null; pwd) . $bin/s2graph-common.sh # show usage when executed without enough arguments -if [ $# -lt 1 ]; then +if [ $# -lt 2 ]; then panic $usage fi -$bin/s2graph-daemon.sh $1 s2rest_play +$bin/s2graph-daemon.sh $1 $2 http://git-wip-us.apache.org/repos/asf/incubator-s2graph/blob/f8c323b8/bin/start-s2graph.sh ---------------------------------------------------------------------- diff --git a/bin/start-s2graph.sh b/bin/start-s2graph.sh index 23ab1ab..1347a1a 100755 --- a/bin/start-s2graph.sh +++ b/bin/start-s2graph.sh @@ -24,4 +24,9 @@ bin=$(cd "$(dirname "${BASH_SOURCE-$0}")">/dev/null; pwd) . $bin/s2graph-common.sh $bin/hbase-standalone.sh start -$bin/s2graph.sh start +$bin/s2graph-daemon.sh start h2 + +service="s2rest_play" +[ $# -gt 0 ] && { service=$1; } + +$bin/s2graph.sh start ${service} http://git-wip-us.apache.org/repos/asf/incubator-s2graph/blob/f8c323b8/bin/stop-s2graph.sh ---------------------------------------------------------------------- diff --git a/bin/stop-s2graph.sh b/bin/stop-s2graph.sh index 124c192..09f7426 100755 --- a/bin/stop-s2graph.sh +++ b/bin/stop-s2graph.sh @@ -23,5 +23,8 @@ bin=$(cd "$(dirname "${BASH_SOURCE-$0}")">/dev/null; pwd) . $bin/s2graph-env.sh . $bin/s2graph-common.sh -$bin/s2graph.sh stop +service="s2rest_play" +[ $# -gt 0 ] && { service=$1; } +$bin/s2graph.sh stop ${service} +$bin/s2graph-daemon.sh stop h2 $bin/hbase-standalone.sh stop
