Skip to content

Commit

Permalink
update (#689)
Browse files Browse the repository at this point in the history
  • Loading branch information
izhuxiaoqing authored Sep 3, 2021
1 parent eed0a82 commit 681990f
Show file tree
Hide file tree
Showing 10 changed files with 45 additions and 38 deletions.
4 changes: 2 additions & 2 deletions docs-2.0/14.client/4.nebula-java-client.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ You have installed Java 8.0 or later versions.

!!! note

We recommended that each thread use one session. If multiple threads use the same session, the performance will be reduced.
We recommend that each thread uses one session. If multiple threads use the same session, the performance will be reduced.

When importing a Maven project with tools such as IDEA, set the following dependency in `pom.xml`.

!!! note

`2.0.0-SNAPSHOT` indicates the daily development version that may have unknow issues. We recommend that you replace `2.0.0-SNAPSHOT` with a released version number to use a table version.
`2.0.0-SNAPSHOT` indicates the daily development version that may have unknown issues. We recommend that you replace `2.0.0-SNAPSHOT` with a released version number to use a table version.

```bash
<dependency>
Expand Down
4 changes: 2 additions & 2 deletions docs-2.0/14.client/5.nebula-python-client.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ $ pip install nebula2-python==<version>

!!! note

To run unit tests in the development mode, install `requirements-dev.txt` instead.
To run unit tests in the development mode, install dependencies of `requirements-dev.txt`.

4. Run the following command to install Nebula Python.

Expand All @@ -80,7 +80,7 @@ ok = connection_pool.init([('192.168.xx.1', 9669)], config)
# Get the session from the connection pool.
session = connection_pool.get_session('root', 'nebula')
# Selection a graph space.
# Select a graph space.
session.execute('USE basketballplayer')
# Run the SHOW TAGS statement.
Expand Down
8 changes: 4 additions & 4 deletions docs-2.0/nebula-studio/about-studio/st-ug-limitations.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Limitations

This article introduces the limitations of Studio.
This topic introduces the limitations of Studio.

## Nebula Graph versions

Expand All @@ -17,7 +17,7 @@ This article introduces the limitations of Studio.

## Architecture

For now, Docker-based and RPM-based Studio v2.x supports x86_64 architecture only.
For now, Docker-based and RPM-based Studio v3.x supports x86_64 architecture only.

## Upload data
<!--
Expand All @@ -32,11 +32,11 @@ Only CSV files without headers can be uploaded, but no limitations are applied t

## Data backup

For now, you can export the queried results in the CSV format on the **Console** page. No other backup methods are available.
For now, you can export the queried results in the CSV format on the **Console** page and export data in the CSV format on the **Explore** page. No other backup methods are available.

## nGQL statements

On the **Console** page of Docker-based and RPM-based Studio v2.x, all the nGQL syntaxes except these are supported:
On the **Console** page of Docker-based and RPM-based Studio v3.x, all the nGQL syntaxes except these are supported:

- `USE <space_name>`: You cannot run such a statement on the **Console** page to choose a graph space. As an alternative, you can click a graph space name in the drop-down list of **Current Graph Space**.
- You cannot use line breaks (\\). As an alternative, you can use the Enter key to split a line.
Expand Down
4 changes: 2 additions & 2 deletions docs-2.0/nebula-studio/about-studio/st-ug-shortcuts.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Shortcuts

This document lists the shortcuts supported in Studio.
This topic lists the shortcuts supported in Studio.

| Description | Operation |
| :-- | :--|
| Run nGQL statements in **Console** | Shift + Enter |
| Select multiple vertex in **Schema** | Shift + Left-click |
| Select multiple vertices in **Schema** | Shift + Left-click |
| Zoom out graph in **Schema** | Shift + ‘-’ |
| Zoom in graph in **Schema** | Shift + ‘+’ |
| Show graph in **Schema** | Shift + ‘l’ |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@

Nebula Graph Studio (Studio in short) is a browser-based visualization tool to manage Nebula Graph. It provides you with a graphical user interface to manipulate graph schemas, import data, explore graph data, and run nGQL statements to retrieve data. With Studio, you can quickly become a graph exploration expert from scratch. Users can view the latest source code in the Nebula Graph GitHub repository, see [nebula-studio](https://github.com/vesoft-inc/nebula-studio) for details.

## Release distributions
## Released versions

For now, Studio has three release versions:

- Docker-based. You can deploy Studio with Docker and connect it to Nebula Graph. For more information, see [Docker-based Studio](../deploy-connect/st-ug-deploy.md).

- RPM-based. You can deploy Studio with RPM and connect it to Nebula Graph. For more information, see [RPM-based Studio](../deploy-connect/st-ug-deploy.md).

- tar-based.You can deploy Studio with tar and connect it to Nebula Graph. For more information, see [tar-based Studio](../deploy-connect/st-ug-deploy.md).
- tar-based. You can deploy Studio with tar and connect it to Nebula Graph. For more information, see [tar-based Studio](../deploy-connect/st-ug-deploy.md).

The functions of the three release versions are the same and may be restricted when using Studio. For more information, see [Limitations](../about-studio/st-ug-limitations.md).
The functions of the three released versions are the same and may be restricted when using Studio. For more information, see [Limitations](../about-studio/st-ug-limitations.md).

## Features

Expand Down
31 changes: 17 additions & 14 deletions docs-2.0/nebula-studio/deploy-connect/st-ug-deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ Before you deploy Studio, you must do a check of these:

### Procedure

To deploy and start Docker-based Studio, run the following commands. Here we use Nebula Graph version 2.x for demonstration:
To deploy and start Docker-based Studio, run the following commands. Here we use Nebula Graph v{{nebula.release}} for demonstration:

1. Download the configuration files for the deployment.

| Installation package | Nebula Graph version |
| ----- | ----- |
| [nebula-graph-studio-v3.tar.gz](https://oss-cdn.nebula-graph.io/nebula-graph-studio/nebula-graph-studio-v3.tar.gz) | 2.5.0 |
| [nebula-graph-studio-v3.tar.gz](https://oss-cdn.nebula-graph.io/nebula-graph-studio/nebula-graph-studio-v3.tar.gz) | v{{nebula.release}} |

2. Create the `nebula-graph-studio-v3` directory and decompress the installation package to the directory.

Expand All @@ -60,7 +60,7 @@ To deploy and start Docker-based Studio, run the following commands. Here we use
docker-compose up -d
```

If these lines return, Docker-based Studio v2.x is deployed and started.
If these lines are returned, Docker-based Studio v3.x is deployed and started.

```bash
Creating docker_importer_1 ... done
Expand All @@ -83,37 +83,37 @@ To deploy and start Docker-based Studio, run the following commands. Here we use

### Prerequisites

Before you deploy Docker-based Studio , you must do a check of these:
Before you deploy Docker-based Studio, you must confirm that:

- The Nebula Graph services are deployed and started. For more information, see [Nebula Graph Database Manual](../../2.quick-start/1.quick-start-workflow.md).

- The Linux distribution is CentOS, installed `lsof` and [Node.js](https://nodejs.org/en/) of version above v10.16.0+.
- If your Linux distribution is CentOS, install `lsof` and [Node.js](https://nodejs.org/en/) of versions above v10.16.0+.

!!! note

`node` and `npm` should be installed in `/usr/bin/` directory. Avoid the situation that the node command cannot be found during RPM installation.
For example, the default directory of nodejs12 is in `/opt/rh/rh-nodejs12`, you can use following commands to build soft link:

```bash
$ sudo ln -s /opt/rh/rh-nodejs12/root/usr/bin/node /usr/bin/node
$ sudo ln -s /opt/rh/rh-nodejs12/root/usr/bin/npm /usr/bin/npm
```
```bash
$ sudo ln -s /opt/rh/rh-nodejs12/root/usr/bin/node /usr/bin/node
$ sudo ln -s /opt/rh/rh-nodejs12/root/usr/bin/npm /usr/bin/npm
```

- Before the installation starts, the following ports are not occupied.

| Port | Description |
| ---- | ---- |
| 7001 | Web service provided by Studio |
| 8080 | Nebula-http-gateway, Client's HTTP service |
| 5699 | Nebula importer, provide data import service |
| 7001 | Web service provided by Studio. |
| 8080 | HTTP service provided by Nebula HTTP Gateway. |
| 5699 | Data import service provided by Nebula Importer. |

### Install

1. Select and download the RPM package according to your needs. It is recommended to select the latest version. Common links are as follows:

| Installation package | Checksum | Nebula version |
| ----- | ----- | ----- |
| [nebula-graph-studio-3.0.0-1.x86_64.rpm](https://oss-cdn.nebula-graph.io/nebula-graph-studio/3.0.0/nebula-graph-studio-3.0.0-1.x86_64.rpm) | [nebula-graph-studio-3.0.0-1.x86_64.rpm.sha256](https://oss-cdn.nebula-graph.io/nebula-graph-studio/3.0.0/nebula-graph-studio-3.0.0-1.x86_64.rpm.sha256) | 2.5.0 |
| [nebula-graph-studio-3.0.0-1.x86_64.rpm](https://oss-cdn.nebula-graph.io/nebula-graph-studio/3.0.0/nebula-graph-studio-3.0.0-1.x86_64.rpm) | [nebula-graph-studio-3.0.0-1.x86_64.rpm.sha256](https://oss-cdn.nebula-graph.io/nebula-graph-studio/3.0.0/nebula-graph-studio-3.0.0-1.x86_64.rpm.sha256) | v{{nebula.release}} |


2. Use `sudo rpm -i <rpm>` to install RPM package.
Expand All @@ -124,7 +124,10 @@ Before you deploy Docker-based Studio , you must do a check of these:
```

When the screen returns the following message, it means that the PRM-based Studio has been successfully started.

```bash
egg started on http://0.0.0.0:7001
nohup: Add the output to "nohup.out"
--- START OF NEBULA IMPORTER ---
[INFO] httpserver.go:80: Starting http server on 5699
```
Expand All @@ -151,7 +154,7 @@ sudo rpm -e nebula-graph-studio-3.0.0-1.x86_64

If the automatic start fails during the installation process or you want to manually start or stop the service, use the following command:

- Start the service manually.
- Start the service manually
```bash
bash /usr/local/nebula-graph-studio/scripts/start.sh
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
<!--
On Nebula Graph Cloud Service, users cannot clear the connection.
-->
If you want to reset Nebula Graph, you can clear the connection and reconfigure the database
If you want to reset Nebula Graph, you can clear the connection and reconfigure the database.

When the Studio is still connected to a Nebula Graph database, you can choose **setting > clear connect** at the toolbar. If the **Config Server** page is displayed on the browser, it means that Studio has successfully disconnected from the Nebula Graph database.
4 changes: 2 additions & 2 deletions docs-2.0/nebula-studio/quick-start/st-ug-create-schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ To create a graph schema on Studio, you must do a check of these:

- A graph space is created.

!!! note
!!! note

If no graph space exists and your account has the GOD privilege, you can create a graph space on the **Console** page. For more information, see [CREATE SPACE](../../3.ngql-guide/9.space-statements/1.create-space.md).
If no graph space exists and your account has the GOD privilege, you can create a graph space on the **Console** page. For more information, see [CREATE SPACE](../../3.ngql-guide/9.space-statements/1.create-space.md).

## Create a schema with Schema

Expand Down
16 changes: 10 additions & 6 deletions docs-2.0/nebula-studio/quick-start/st-ug-import-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ To batch import data, do a check of these:

- A schema is created.

- CSV files for vertex and edge data separately are created.
- CSV files meet the demands of the Schema.

- Your account has privilege of GOD, ADMIN, DBA, or USER.

Expand All @@ -22,7 +22,7 @@ To batch import data, follow these steps:

2. On the **Select Space** page, choose a graph space name. In this example, **basketballplayer** is used. And then click the **Next** button.

3. On the **Upload Files** page, click the **Upload Files** button and then choose CSV files. In this example, `edge_serve.csv`, `edge_follow.csv`, `vertex_player.csv` and `vertex_team.csv` are chosen.
3. On the **Upload Files** page, click the **Upload Files** button and then choose CSV files. In this example, `edge_serve.csv`, `edge_follow.csv`, `vertex_player.csv`, and `vertex_team.csv` are chosen.

!!! note

Expand All @@ -39,12 +39,16 @@ To batch import data, follow these steps:
a. In the **CSV Index** column, click **Mapping**.
![Click "Mapping** in the CSV Index column](../figs/st-ug-032-1.png "Choose the source for vertexId")

b. In the dialog box, choose a column from the CSV file. In this example, the only one cloumn of `vertex_player.csv` is chosen to generate VIDs representing users and the `playerID` column of `vertex_player.csv` is chosen to generate VIDs representing courses.
b. In the dialog box, choose a column from the CSV file. In this example, the only one cloumn of `vertex_player.csv` is chosen to generate VIDs representing players and the `playerID` column of `vertex_player.csv` is chosen to generate VIDs representing players.

!!! Note

In the same graph space, the VID is always unique and cannot be repeated. For VID information, see [VID](../../1.introduction/3.vid.md) "Click to enter the Nebula Graph Manual".

8. In the **TAG 1** section, do these operations:
a. In the **TAG** drop-down list, choose a tag name. In this example, **player** is used for the `vertex_player.csv` file, and **team** is used for the `vertex_team.csv` file.

b. In the property list, click **Mapping** to choose a data column from the CSV file as the value of a property. In this example,for the **player** tag, choose **Column 1** for the `age` property and set its type to **int**. And choose **Column 2** for the `name` property and set its type to **string**.
b. In the property list, click **Mapping** to choose a data column from the CSV file as the value of a property. In this example, for the **player** tag, choose **Column 1** for the `age` property and set its type to **int**. And choose **Column 2** for the `name` property and set its type to **string**.

![Data source for the course vertices](../figs/st-ug-033-1.png "Choose data source for tag properties")

Expand All @@ -57,7 +61,7 @@ To batch import data, follow these steps:

12. In the **Type** drop-down list, choose an edge type name. In this example, **follow** is chosen.

13. In the property list, click **Mapping** to choose a column from the `edge_follow.csv` file as values of a property for the edges. **srcId** and **dstId** are the VIDs of the source vertex and destination vertex of an edge. In this example, **srcId** must be set to the VIDs of the player and **dstId** must be set to the VIDs of another player. **rank** is optional.
13. In the property list, click **Mapping** to choose a column from the `edge_follow.csv` file as values of a property for the edges. **srcId** and **dstId** are the VIDs of the source vertex and destination vertex of an edge. In this example, **srcId** must be set to the VIDs of the player and **dstId** must be set to the VIDs of another player. **Rank** is optional.

![Data source for the action edges](../figs/st-ug-034-1.png "Choose data source for the edge type properties")

Expand All @@ -68,4 +72,4 @@ To batch import data, follow these steps:

## Next to do

When the data are imported to Nebula Graph v2.x, you can [query graph data](st-ug-explore.md).
When the data are imported to v{{nebula.release}}, you can [query graph data](st-ug-explore.md).
4 changes: 2 additions & 2 deletions docs-2.0/nebula-studio/quick-start/st-ug-plan-schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ This table gives all the essential elements of the schema.
| Edge type | **serve** | - `start_year` (`int`) <br> - `end_year` (`int`) | Represent the players behavior.<br>This behavior connects the player to the team, and the direction is from player to team. |
| Edge type | **follow** | - `degree` (`int`) | Represent the players behavior.<br>This behavior connects the player to the player, and the direction is from a player to a player. |

This figure shows the relationship (**action**) between a **user** and a **course** on the MOOC platform.
This figure shows the relationship (**serve**/**follow**) between a **player** and a **team**.

![Users take actions on a MOOC platform](../figs/st-ug-006-1.png "Relationship between users and courses in the example dataset")
![The relationship between players and between players and teams](../figs/st-ug-006-1.png "Relationship between players and teams in the example dataset")

0 comments on commit 681990f

Please sign in to comment.