diff --git a/docs-2.0/2.quick-start/1.quick-start-workflow.md b/docs-2.0/2.quick-start/1.quick-start-workflow.md index 2068f105868..5b37f04981b 100644 --- a/docs-2.0/2.quick-start/1.quick-start-workflow.md +++ b/docs-2.0/2.quick-start/1.quick-start-workflow.md @@ -18,6 +18,10 @@ Users can quickly deploy and use Nebula Graph in the following steps. Then users can use clients to connect to Nebula Graph. Nebula Graph supports a variety of clients. This topic will describe how to use Nebula Console to connect to Nebula Graph. -4. [CRUD in Nebula Graph](4.nebula-graph-crud.md) +4. [Register the Storage Service](3.1add-storage-hosts.md) + + When connecting to Nebula Graph for the first time, users must register the Storage Service before querying data. + +5. [CRUD in Nebula Graph](4.nebula-graph-crud.md) Users can use nGQL (Nebula Graph Query Language) to run CRUD after connecting to Nebula Graph. diff --git a/docs-2.0/2.quick-start/3.1add-storage-hosts.md b/docs-2.0/2.quick-start/3.1add-storage-hosts.md new file mode 100644 index 00000000000..166ec614301 --- /dev/null +++ b/docs-2.0/2.quick-start/3.1add-storage-hosts.md @@ -0,0 +1,49 @@ +# Register the Storage Service + +When connecting to Nebula Graph for the first time, you have to add the Storage hosts, and confirm that all the hosts are online. + +!!! compatibility + + - Starting from Nebula Graph 3.0.0, you have to run `ADD HOSTS` before reading or writing data into the Storage Service. + - In earlier versions, `ADD HOSTS` is neither needed nor supported. + +## Prerequisites + +You have [connnected to Nebula Graph](3.connect-to-nebula-graph.md). + +## Steps + +1. Add the Storage hosts. + + Run the following command to add hosts: + + ```ngql + ADD HOSTS : [,: ...]; + ``` + + + + Example: + + ```ngql + nebula> ADD HOSTS 192.168.10.100:9779, 192.168.10.101:9779, 192.168.10.102:9779; + ``` + +2. Check the status of the hosts to make sure that they are all online. + + ```ngql + nebula> SHOW HOSTS; + +------------------+------+-----------+----------+--------------+---------------------- +------------------------+---------+ + | Host | Port | HTTP port | Status | Leader count | Leader distribution | Partition distribution | Version | + +------------------+------+-----------+----------+--------------+---------------------- +------------------------+---------+ + | "192.168.10.100" | 9779 | 19669 | "ONLINE" | 0 | "No valid partition" | "No valid partition" | "3.1.0" | + | "192.168.10.101" | 9779 | 19669 | "ONLINE" | 0 | "No valid partition" | "No valid partition" | "3.1.0" | + | "192.168.10.102" | 9779 | 19669 | "ONLINE" | 0 | "No valid partition" | "No valid partition" | "3.1.0" | + +------------------+------+-----------+----------+--------------+---------------------- +------------------------+---------+ + ``` + + The `Status` column of the result above shows that all Storage hosts are online. diff --git a/docs-2.0/2.quick-start/4.nebula-graph-crud.md b/docs-2.0/2.quick-start/4.nebula-graph-crud.md index 7fefbb712e6..9e93de6446f 100644 --- a/docs-2.0/2.quick-start/4.nebula-graph-crud.md +++ b/docs-2.0/2.quick-start/4.nebula-graph-crud.md @@ -25,51 +25,6 @@ In this topic, we will use the following dataset to demonstrate basic CRUD opera ![The demo dataset](https://docs-cdn.nebula-graph.com.cn/figures/dataset-for-crud.png) -## Manage the Storage services in a Nebula Graph cluster - -First, add the Storage services to a Nebula Graph cluster. - - - -!!! compatibility - - From Nebula Graph version 3.0.0, the Storage services added in the configuration files **CANNOT** be read or written directly. The configuration files only register the Storage services into the Meta services. You must run the `ADD HOSTS` command to read and write data on Storage servers. - -```ngql -ADD HOSTS : [,: ...]; -``` - - - -Example: - -```ngql -nebula> ADD HOSTS 192.168.10.100:9779, 192.168.10.101:9779, 192.168.10.102:9779; -``` - -## Check the machine status in the Nebula Graph cluster - -We recommend that you check the machine status to make sure that all the Storage services are connected to the Meta services. Run `SHOW HOSTS` as follows. - -```ngql -nebula> SHOW HOSTS; -+------------------+------+-----------+----------+--------------+----------------------+------------------------+---------+ -| Host | Port | HTTP port | Status | Leader count | Leader distribution | Partition distribution | Version | -+------------------+------+-----------+----------+--------------+----------------------+------------------------+---------+ -| "192.168.10.100" | 9779 | 19669 | "ONLINE" | 0 | "No valid partition" | "No valid partition" | "3.1.0" | -| "192.168.10.101" | 9779 | 19669 | "ONLINE" | 0 | "No valid partition" | "No valid partition" | "3.1.0" | -| "192.168.10.102" | 9779 | 19669 | "ONLINE" | 0 | "No valid partition" | "No valid partition" | "3.1.0" | -+------------------+------+-----------+----------+--------------+----------------------+------------------------+---------+ -``` - -From the **Status** column of the table in the returned results, you can see that all the Storage services are online. - ### Async implementation of `CREATE` and `ALTER` !!! caution diff --git a/docs-2.0/backup-and-restore/nebula-br/1.what-is-br.md b/docs-2.0/backup-and-restore/nebula-br/1.what-is-br.md index dba5acf18e7..a54f9cb586c 100644 --- a/docs-2.0/backup-and-restore/nebula-br/1.what-is-br.md +++ b/docs-2.0/backup-and-restore/nebula-br/1.what-is-br.md @@ -98,7 +98,7 @@ To back up data, the BR sends a backup request to the leader metad process to tr This figure shows how the backup is implemented. -![The figure shows the backup procedure](../../figs/ng-ug-001.png "Implementation of backup") +![The figure shows the backup procedure](https://docs-cdn.nebula-graph.com.cn/figures/ng-ug-001.png "Implementation of backup") When backup files are generated, the file names are generated automatically. A folder name is in the format of `BACKUP_YY_MM_DD_HH_mm_SS`, of which, @@ -137,7 +137,7 @@ The restoration process is implemented as follows: This figure shows how the restoration process is implemented. -![The figure shows the restoration process](../../figs/ng-ug-002.png "Implementation of restoration") +![The figure shows the restoration process](https://docs-cdn.nebula-graph.com.cn/figures/ng-ug-002.png "Implementation of restoration") --> diff --git a/docs-2.0/nebula-explorer/explorer-console.md b/docs-2.0/nebula-explorer/explorer-console.md index 0d7e1bcb92f..5c24f78548d 100644 --- a/docs-2.0/nebula-explorer/explorer-console.md +++ b/docs-2.0/nebula-explorer/explorer-console.md @@ -4,4 +4,4 @@ Explorer console allows you to enter nGQL statements and visualize the query res At the upper right corner of the page, click ![console](figs/nav-console.png) to enter the console page. -The Explorer's console feature is the same as Studio's. For more information, see [Console](../nebula-studio/quick-start/st-ug-console.md). \ No newline at end of file +The Explorer's console feature is the same as Studio's. For more information, see [Console](../nebula-studio/quick-start/st-ug-console.md). diff --git a/docs-2.0/reuse/source_connect-to-nebula-graph.md b/docs-2.0/reuse/source_connect-to-nebula-graph.md index 484e6ef9b1f..09751cecf6a 100644 --- a/docs-2.0/reuse/source_connect-to-nebula-graph.md +++ b/docs-2.0/reuse/source_connect-to-nebula-graph.md @@ -1,5 +1,9 @@ This topic provides basic instruction on how to use the native CLI client Nebula Console to connect to Nebula Graph. +!!! caution + + When connecting to Nebula Graph for the first time, you must [register the Storage Service](../2.quick-start/3.1add-storage-hosts.md) before querying data. + Nebula Graph supports multiple types of clients, including a CLI client, a GUI client, and clients developed in popular programming languages. For more information, see the [client list](../14.client/1.nebula-client.md). ## Prerequisites diff --git a/mkdocs.yml b/mkdocs.yml index dc516af8de7..bc011f9af39 100755 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -147,7 +147,8 @@ nav: - Step 1 Install Nebula Graph: 2.quick-start/2.install-nebula-graph.md - Step 2 Manage Nebula Graph Service: 2.quick-start/5.start-stop-service.md - Step 3 Connect to Nebula Graph: 2.quick-start/3.connect-to-nebula-graph.md - - Step 4 Use nGQL (CRUD): 2.quick-start/4.nebula-graph-crud.md + - Step 4 Register the Storage Service: 2.quick-start/3.1add-storage-hosts.md + - Step 5 Use nGQL (CRUD): 2.quick-start/4.nebula-graph-crud.md - nGQL cheatsheet: 2.quick-start/6.cheatsheet-for-ngql.md - nGQL guide: