Skip to content

Commit

Permalink
[doc] Update doc rc1 (vesoft-inc#1202)
Browse files Browse the repository at this point in the history
* update doc rc1

* update doc rc1 2

* update doc rc1 3

* update

* jie comment

* laura
  • Loading branch information
amber-moe authored and dutor committed Nov 7, 2019
1 parent d5fa79e commit aded1e1
Show file tree
Hide file tree
Showing 13 changed files with 114 additions and 28 deletions.
2 changes: 1 addition & 1 deletion docs/manual-CN/0.about-this-manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

本手册适用于 `算法工程师``数据科学家``软件开发人员``DBA`,以及所有对`图数据库`感兴趣的人群。

如果在使用 Nebula 的过程中有任何问题,欢迎在 [Nebula Graph Community Slack](https://join.slack.com/t/nebulagraph/shared_invite/enQtNjIzMjQ5MzE2OTQ2LTM0MjY0MWFlODg3ZTNjMjg3YWU5ZGY2NDM5MDhmOGU2OWI5ZWZjZDUwNTExMGIxZTk2ZmQxY2Q2MzM1OWJhMmY#")提问。
如果在使用 Nebula 的过程中有任何问题,欢迎在 [Nebula Graph Community Slack](https://join.slack.com/t/nebulagraph/shared_invite/enQtNjIzMjQ5MzE2OTQ2LTM0MjY0MWFlODg3ZTNjMjg3YWU5ZGY2NDM5MDhmOGU2OWI5ZWZjZDUwNTExMGIxZTk2ZmQxY2Q2MzM1OWJhMmY#") 提问。
如果对本手册有任何建议或疑问,请在 [GitHub](https://github.com/vesoft-inc/nebula/issues) 给我们留言。

## 格式约定
Expand Down
7 changes: 3 additions & 4 deletions docs/manual-CN/1.overview/1.concepts/1.data-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## 图空间

**图空间** 为彼此隔离的图数据,与 MWSQL 中的数据库概念类似
**图空间** 为彼此隔离的图数据,与 MySQL 中的 database 概念类似

## 有向属性图

Expand All @@ -20,14 +20,13 @@ G = < V, E, P<sub>V</sub>, P<sub>E</sub> >,

## 节点

Vertices are typically used to represent entities in the real world. In the preceding example, the graph contains eleven vertices.
节点用于表示现实世界中的实体,本例的数据中共包含 11 个节点。

<img src="https://user-images.githubusercontent.com/42762957/64932628-00eecf00-d873-11e9-844b-6b2a535ca734.png" width="10%" height="20%">

## 标签

**Nebula Graph** 使用 **标签** 对节点进行分类,本例包含的节点标签为 **player****team**
**Nebula Graph** 使用**标签**对节点进行分类,本例包含的节点标签为 **player****team**
<img src="https://user-images.githubusercontent.com/42762957/64932330-bff5bb00-d870-11e9-9940-4ff76ceca353.png" width="35%" height="20%">

##
Expand All @@ -45,4 +44,4 @@ Vertices are typically used to represent entities in the real world. In the prec

## Schema

**Nebula Graph** 中,schema 为标签及边对应的属性。与 `Mysql` 类似,Nebula Graph 是一种强 schema 的数据库,属性的名称和数据类型在数据写入前已确定。
**Nebula Graph** 中,schema 为标签及边对应的属性。与 `MySQL` 类似,Nebula Graph 是一种强 schema 的数据库,属性的名称和数据类型在数据写入前已确定。
2 changes: 1 addition & 1 deletion docs/manual-CN/1.overview/1.concepts/2.nGQL-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@

## 查询语言规则概览

> 不熟悉 BNF 可跳过本节
> 不熟悉 BNF 的读者可跳过本节
### 总览

Expand Down
2 changes: 1 addition & 1 deletion docs/manual-CN/1.overview/2.quick-start/1.get-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ nebula> GO FROM 201 OVER like;
-------------
```

Q2. 查询点 201 喜欢的点,并筛选出年龄大于 17 岁的点,并返回其姓名,年龄,性别,将其重全名为 Friend,Age,Gender。
Q2. 查询点 201 喜欢的点,并筛选出年龄大于 17 岁的点,并返回其姓名,年龄,性别,将其重命名为 Friend,Age,Gender。

```ngql
nebula> GO FROM 201 OVER like WHERE $$.student.age >= 17 YIELD $$.student.name AS Friend, \
Expand Down
30 changes: 17 additions & 13 deletions docs/manual-CN/1.overview/2.quick-start/2.trouble-shooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,25 +27,29 @@

## 当创建 tag 或者 edge 类型后,插入数据时报错

可能原因, `load_data_interval_secs` 设置了从 meta server 获取元数据时间间隔,生产场景 (默认值) 是120s,试用时可改为1s。更改方式:
可能原因, `load_data_interval_secs` 设置了从 meta server 获取元数据时间间隔。更改方式:

- 启动前在nebula-metad.conf 和 nebula-graphd.conf 中加入
如果 meta 注册过配置,请在 console 中运行以下命令查看参数 `load_data_interval_secs` 的值。

```bash
--load_data_interval_secs=1
```
```ngql
nebula> GET CONFIGS storage:load_data_interval_secs
nebula> GET CONFIGS graph:load_data_interval_secs
```

- console启动后,运行:
如果值过大,运行以下命令更改将值更改为 1s

```ngql
nebula> UPDATE VARIABLES graph:load_data_interval_secs=1
nebula> UPDATE CONFIGS storage:load_data_interval_secs=1
nebula> UPDATE CONFIGS graph:load_data_interval_secs=1
```

## 使用docker启动后,执行命令时报错
> 注意,更改不会立即生效,需在下个周期生效。
## 使用 docker 启动后,执行命令时报错

可能的原因是docker的IP地址和默认配置中的监听地址不一致(默认是172.17.0.2),因此这里需要修改默认配置中的监听地址.
可能的原因是 docker 的 IP 地址和默认配置中的监听地址不一致(默认是 172.17.0.2),因此这里需要修改默认配置中的监听地址.

1. 首先在容器中执行 ifconfig 命令,查看您的容器地址,这里假设您的容器地址是172.17.0.3,那么就意味着您需要修改默认配置的IP地址.
2. 然后进入配置目录(cd /usr/local/nebula/etc), 查找所有IP地址配置的位置(grep "172.17.0.2" . -r).
3. 修改上一步查到的所有IP地址为您的容器地址(172.17.0.3).
4. 最后重新启动所有服务.
1. 首先在容器中执行 ifconfig 命令,查看您的容器地址,这里假设您的容器地址是172.17.0.3那么就意味着您需要修改默认配置的IP地址
2. 然后进入配置目录(cd /usr/local/nebula/etc), 查找所有IP地址配置的位置(grep "172.17.0.2" . -r)
3. 修改上一步查到的所有IP地址为您的容器地址(172.17.0.3)
4. 最后重新启动所有服务
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Meta Service 不仅负责存储和提供图数据的 meta 信息,如 schema、

存储计算分离有诸多优势,最直接的优势就是,计算层和存储层可以根据各自的情况弹性扩容、缩容。

存储计算分离还带来的另一个优势:使水平扩展成为可能。
存储计算分离还有另一个优势:使水平扩展成为可能。

此外,存储计算分离使得 Storage Service 可以为多种类型的个计算层或者计算引擎提供服务。当前 Query Service 是一个高优先级的计算层,而各种迭代计算框架会是另外一个计算层。

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# LIMIT 语法

`LIMIT` 用法与 `SQL` 中的相同。
`LIMIT` 用法与 `SQL` 中的相同,且只能与 `|` 结合使用

```ngql
ORDER BY <expressions> [ASC | DESC]
Expand All @@ -20,3 +20,16 @@ LIMIT [<offset_value>,] <number_rows>
可选选项,用来跳过指定行数返回结果,offset 从 0 开始。

> 当使用 `LIMIT` 时,请使用 `ORDER BY` 子句对返回结果进行唯一排序,这点很重要。否则,将返回难以预测的子集。
例如:

```ngql
nebula> GO FROM 105 OVER like YIELD $$.player.name AS Friend, $$.player.age AS Age, like._dst AS Like | LIMIT 2
================================
| Friend | Age | Like |
================================
| Tim Duncan | 42 | 100 |
--------------------------------
| Marco Belinelli | 32 | 104 |
--------------------------------
```
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ bash> sudo make install
```bash
bash> cmake -DCMAKE_BUILD_TYPE=Release ..
bash> make
bash> sudo make install
```

#### **构建完成**
Expand All @@ -91,7 +92,7 @@ bash> make
```
**现在可以开始运行 Nebula**

### 使用 docker 容器构建
<!-- ### 使用 docker 容器构建

Nebula 提供了一个安装有完整编译环境的 docker 镜像 [vesoft/nebula-dev](https://hub.docker.com/r/vesoft/nebula-dev),让开发者可以本地修改源码,容器内部构建和调试。只需执行如下几步便可快速参与开发:

Expand Down Expand Up @@ -120,7 +121,7 @@ docker> mkdir _build && cd _build
docker> cmake ..
docker> make
docker> make install
```
``` -->

#### 启动 nebula 服务

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ nebula> BALANCE DATA
也可通过 `BALANCE DATA $id` 查看具 balance 的具体执行进度。

```ngql
nebula> BALANCE ID 1570761786
nebula> BALANCE DATA 1570761786
===============================================================================
| balanceId, spaceId:partId, src->dst | status |
===============================================================================
Expand Down
57 changes: 56 additions & 1 deletion docs/manual-EN/1.overview/2.quick-start/2.trouble-shooting.md
Original file line number Diff line number Diff line change
@@ -1 +1,56 @@
To Be Provided.
# Trouble Shooting

## graphd config file doesn't register to meta server

When starting nebula services with the `nebula.service` script, `graphd`, `metad` and `storaged` processes start too fast to make the graphd config file registered into the meta server. The same problem may also occur when restarting.

If you are using the beta version, start the metad service first, then the storaged and graphd to avoid such problem. We will resolve this problem in the next release.

Start metad first:

```bash
nebula> scripts/nebula.service start metad
[INFO] Starting nebula-metad...
[INFO] Done
```

Then start storaged and graphd

```bash
nebula> scripts/nebula.service start storaged
[INFO] Starting nebula-storaged...
[INFO] Done

nebula> scripts/nebula.service start graphd
[INFO] Starting nebula-graphd...
[INFO] Done
```

## Errors thrown when inserting data after tag or edge is created

This is likely caused by setting the `load_data_interval_secs` value to fetch data from the meta server. Conduct the following steps to resolve:

If meta has registered, check `load_data_interval_secs` value in console with the following command.

```ngql
nebula> GET CONFIGS storage:load_data_interval_secs
nebula> GET CONFIGS graph:load_data_interval_secs
```

If the value is large, change it to 1s with the following command.

```ngql
nebula> UPDATE CONFIGS storage:load_data_interval_secs=1
nebula> UPDATE CONFIGS graph:load_data_interval_secs=1
```

> Note the changes take effect in the next period.
## Errors thrown when executing command in docker

This is likely caused by the inconsistency between the docker IP and the default listening address (172.17.0.2). Thus we need to change the the latter one.

1. First run `ifconfig` in container to check your container IP, here we assume your IP is 172.17.0.3.
2. In directory `/usr/local/nebula/etc`, check the config locations of all the IP addresses with the command `grep "172.17.0.2" . -r`.
3. Change all the IPs you find in step 2 to your container IP 172.17.0.3.
4. Restart all the services.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Limit Syntax

`limit` works the same as in `SQL`.
`limit` works the same as in `SQL`, and must be used with pipe `|`.

```ngql
ORDER BY <expressions> [ASC | DESC]
Expand All @@ -20,3 +20,16 @@ LIMIT [<offset_value>,] <number_rows>
Optional. It says to skip that many rows before the first row returned. The offset starts from zero.

> When using `LIMIT`, it is important to use an `ORDER BY` clause that constrains the result rows into a unique order. Otherwise you will get an unpredictable subset of the query's rows.
For example:

```ngql
nebula> GO FROM 105 OVER like YIELD $$.player.name AS Friend, $$.player.age AS Age, like._dst AS Like | LIMIT 2
================================
| Friend | Age | Like |
================================
| Tim Duncan | 42 | 100 |
--------------------------------
| Marco Belinelli | 32 | 104 |
--------------------------------
```
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ bash> sudo make install
```bash
bash> cmake -DCMAKE_BUILD_TYPE=Release ..
bash> make
bash> sudo make install
```

#### **Building completed**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Nebula supports changing some rocksdb parameters in storage service as follows:
```

For example
`UPDATE VARIABLE storage:rocksdb_column_family_options = { disable_auto_compactions = false , level0_file_num_compaction_trigger = 10 }`
`UPDATE CONFIGS storage:rocksdb_column_family_options = { disable_auto_compactions = false , level0_file_num_compaction_trigger = 10 }`

## SHOW CONFIGS

Expand Down

0 comments on commit aded1e1

Please sign in to comment.