-
Notifications
You must be signed in to change notification settings - Fork 449
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(interactive): Implement
HttpIrMetaReader
to Get Meta Data From …
…Remote Http Service (#3908) 1. Implement `HttpIrMetaReader` to get meta data from remote http service. 2. Implement `DynamicIrMetaFetcher` to fetch schema or statistics periodically, the interval can be set by configurations. --------- Co-authored-by: xiaolei.zl <[email protected]> Co-authored-by: BingqingLyu <[email protected]> Co-authored-by: Longbin Lai <[email protected]>
- Loading branch information
1 parent
d6017c7
commit 02c3bfa
Showing
34 changed files
with
713 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
#!/bin/bash | ||
# Copyright 2020 Alibaba Group Holding Limited. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
set -e | ||
SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd) | ||
FLEX_HOME=${SCRIPT_DIR}/../../ | ||
SERVER_BIN=${FLEX_HOME}/build/bin/interactive_server | ||
GIE_HOME=${FLEX_HOME}/../interactive_engine/ | ||
ADMIN_PORT=7777 | ||
QUERY_PORT=10000 | ||
|
||
# | ||
if [ ! $# -eq 2 ]; then | ||
echo "only receives: $# args, need 2" | ||
echo "Usage: $0 <INTERACTIVE_WORKSPACE> <ENGINE_CONFIG>" | ||
exit 1 | ||
fi | ||
|
||
INTERACTIVE_WORKSPACE=$1 | ||
ENGINE_CONFIG_PATH=$2 | ||
if [ ! -d ${INTERACTIVE_WORKSPACE} ]; then | ||
echo "INTERACTIVE_WORKSPACE: ${INTERACTIVE_WORKSPACE} not exists" | ||
exit 1 | ||
fi | ||
if [ ! -f ${ENGINE_CONFIG_PATH} ]; then | ||
echo "ENGINE_CONFIG: ${ENGINE_CONFIG_PATH} not exists" | ||
exit 1 | ||
fi | ||
|
||
|
||
RED='\033[0;31m' | ||
GREEN='\033[0;32m' | ||
NC='\033[0m' # No Color | ||
err() { | ||
echo -e "${RED}[$(date +'%Y-%m-%d %H:%M:%S')] -ERROR- $* ${NC}" >&2 | ||
} | ||
|
||
info() { | ||
echo -e "${GREEN}[$(date +'%Y-%m-%d %H:%M:%S')] -INFO- $* ${NC}" | ||
} | ||
|
||
|
||
kill_service(){ | ||
info "Kill Service first" | ||
ps -ef | grep "interactive_server" | awk '{print $2}' | xargs kill -9 || true | ||
ps -ef | grep "GraphServer" | awk '{print $2}' | xargs kill -9 || true | ||
sleep 3 | ||
# check if service is killed | ||
info "Kill Service success" | ||
} | ||
|
||
# kill service when exit | ||
trap kill_service EXIT | ||
|
||
# start engine service and load ldbc graph | ||
start_engine_service(){ | ||
#check SERVER_BIN exists | ||
if [ ! -f ${SERVER_BIN} ]; then | ||
err "SERVER_BIN not found" | ||
exit 1 | ||
fi | ||
|
||
cmd="${SERVER_BIN} -c ${ENGINE_CONFIG_PATH} --enable-admin-service true " | ||
cmd="${cmd} -w ${INTERACTIVE_WORKSPACE} --start-compiler true" | ||
|
||
echo "Start engine service with command: ${cmd}" | ||
${cmd} & | ||
sleep 10 | ||
#check interactive_server is running, if not, exit | ||
ps -ef | grep "interactive_server" | grep -v grep | ||
|
||
info "Start engine service success" | ||
} | ||
|
||
run_cypher_test() { | ||
# run a simple cypher query: MATCH (n) RETURN count(n) | ||
python3 ./test_count_vertices.py --endpoint neo4j://localhost:7687 | ||
} | ||
|
||
kill_service | ||
start_engine_service | ||
# comiper service will fail to start, if the graph meta can not be retrieved | ||
run_cypher_test | ||
kill_service | ||
|
||
|
||
|
||
|
Oops, something went wrong.