-
Notifications
You must be signed in to change notification settings - Fork 448
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Make gsctl to be more like a database design (#3648)
### gsctl ```bash graphscope@host:/work$ gsctl ______ __ _____ / ____/________ _____ / /_ / ___/_________ ____ ___ / / __/ ___/ __ `/ __ \/ __ \\__ \/ ___/ __ \/ __ \/ _ \ / /_/ / / / /_/ / /_/ / / / /__/ / /__/ /_/ / /_/ / __/ \____/_/ \__,_/ .___/_/ /_/____/\___/\____/ .___/\___/ /_/ /_/ Currently, gsctl hasn't connect to any service. you can use gsctl as an utility script. Or you can connect to a launched GraphScopoe service by `gsctl connect --coordinator-endpoint <address>`. See more detailed information at https://graphscope.io/docs/utilities/gs. Usage: gsctl [OPTIONS] COMMAND [ARGS]... Options: --help Show this message and exit. Commands: close Disconnect from coordinator connect Connect to a launched coordinator flexbuild Build docker image for Interactive, Insight product. install-deps Install dependencies for building GraphScope. make Build executive binaries of COMPONENT. make-image Make docker images from source code for deployment. test Trigger tests on built artifacts. ``` ### connect to a coordinator(global scope) ``` graphscope@host:/work$ gsctl connect --coordinator-endpoint xxxxx && gsctl Using GLOBAL. Run `gsctl use GRAPH <graph_identifier>` to switch to a specific graph context. Usage: gsctl [OPTIONS] COMMAND [ARGS]... Options: --help Show this message and exit. Commands: close Disconnect from coordinator connect Connect to a launched coordinator create Create a new graph in database delete Delete a graph by identifier ls Display graph resources in database service Start, stop, and restart the database service use Switch to GRAPH context, see identifier with `ls` command ``` ### change to a specific graph scope (graph scope) ```bash graphscope@host:/work$ gsctl use GRAPH dongze_test_graph Using GRAPH dongze_test_graph graphscope@host:/work$ gsctl ls Using GRAPH dongze_test_graph. Run `gsctl use GLOBAL` to switch back to GLOBAL context. schema ├── vertex types │ ├── person │ │ ├── Property(name: id, type: DT_SIGNED_INT64, is_primary_key: True) │ │ ├── Property(name: name, type: DT_STRING, is_primary_key: False) │ │ └── Property(name: age, type: DT_SIGNED_INT32, is_primary_key: False) │ └── software │ ├── Property(name: id, type: DT_SIGNED_INT64, is_primary_key: True) │ ├── Property(name: name, type: DT_STRING, is_primary_key: False) │ └── Property(name: lang, type: DT_STRING, is_primary_key: False) └── edge types ├── (person) -[knows]-> (person) │ └── Property(name: weight, type: DT_DOUBLE, is_primary_key: False) └── (person) -[created]-> (software) └── Property(name: weight, type: DT_DOUBLE, is_primary_key: False) data sources ├── vertex mappings └── edge mappings stored procedure job ├── Job(identifier: job_dongze_test_graph_1709023420190_51285, type: bulk_loading, status: SUCCESS, start time: 2024-02-27 16:43:40, end time: 2024-02-27 16:44:10) ``` ### create a procedure ```bash graphscope@host:/work$ gsctl create procedure -f /path/to/your/procedure/file [SUCCESS] Create stored procedure xxx successfully. ``` ### switch back to the global context (global scope) ```bash graphscope@host:/work$ gsctl use GLOBAL Using GLOBAL ```
- Loading branch information
1 parent
5938321
commit 93ab564
Showing
15 changed files
with
927 additions
and
836 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
File renamed without changes.
Oops, something went wrong.