Skip to content

Commit

Permalink
refactor(coordinator): and gsctl to support FLEX interactive (#3297)
Browse files Browse the repository at this point in the history
* Remove the `show_log` and `log_level` attributes from the`SessionConfig` class, 
and add them to the global `Config` class along with a new `solution` attribute, 
which indicates the solution type under the FLEX architecture
* Add a new file `./python/graphscope/gsctl/commands/common_command.py`,
which defines a group of commands that are common to all solutions under
the FLEX architecture, such as `connect` and `close`
* Add a new file `./python/graphscope/gsctl/commands/dev_command.py`,
which defines a group of commands for GraphScope development, such as
`install-deps`, `make`, `make-image`, and `test`
* Modify the `./python/graphscope/gsctl/gsctl.py` file, which is the
main script of the `gsctl` utility, to use the `get_command_collection`
and `get_current_context`
* Update the documentation of the `gsctl` command-line utility in the
`./docs/utilities/gs.md` file, to reflect the new features and modes of
operation under the FLEX architecture
  • Loading branch information
lidongze0629 authored Oct 19, 2023
1 parent 59b71df commit dc08671
Show file tree
Hide file tree
Showing 22 changed files with 1,544 additions and 952 deletions.
2 changes: 1 addition & 1 deletion coordinator/gscoordinator/cluster_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def __init__(
learning_start_port,
):
self._instance_id = config.session.instance_id
self._glog_level = parse_as_glog_level(config.session.log_level)
self._glog_level = parse_as_glog_level(config.log_level)
self._num_workers = config.session.num_workers

launcher_config: KubernetesLauncherConfig = config.kubernetes_launcher
Expand Down
649 changes: 32 additions & 617 deletions coordinator/gscoordinator/coordinator.py

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion coordinator/gscoordinator/kubernetes_launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,11 @@ def __init__(self, config: Config):
self._config.kubernetes_launcher.engine.post_setup()
launcher_config = config.kubernetes_launcher

# glog level
self._glog_level = parse_as_glog_level(config.log_level)

# Session Config
self._num_workers = config.session.num_workers
self._glog_level = parse_as_glog_level(config.session.log_level)
self._instance_id = config.session.instance_id
self._timeout_seconds = config.session.timeout_seconds
self._retry_time_seconds = config.session.retry_time_seconds
Expand Down
4 changes: 3 additions & 1 deletion coordinator/gscoordinator/local_launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,11 @@ def __init__(self, config):
vineyard_config = config.vineyard
launcher_config = config.hosts_launcher

# glog level
self._glog_level = parse_as_glog_level(config.log_level)

# Session Config
self._num_workers = session_config.num_workers
self._glog_level = parse_as_glog_level(session_config.log_level)
self._instance_id = session_config.instance_id
self._timeout_seconds = session_config.timeout_seconds
self._retry_time_seconds = session_config.retry_time_seconds
Expand Down
19 changes: 19 additions & 0 deletions coordinator/gscoordinator/servicer/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright 2023 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.
#

from gscoordinator.servicer.graphscope_one.service import *
17 changes: 17 additions & 0 deletions coordinator/gscoordinator/servicer/graphscope_one/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright 2023 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.
#
Loading

0 comments on commit dc08671

Please sign in to comment.