Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
siyuan0322 committed Mar 31, 2023
1 parent 2960a8f commit 9a52fff
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
3 changes: 1 addition & 2 deletions charts/gie-standalone/templates/store/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ spec:
for ip in `echo $pod_ips`
do
pod_name=`kubectl get pods -o custom-columns=:metadata.name --no-headers=true --field-selector status.podIP=$ip`
# echo $ip $pod_name >> $hosts
echo $ip $pod_name >> $hosts
pod_names="${pod_names},${pod_name}"
done
pod_names=${pod_names:1}
Expand All @@ -95,7 +95,6 @@ spec:
. /home/graphscope/.profile
. /opt/rh/rh-python38/enable
export config_new_path=/tmp/config_new
echo "graphctl.py ${VINEYARD_IPC_SOCKET} {{ .Release.Namespace }}:${pod_names} $config_path/$HTAP_LOADER_CONFIG $config_new_path"
graphctl.py ${VINEYARD_IPC_SOCKET} {{ .Release.Namespace }}:${pod_names} $config_path/$HTAP_LOADER_CONFIG $config_new_path
# copy new config to other store pods.
Expand Down
2 changes: 1 addition & 1 deletion k8s/.dockerignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Makefile
k8s/
k8s/dockerfiles
13 changes: 8 additions & 5 deletions k8s/utils/graphctl.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@

logging.basicConfig(level=logging.DEBUG)
logger = logging.getLogger("vineyard")
logger.setLevel(logging.DEBUG)
logger.setLevel(logging.INFO)


def spawn_vineyard_io_stream(
source: str,
Expand Down Expand Up @@ -64,21 +65,23 @@ def maybe_ingest_to_vineyard(source, socket, hosts):
):
new_protocol, new_source = spawn_vineyard_io_stream(source, socket, hosts)
logger.info(
"original uri = %s, new_protocol = %s, new_source = %s", source, new_protocol, new_source
"original uri = %s, new_protocol = %s, new_source = %s",
source,
new_protocol,
new_source,
)
return f"{new_protocol}://{new_source}"
else:
return source


def replace_data_path(json_str, socket, hosts):
json_obj = json.loads(json_str)
for vertex in json_obj["vertices"]:
data_path = vertex["data_path"] + "#label=" + vertex["label"]
if "options" in vertex:
data_path += "#" + vertex["options"]
vertex["data_path"] = maybe_ingest_to_vineyard(
data_path, socket, hosts
)
vertex["data_path"] = maybe_ingest_to_vineyard(data_path, socket, hosts)
for edge in json_obj["edges"]:
data_path = edge["data_path"] + "#label=" + edge["label"]
data_path += "#src_label=" + edge["src_label"]
Expand Down

0 comments on commit 9a52fff

Please sign in to comment.