diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 69124f864bd..e4d29881505 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -6,7 +6,7 @@ on: jobs: deploy: - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 with: @@ -15,19 +15,17 @@ jobs: - name: Setup Python uses: actions/setup-python@v1 with: - python-version: '3.7' + python-version: '3.8' architecture: 'x64' - name: apt install run: | sudo apt update -y sudo apt install -y $(cat pkglist.txt) - - name: Install dependencies run: | pip install --upgrade pip pip install -r ./requirements.txt - - name: set LANG run: sh lang-zh.sh @@ -37,17 +35,14 @@ jobs: - name: mike list delete run: | mike list - - name: Mike Deploy master run: | mike deploy master -p --rebase mike list - - name: show git branch run: | git branch git checkout gh-pages - - name: Compress run: | tar -vczf nebula-docs.tar.gz master versions.json *.html @@ -79,4 +74,4 @@ jobs: # uses: peaceiris/actions-gh-pages@v3 # with: # github_token: ${{ secrets.DEPLOY_TOKEN }} - # publish_dir: ./site + # publish_dir: ./site \ No newline at end of file diff --git a/docs-2.0/1.introduction/1.what-is-nebula-graph.md b/docs-2.0/1.introduction/1.what-is-nebula-graph.md index a34059a87f2..28ce865becb 100644 --- a/docs-2.0/1.introduction/1.what-is-nebula-graph.md +++ b/docs-2.0/1.introduction/1.what-is-nebula-graph.md @@ -38,13 +38,13 @@ Nebula Graph支持严格的角色访问控制和LDAP(Lightweight Directory Acc ### 生态多样化 -Nebula Graph开放了越来越多的原生工具,例如[Nebula Graph Studio](https://github.com/vesoft-inc/nebula-web-docker)、[Nebula Console](https://github.com/vesoft-inc/nebula-console)、[Nebula Exchange](https://github.com/vesoft-inc/nebula-spark-utils/tree/v2.0.0/nebula-exchange)等。 +Nebula Graph开放了越来越多的原生工具,例如[Nebula Graph Studio](https://github.com/vesoft-inc/nebula-studio)、[Nebula Console](https://github.com/vesoft-inc/nebula-console)、[Nebula Exchange](https://github.com/vesoft-inc/nebula-spark-utils/tree/v2.0.0/nebula-exchange)等。 此外,Nebula Graph还具备与Spark、Flink、HBase等产品整合的能力,在这个充满挑战与机遇的时代,大大增强了自身的竞争力。 ### 兼容openCypher查询语言 -Nebula Graph查询语言,也称为nGQL,是一种声明性的、兼容openCypher的文本查询语言,易于理解和使用。详细语法请参见[nGQL指南](../3.ngql-guide/1.nGQL-overview/1.overview.md)。 +Nebula Graph 查询语言,简称为 nGQL,是一种声明性的、部分兼容 openCypher 的文本查询语言,易于理解和使用。详细语法请参见[nGQL指南](../3.ngql-guide/1.nGQL-overview/1.overview.md)。 ### 面向未来硬件,读写平衡 diff --git a/docs-2.0/1.introduction/2.1.path.md b/docs-2.0/1.introduction/2.1.path.md index 2699556cba4..64966cac2fe 100644 --- a/docs-2.0/1.introduction/2.1.path.md +++ b/docs-2.0/1.introduction/2.1.path.md @@ -48,7 +48,7 @@ ## 视频 -用户也可以观看视频了解Path的相关概念。 +用户也可以观看视频了解路径的相关概念。 [Nebula Algorithm](https://www.bilibili.com/video/BV1Uf4y1t72L)(03分09秒) diff --git a/docs-2.0/1.introduction/2.data-model.md b/docs-2.0/1.introduction/2.data-model.md index 616822a0c6a..a84bc961318 100644 --- a/docs-2.0/1.introduction/2.data-model.md +++ b/docs-2.0/1.introduction/2.data-model.md @@ -1,10 +1,10 @@ # 数据模型 -本文介绍Nebula Graph的数据模型。数据模型是一种组织数据并说明它们如何相互关联的模型。 +本文介绍Nebula Graph的数据模型。数据模型是一种组织数据并说明它们如何相互关联的模型(schema)。 -## 数据结构 +## 数据模型 -Nebula Graph数据模型使用6种基本的数据结构: +Nebula Graph数据模型使用6种基本的数据模型: - 图空间(Space) diff --git a/docs-2.0/1.introduction/3.nebula-graph-architecture/1.architecture-overview.md b/docs-2.0/1.introduction/3.nebula-graph-architecture/1.architecture-overview.md index a6ead9669ec..1f031019350 100644 --- a/docs-2.0/1.introduction/3.nebula-graph-architecture/1.architecture-overview.md +++ b/docs-2.0/1.introduction/3.nebula-graph-architecture/1.architecture-overview.md @@ -1,4 +1,4 @@ -# 架构总览 +# Nebula Graph 架构总览 Nebula Graph 由三种服务构成:Graph 服务、Meta 服务和 Storage 服务,是一种存储与计算分离的架构。 @@ -28,7 +28,9 @@ Nebula Graph 采用计算存储分离架构。Graph 服务负责处理计算请 - 节约成本 - 计算存储分离架构能够提高资源利用率,而且可根据业务需求灵活控制成本。如果使用 [Nebula Graph Cloud](https://cloud.nebula-graph.com.cn/ "Nebula Graph Cloud official website"),可以进一步节约前期成本。 + 计算存储分离架构能够提高资源利用率,而且可根据业务需求灵活控制成本。 + + - 更多可能性 diff --git a/docs-2.0/1.introduction/3.nebula-graph-architecture/4.storage-service.md b/docs-2.0/1.introduction/3.nebula-graph-architecture/4.storage-service.md index 87c4b79d051..a670b248774 100644 --- a/docs-2.0/1.introduction/3.nebula-graph-architecture/4.storage-service.md +++ b/docs-2.0/1.introduction/3.nebula-graph-architecture/4.storage-service.md @@ -38,7 +38,7 @@ Storage服务是由nebula-storaged进程提供的,用户可以根据场景配 - Consensus层 - Storage服务的中间层,实现了[Multi Group Raft](#raft协议),保证强一致性和高可用性。 + Storage服务的中间层,实现了[Multi Group Raft](#multi_group_raft),保证强一致性和高可用性。 - Store Engine层 diff --git a/docs-2.0/2.quick-start/2.install-nebula-graph.md b/docs-2.0/2.quick-start/2.install-nebula-graph.md new file mode 100644 index 00000000000..ce99db09ed1 --- /dev/null +++ b/docs-2.0/2.quick-start/2.install-nebula-graph.md @@ -0,0 +1,4 @@ +# 步骤1:安装Nebula Graph + +{% include "/source_install-nebula-graph-by-rpm-or-deb.md" %} + diff --git a/docs-2.0/2.quick-start/3.connect-to-nebula-graph.md b/docs-2.0/2.quick-start/3.connect-to-nebula-graph.md index 63374679591..a188805977c 100644 --- a/docs-2.0/2.quick-start/3.connect-to-nebula-graph.md +++ b/docs-2.0/2.quick-start/3.connect-to-nebula-graph.md @@ -1,5 +1,4 @@ # 步骤3:连接Nebula Graph ---8<-- "source_connect-to-nebula-graph.md" - - \ No newline at end of file +{% include "/source_connect-to-nebula-graph.md" %} + 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 c7eb656b15f..e095e26960e 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 @@ -27,7 +27,9 @@ ## 检查Nebula Graph集群的机器状态 -首先建议检查机器状态,确保所有的Storage服务连接到了Meta服务。执行命令`SHOW HOSTS`查看机器状态。 +!!! Note + + 首先建议检查机器状态,确保所有的Storage服务连接到了Meta服务。执行命令`SHOW HOSTS`查看机器状态。 ```ngql nebula> SHOW HOSTS; @@ -49,7 +51,9 @@ Got 4 rows (time spent 1061/2251 us) ### 异步实现创建和修改 -Nebula Graph中执行如下创建和修改操作,是异步实现的,需要在下一个心跳周期才同步数据。 +!!! caution + + Nebula Graph中执行如下创建和修改操作,是异步实现的。要在**下一个**心跳周期之后才能生效;否则访问会报错。 - `CREATE SPACE` - `CREATE TAG` @@ -165,7 +169,7 @@ CREATE {TAG | EDGE} { | }( ### 示例 -创建Tag`player`和`team`,以及Edge type`follow`和`serve`。说明如下表。 +创建Tag:`player`和`team`,以及Edge type:`follow`和`serve`。说明如下表。 | 名称 | 类型 | 属性 | | :--- | :--- | :--- | @@ -178,22 +182,14 @@ CREATE {TAG | EDGE} { | }( nebula> CREATE TAG player(name string, age int); Execution succeeded (time spent 20708/22071 us) -Wed, 24 Feb 2021 03:47:01 EST - nebula> CREATE TAG team(name string); Execution succeeded (time spent 5643/6810 us) -Wed, 24 Feb 2021 03:47:59 EST - nebula> CREATE EDGE follow(degree int); Execution succeeded (time spent 12665/13934 us) -Wed, 24 Feb 2021 03:48:07 EST - nebula> CREATE EDGE serve(start_year int, end_year int); Execution succeeded (time spent 5858/6870 us) - -Wed, 24 Feb 2021 03:48:16 EST ``` ## 插入点和边 @@ -231,22 +227,14 @@ Wed, 24 Feb 2021 03:48:16 EST nebula> INSERT VERTEX player(name, age) VALUES "player100":("Tim Duncan", 42); Execution succeeded (time spent 28196/30896 us) - Wed, 24 Feb 2021 03:55:08 EST - nebula> INSERT VERTEX player(name, age) VALUES "player101":("Tony Parker", 36); Execution succeeded (time spent 2708/3834 us) - Wed, 24 Feb 2021 03:55:20 EST - nebula> INSERT VERTEX player(name, age) VALUES "player102":("LaMarcus Aldridge", 33); Execution succeeded (time spent 1945/3294 us) - Wed, 24 Feb 2021 03:55:32 EST - nebula> INSERT VERTEX team(name) VALUES "team200":("Warriors"), "team201":("Nuggets"); Execution succeeded (time spent 2269/3310 us) - - Wed, 24 Feb 2021 03:55:47 EST ``` - 插入代表球员和球队之间关系的边。 @@ -255,22 +243,14 @@ Wed, 24 Feb 2021 03:48:16 EST nebula> INSERT EDGE follow(degree) VALUES "player100" -> "player101":(95); Execution succeeded (time spent 3362/4542 us) - Wed, 24 Feb 2021 03:57:36 EST - nebula> INSERT EDGE follow(degree) VALUES "player100" -> "player102":(90); Execution succeeded (time spent 2974/4274 us) - Wed, 24 Feb 2021 03:57:44 EST - nebula> INSERT EDGE follow(degree) VALUES "player102" -> "player101":(75); Execution succeeded (time spent 1891/3096 us) - Wed, 24 Feb 2021 03:57:52 EST - nebula> INSERT EDGE serve(start_year, end_year) VALUES "player100" -> "team200":(1997, 2016), "player101" -> "team201":(1999, 2018); Execution succeeded (time spent 6064/7104 us) - - Wed, 24 Feb 2021 03:58:01 EST ``` ## 查询数据 @@ -279,9 +259,9 @@ Wed, 24 Feb 2021 03:48:16 EST - [FETCH](../3.ngql-guide/7.general-query-statements/4.fetch.md)语句可以获得点或边的属性。 -- [LOOKUP](../3.ngql-guide/7.general-query-statements/5.lookup.md)语句是基于[索引](#_14)的,和`WHERE`子句一起使用,查找符合特定条件的数据。 +- [LOOKUP](../3.ngql-guide/7.general-query-statements/5.lookup.md)语句是基于[索引](#_12)的,和`WHERE`子句一起使用,查找符合特定条件的数据。 -- [MATCH](../3ngql-guide/../3.ngql-guide/7.general-query-statements/2.match.md)语句是查询图数据最常用的,但是它依赖[索引](#_14)去匹配Nebula Graph中的数据模型。 +- [MATCH](../3ngql-guide/../3.ngql-guide/7.general-query-statements/2.match.md)语句是查询图数据最常用的,可以灵活的描述各种图模式,但是它依赖[索引](#_12)去匹配Nebula Graph中的数据模型,性能也还需要调优。 ### nGQL语法 @@ -416,7 +396,7 @@ Got 1 rows (time spent 2006/2406 us) !!! Note - `LOOKUP`和`MATCH`的示例在下文的[索引](#_14)部分查看。 + `LOOKUP`和`MATCH`的示例在下文的[索引](#_12)部分查看。 ## 修改点和边 @@ -426,7 +406,7 @@ Got 1 rows (time spent 2006/2406 us) !!! Note - `UPSERT`操作是基于Nebula Graph的分区进行串行操作,所以执行速度比单独执行`INSERT`或`UPDATE`慢。 + 每个 partition 内部,`UPSERT` 操作是一个串行操作,所以执行速度比执行 `INSERT` 或 `UPDATE` 慢很多。其仅在多个 partition 之间有并发。 ### nGQL语法 @@ -459,8 +439,6 @@ Got 1 rows (time spent 2006/2406 us) nebula> UPDATE VERTEX "player100" SET player.name = "Tim"; Execution succeeded (time spent 3483/3914 us) - Wed, 21 Oct 2020 10:53:14 UTC - nebula> FETCH PROP ON player "player100"; +---------------------------------------------+ | vertices_ | @@ -541,11 +519,11 @@ Got 1 rows (time spent 2006/2406 us) 用户可以通过[CREATE INDEX](../3.ngql-guide/14.native-index-statements/1.create-native-index.md)语句为Tag和Edge type增加索引。 -### 使用索引必读 +!!! caution "使用索引必读" -- `MATCH`和`LOOKUP`语句的执行都依赖索引,但是索引会导致写性能大幅降低(降低90%甚至更多)。请**不要随意**在生产环境中使用索引,除非很清楚使用索引对业务的影响。 + `MATCH`和`LOOKUP`语句的执行都依赖索引,但是索引会导致写性能大幅降低(降低90%甚至更多)。请**不要随意**在生产环境中使用索引,除非很清楚使用索引对业务的影响。 -- **必须**为已存在的数据重建索引,否则不能索引已存在的数据,导致无法在`MATCH`和`LOOKUP`语句中返回这些数据。更多信息,请参见[重建索引](../3.ngql-guide/14.native-index-statements/1.create-native-index.md)。 + **必须**为“已写入但未构建索引”的数据重建索引,否则无法在`MATCH`和`LOOKUP`语句中返回这些数据。参见[重建索引](../3.ngql-guide/14.native-index-statements/4.rebuild-native-index.md)。 ### nGQL语法 diff --git a/docs-2.0/2.quick-start/5.start-stop-service.md b/docs-2.0/2.quick-start/5.start-stop-service.md index c4c11402ffb..cc92637d43a 100644 --- a/docs-2.0/2.quick-start/5.start-stop-service.md +++ b/docs-2.0/2.quick-start/5.start-stop-service.md @@ -1,5 +1,4 @@ # 步骤2:启动Nebula Graph服务 ---8<-- "source_manage-service.md" - - \ No newline at end of file +{% include "/source_manage-service.md" %} + diff --git a/docs-2.0/20.appendix/0.FAQ.md b/docs-2.0/20.appendix/0.FAQ.md index 6173034d017..1a3bec18e0a 100644 --- a/docs-2.0/20.appendix/0.FAQ.md +++ b/docs-2.0/20.appendix/0.FAQ.md @@ -23,7 +23,7 @@ Nebula Graph一直在持续开发,功能或操作的行为可能会有变化 !!! compatibility "`X`版本兼容性" Nebula Graph {{ nebula.release }} 与 历史版本 (包括 Nebula Graph 1.x 和 2.0-RC) 的数据格式、客户端通信协议均**双向不兼容**。 - 数据格式升级参见[升级 Nebula Graph 历史版本至 v2.0.0](../4.deployment-and-installation/3.upgrade-nebula-graph/upgrade-nebula-graph-to-200.md)。 + 数据格式升级参见[升级 Nebula Graph 历史版本至 v2.0.0](../4.deployment-and-installation/3.upgrade-nebula-graph/upgrade-nebula-graph-to-250.md)。 客户端与工具均需要[下载对应版本](../20.appendix/6.eco-tool-version.md)。 !!! compatibility "`Y`版本兼容性" @@ -145,7 +145,8 @@ Storage服务在毫秒级时间内多次收到插入或者更新同一点或边 报错原因通常为Graph服务向Storage服务请求了过多的数据,导致Storage服务超时。请尝试以下解决方案: -* [修改配置文件](../5.configurations-and-logs/1.configurations/3.graph-config.md): 在`nebula-graphd.conf`文件中修改`--storage_client_timeout_ms`参数的值,以增加Storage client的连接超时时间。该值的单位为毫秒(ms)。例如,设置`--storage_client_timeout_ms=60000`。如果`nebula-graphd.conf`文件中未配置该参数,请手动增加。提示:请在配置文件开头添加--local_config=true再重启服务。 +* [修改配置文件](../5.configurations-and-logs/1.configurations/3.graph-config.md): 在`nebula-graphd.conf`文件中修改`--storage_client_timeout_ms`参数的值,以增加Storage client的连接超时时间。该值的单位为毫秒(ms)。例如,设置`--storage_client_timeout_ms=60000`。如果`nebula-graphd.conf`文件中未配置该参数,请手动增加。 + * 优化查询语句:减少全库扫描型的查询,无论是否用`LIMIT`限制了返回结果的数量;用 GO 语句改写 MATCH 语句(前者有优化,后者无优化)。 * 检查Storaged是否发生的 OOM。(`dmesg |grep nebula`)。 * 为 Storage 服务器提供性能更好的SSD或者内存。 @@ -171,7 +172,8 @@ Storage服务在毫秒级时间内多次收到插入或者更新同一点或边 - 导入数据时,手动[compaction](../8.service-tuning/compaction.md),加速读的速度。 -- 增加Graph服务与Storage服务的RPC连接超时时间,在`nebula-storaged.conf`文件里面修改`--storage_client_timeout_ms`参数的值。该值的单位为毫秒(ms),默认值为60000毫秒。提示:请在配置文件开头添加--local_config=true再重启服务。 +- 增加Graph服务与Storage服务的RPC连接超时时间,在`nebula-storaged.conf`文件里面修改`--storage_client_timeout_ms`参数的值。该值的单位为毫秒(ms),默认值为60000毫秒。 + ### 如何处理`nebula-storaged.INFO`错误日志`MetaClient.cpp:65] Heartbeat failed, status:Wrong cluster!`或者 `nebula-metad.INFO`含有错误日志`HBProcessor.cpp:54] Reject wrong cluster host "x.x.x.x":9771!` diff --git a/docs-2.0/20.appendix/6.eco-tool-version.md b/docs-2.0/20.appendix/6.eco-tool-version.md index 06401219d7b..f79e501220e 100644 --- a/docs-2.0/20.appendix/6.eco-tool-version.md +++ b/docs-2.0/20.appendix/6.eco-tool-version.md @@ -1,9 +1,8 @@ # 生态工具概览 - ![Nebula Graph 鸟瞰图](../1.introduction/nebula-birdview.png) -!!! compatibility +!!! compatibility 内核版本号命名规则为 `X.Y.Z`,表示`大版本X`,`中版本Y`,`小版本Z`。对于客户端的升级要求为: @@ -22,13 +21,11 @@ - 文件命名中含有`RC`表示仅用于预览的非正式版本(`Release Candidate`),其维护周期仅至下个RC或者正式版本发布,其客户端、数据兼容性等均无保证。 - 文件命名中含有`nightly`、`SNAPSHOT`或者日期的为日常开发版本,无质量保证和维护周期。 - + !!! compatibility 1.x版本的生态工具完全不支持在Nebula Graph 2.x版本中使用。 -TODO: Nebula eco tools are not released/packed with kernel. To be updated. - ## Nebula Graph Studio Nebula Graph Studio(简称 Studio)是一款可以通过Web访问的图数据库可视化工具,搭配Nebula Graph DBMS使用,提供构图、数据导入、编写nGQL查询、图探索等一站式服务。详情请参见[什么是Nebula Graph Studio](../nebula-studio/about-studio/st-ug-what-is-graph-studio.md)。 @@ -37,65 +34,65 @@ Nebula Graph Studio(简称 Studio)是一款可以通过Web访问的图数据 Studio 版本发布节奏独立于 Nebula Graph 内核,其命名方式也不参照内核命名规则,两者兼容对应关系如下表。 -|Nebula Graph版本|Studio版本| +|Nebula Graph版本|Studio版本(commit id)| |:---|:---| -| {{ nebula.release }} | {{studio.base300}} | +| {{ nebula.release }} | {{studio.base300}}(9e2a120)| ## Nebula Graph Dashboard Nebula Graph Dashboard(简称Dashboard)是一款用于监控Nebula Graph集群中机器和服务状态的可视化工具。详情参见[什么是Nebula Graph Dashboard](../nebula-dashboard/1.what-is-dashboard.md)。 -|Nebula Graph版本|Dashboard版本| +|Nebula Graph版本|Dashboard版本(commit id)| |:---|:---| -| {{ nebula.release }} | {{dashboard.release}} | +| {{ nebula.release }} | {{dashboard.release}}(2b91b3c) | ## Nebula Graph Explorer Nebula Graph Explorer(简称 Explorer)是一款可以通过 Web 访问的图探索可视化工具,搭配 Nebula Graph 内核使用,用于与图数据进行可视化交互。即使没有图数据操作经验,用户也可以快速成为图专家。详情参见[什么是Nebula Graph Explorer](../nebula-explorer/about-explorer/ex-ug-what-is-explorer.md)。 -|Nebula Graph版本|Explorer版本| +|Nebula Graph版本|Explorer版本(commit id)| |:---|:---| -| {{ nebula.release }} | {{explorer.base100}} | +| {{ nebula.release }} | {{explorer.base100}}(3b82142) | ## Nebula Exchange Nebula Exchange(简称Exchange)是一款Apache Spark™应用,用于在分布式环境中将集群中的数据批量迁移到Nebula Graph中,能支持多种不同格式的批式数据和流式数据的迁移。详情请参见[什么是Nebula Exchange](../nebula-exchange/about-exchange/ex-ug-what-is-exchange.md)。 -|Nebula Graph版本|[Exchange](https://github.com/vesoft-inc/nebula-spark-utils/tree/v2.5/nebula-exchange)版本(commit id)| +|Nebula Graph版本|[Exchange](https://github.com/vesoft-inc/nebula-spark-utils/tree/{{exchange.branch}}/nebula-exchange)版本(commit id)| |:---|:---| -| {{ nebula.release }} | {{exchange.release}}(TODO:coding) | +| {{ nebula.release }} | {{exchange.release}}(3c0f4c6) | ## Nebula Importer Nebula Importer(简称Importer)是一款Nebula Graph的CSV文件导入工具。Importer可以读取本地的CSV文件,然后导入数据至Nebula Graph图数据库中。详情请参见[什么是Nebula Importer](../nebula-importer/use-importer.md)。 -|Nebula Graph版本|[Importer](https://github.com/vesoft-inc/nebula-importer/tree/release-v2.0.0-ga)版本(commit id)| +|Nebula Graph版本|[Importer](https://github.com/vesoft-inc/nebula-importer/tree/{{importer.branch}})版本(commit id)| |:---|:---| -| {{ nebula.release }} | {{importer.release}}(TODO:coding) | +| {{ nebula.release }} | {{importer.release}}(5c7417d) | ## Nebula Spark Connector Nebula Spark Connector是一个Spark连接器,提供通过Spark标准形式读写Nebula Graph数据的能力。Nebula Spark Connector由Reader和Writer两部分组成。详情请参见[什么是Nebula Spark Connector](../nebula-spark-connector.md)。 -|Nebula Graph版本|[Spark Connector](https://github.com/vesoft-inc/nebula-spark-utils/tree/v2.5/nebula-spark-connector)版本(commit id)| +|Nebula Graph版本|[Spark Connector](https://github.com/vesoft-inc/nebula-spark-utils/tree/{{sparkconnector.branch}}/nebula-spark-connector)版本(commit id)| |:---|:---| -| {{ nebula.release }} | {{sparkconnector.release}}(TODO:coding) | +| {{ nebula.release }} | {{sparkconnector.release}}(3c0f4c6) | ## Nebula Flink Connector Nebula Flink Connector是一款帮助Flink用户快速访问Nebula Graph的连接器,支持从Nebula Graph图数据库中读取数据,或者将其他外部数据源读取的数据写入Nebula Graph图数据库。详情请参见[什么是Nebula Flink Connector](../nebula-flink-connector.md)。 -|Nebula Graph版本|[Flink Connector](https://github.com/vesoft-inc/nebula-flink-connector)版本(commit id)| +|Nebula Graph版本|[Flink Connector](https://github.com/vesoft-inc/nebula-flink-connector/tree/{{flinkconnector.branch}})版本(commit id)| |:---|:---| -| {{ nebula.release }} | {{flinkconnector.release}}(TODO:coding) | +| {{ nebula.release }} | {{flinkconnector.release}}(49b8f3d) | ## Nebula Algorithm Nebula Algorithm(简称Algorithm)是一款基于[GraphX](https://spark.apache.org/graphx/)的Spark应用程序,通过提交Spark任务的形式使用完整的算法工具对Nebula Graph数据库中的数据执行图计算,也可以通过编程形式调用lib库下的算法针对DataFrame执行图计算。详情请参见[什么是Nebula Algorithm](../nebula-algorithm.md)。 -|Nebula Graph版本|[Algorithm](https://github.com/vesoft-inc/nebula-spark-utils/tree/v2.5/nebula-algorithm)版本(commit id)| +|Nebula Graph版本|[Algorithm](https://github.com/vesoft-inc/nebula-spark-utils/tree/{{algorithm.branch}}/nebula-algorithm)版本(commit id)| |:---|:---| -| {{ nebula.release }} | {{algorithm.release}}(TODO:coding) | +| {{ nebula.release }} | {{algorithm.release}}(3c0f4c6) | ## Nebula Console @@ -103,7 +100,7 @@ Nebula Console是Nebula Graph的原生CLI客户端。如何使用请参见[连 |Nebula Graph版本|[Console](https://github.com/vesoft-inc/nebula-console)版本(commit id)| |:---|:---| -| {{ nebula.release }} | {{console.release}}(TODO:coding) | +| {{ nebula.release }} | {{console.release}}(3ce5151) | ## Nebula Docker Compose @@ -111,8 +108,9 @@ Docker Compose可以快速部署Nebula Graph集群。如何使用请参见[Docke |Nebula Graph版本|[Docker Compose](https://github.com/vesoft-inc/nebula-docker-compose/tree/master)版本(commit id)| |:---|:---| -| {{ nebula.release }} | {{dockercompose.release}}(TODO:coding) | +| {{ nebula.release }} | {{dockercompose.release}}(d42231f) | + -## Benchmark +## Nebula Bench -[Benchmark](https://github.com/vesoft-inc/nebula-bench) 用于测试 nebula-graph 的基线性能数据,使用 LDBC v0.3.3 的标准数据集。 +[Nebula Bench](https://github.com/vesoft-inc/nebula-bench) 用于测试Nebula Graph的基线性能数据,使用LDBC v0.3.3的标准数据集。 -|Nebula Graph版本|[Benchmark](https://github.com/vesoft-inc/nebula-bench)版本(commit id)| +|Nebula Graph版本|[Nebula Bench](https://github.com/vesoft-inc/nebula-bench)版本(commit id)| |:---|:---| -| {{ nebula.release }} | {{br.release}}(TODO:coding) | - -## Dashboard - -[Dashboard](https://github.com/vesoft-inc/nebula-stats-exporter) 是一款用于监控Nebula Graph集群中机器和服务状态的可视化工具。 - -|Nebula Graph版本|[Dashboard](https://github.com/vesoft-inc/nebula-stats-exporter)版本(commit id)| -|:---|:---| -| {{ nebula.release }} | {{dashboard.release}}(TODO:coding) | - +| {{ nebula.release }} | {{bench.release}}(661f871) | ## API、SDK @@ -146,10 +136,10 @@ Docker Compose可以快速部署Nebula Graph集群。如何使用请参见[Docke |Nebula Graph版本| 语言(commit id) | |:---| :--- | -| {{ nebula.release }}| [C++](https://github.com/vesoft-inc/nebula-cpp)(TODO:coding) | -| {{ nebula.release }}| [Go](https://github.com/vesoft-inc/nebula-go)(TODO:coding) | -| {{ nebula.release }}| [Python](https://github.com/vesoft-inc/nebula-python)(TODO:coding) | -| {{ nebula.release }}| [Java Client](https://github.com/vesoft-inc/nebula-java)(TODO:coding) | +| {{ nebula.release }}| [C++](https://github.com/vesoft-inc/nebula-cpp)(00e2625) | +| {{ nebula.release }}| [Go](https://github.com/vesoft-inc/nebula-go/tree/{{go.branch}})(8a1495a) | +| {{ nebula.release }}| [Python](https://github.com/vesoft-inc/nebula-python)(98e08e4) | +| {{ nebula.release }}| [Java Client](https://github.com/vesoft-inc/nebula-java/tree/{{java.branch}})(0fbc3c6) | ## 未发布 diff --git a/docs-2.0/20.appendix/mind-map.md b/docs-2.0/20.appendix/mind-map.md index 90880132d74..6ffd967fa3a 100644 --- a/docs-2.0/20.appendix/mind-map.md +++ b/docs-2.0/20.appendix/mind-map.md @@ -1,9 +1,9 @@ # 思维导图 -以下给出 Nebula Graph 结构框架的思维导图,用户可以 [点击](https://mubu.com/app/edit/clb/3aWAh5H6Xt#m) 并查看大图。 +以下给出 Nebula Graph 结构框架的思维导图,用户可以 [点击](https://www.mubucm.com/doc/34QEdbrFRwZ) 并查看大图。 ![nebula graph](../20.appendix/Unknown-2.png) -以下给出 nGQL 的思维导图,用户可以 [点击](https://mubu.com/app/edit/clb/1jZHkcX_6DJ#m) 并查看大图。 +以下给出 nGQL 的思维导图,用户可以 [点击](https://www.mubucm.com/doc/3heEUeLwbMZ) 并查看大图。 -![nebula nGQL](../20.appendix/Unknown-3.png) \ No newline at end of file +![nebula nGQL](../20.appendix/Unknown-3.png) diff --git a/docs-2.0/20.appendix/releasenote.md b/docs-2.0/20.appendix/releasenote.md new file mode 100644 index 00000000000..c69461f543e --- /dev/null +++ b/docs-2.0/20.appendix/releasenote.md @@ -0,0 +1,71 @@ +# Nebula Graph {{ nebula.release }} release notes + +## Feature + +- 支持session管理。[#280](https://github.com/vesoft-inc/nebula-graph/pull/280) +- 支持慢查询终止,已知问题:所以query的查询与终止都会有延迟,这与实现方案有关。[#1152](https://github.com/vesoft-inc/nebula-graph/pull/1152) +- Lookup语句增强表达式解析索引的能力。[#1188](https://github.com/vesoft-inc/nebula-graph/pull/1188) +- 支持配置机器内存水位,一定程度上缓解OOM的问题。[1067](https://github.com/vesoft-inc/nebula-graph/pull/1067) +- Find Path支持边过滤。[#1091](https://github.com/vesoft-inc/nebula-graph/pull/1091) +- Subgraph支持只返回图结构,不包含属性。[#1134](https://github.com/vesoft-inc/nebula-graph/pull/1134) +- timestamp函数支持无参数执行。[#515](https://github.com/vesoft-inc/nebula-common/pull/515) +- 支持查询各个服务的版本。[#944](https://github.com/vesoft-inc/nebula-graph/pull/944) +- index和TTL可以同时支持。[#382](https://github.com/vesoft-inc/nebula-storage/pull/382) +- 支持在指定属性创建全文索引。[#460](https://github.com/vesoft-inc/nebula-storage/pull/460) +- 创建space及schema支持comment。[#895](https://github.com/vesoft-inc/nebula-graph/pull/895) +- 支持全文索引重建。[#1123](https://github.com/vesoft-inc/nebula-graph/pull/1123) + +## Enhancement +- listener接口优化,支持获取全量数据,[#465](https://github.com/vesoft-inc/nebula-storage/pull/465)、[#484](https://github.com/vesoft-inc/nebula-storage/pull/484) +- meta的leader表重新组织。[#439](https://github.com/vesoft-inc/nebula-storage/pull/439) +- 增加DiskManager用于检查磁盘剩余容量。[#461](https://github.com/vesoft-inc/nebula-storage/pull/461) +- 优化raft的heartbeat实现。[#438](https://github.com/vesoft-inc/nebula-storage/pull/438) +- storage支持并发执行go/fetch/lookup。 [#503](https://github.com/vesoft-inc/nebula-storage/pull/503) +- 加强了exists函数对map的支持。[#973](https://github.com/vesoft-inc/nebula-graph/pull/973) +- 加强聚合函数的使用方式,比如COUNT(v)+AVG(v)。[#968](https://github.com/vesoft-inc/nebula-graph/pull/968) + +## Bug fix + +- 权限导致的多语句执行问题。[#1165](https://github.com/vesoft-inc/nebula-graph/pull/1165) +- 修复unwind导致没有结果的问题。[#1018](https://github.com/vesoft-inc/nebula-graph/pull/1018) +- 修复聚合函数在某些场景下导致的crash问题。[#1015](https://github.com/vesoft-inc/nebula-graph/pull/1015) +- 修复OR表达式在索引匹配中的问题。[#1005](https://github.com/vesoft-inc/nebula-graph/pull/1005) +- 修复函数的大小写敏感问题。[#927](https://github.com/vesoft-inc/nebula-graph/issues/927) +- 修复查询索引创建信息时没有检查tag/edge类型的问题。[#933](https://github.com/vesoft-inc/nebula-graph/pull/933) +- 修复substring函数的bug。[#491](https://github.com/vesoft-inc/nebula-common/pull/491) +- 修复meta不能正确返回leader change。[#423](https://github.com/vesoft-inc/nebula-storage/pull/423) +- 修复LIMIT,ORDER,GROUP语句使用变量的问题。[#1314](https://github.com/vesoft-inc/nebula-graph/pull/1314) +- 修复db_dump工具打印int类型VID的问题。[#533](https://github.com/vesoft-inc/nebula-storage/pull/533) +- 修复balance任务恢复后仍显示FAIL的问题。[#528](https://github.com/vesoft-inc/nebula-storage/pull/528) + +## Changes & Known issues + +- Subgraph语法变化。 + + ```ngql + # 2.5.0版本增加WITH PROP关键字用于输出属性 + GET SUBGRAPH WITH PROP FROM + + # 原有语法将只输出图结构 + GET SUBGRAPH FROM # + ``` + +- 在`ORDER BY`命令后必须使用引用符`$-.`。但在更早的版本中不需要。 + + ```ngql + # 2.5.0版本的ORDER BY命令后需要使用引用符`$-.`。 + nebula> LOOKUP ON player \ + YIELD player.age As playerage \ + | GROUP BY $-.playerage \ + YIELD $-.playerage as age, count(*) AS number \ + | ORDER BY $-.number DESC, $-.age DESC; + + # 之前版本不需要使用引用符`$-.`。 + nebula> LOOKUP ON player \ + YIELD player.age As playerage \ + | GROUP BY $-.playerage \ + YIELD $-.playerage as age, count(*) AS number \ + | ORDER BY number DESC, age DESC; + ``` + +该版本已知bug/issue请参见[issues](https://github.com/vesoft-inc/nebula-graph/issues)。 diff --git a/docs-2.0/3.ngql-guide/1.nGQL-overview/1.overview.md b/docs-2.0/3.ngql-guide/1.nGQL-overview/1.overview.md index aa008801af1..4e7e3ebc4ba 100644 --- a/docs-2.0/3.ngql-guide/1.nGQL-overview/1.overview.md +++ b/docs-2.0/3.ngql-guide/1.nGQL-overview/1.overview.md @@ -2,7 +2,7 @@ nGQL(Nebula Graph Query Language)是Nebula Graph使用的的声明式图查询语言,支持灵活高效的[图模式](3.graph-patterns.md),而且nGQL是为开发和运维人员设计的类SQL查询语言,易于学习。 -nGQL是一个进行中的项目,会持续发布新特性和优化,因此可能会出现语法和实际操作不一致的问题,如果遇到此类问题,请提交[issue](https://github.com/vesoft-inc/nebula/issues)通知Nebula Graph团队。Nebula Graph 2.0及更新版本将支持[openCypher 9](https://www.opencypher.org/resources)。 +nGQL是一个进行中的项目,会持续发布新特性和优化,因此可能会出现语法和实际操作不一致的问题,如果遇到此类问题,请提交[issue](https://github.com/vesoft-inc/nebula/issues)通知Nebula Graph团队。Nebula Graph 2.0及更新版本正在支持[openCypher 9](https://www.opencypher.org/resources)。 ## nGQL可以做什么 @@ -64,7 +64,7 @@ nebula> CREATE TAG player(name string, age int); ## 关于openCypher兼容性 -## 原生 nGQL 和 openCypher 的关系 +### 原生 nGQL 和 openCypher 的关系 原生 nGQL 是由 Nebula Graph 自行创造和实现的图查询语言。OpenCypher 是由 openCypher Implementers Group 组织所开源和维护的图查询语言, @@ -72,13 +72,22 @@ nebula> CREATE TAG player(name string, age int); !!! Note - `nGQL 语言` = `原生 nGQL 语句` + `OpenCypher 兼容语句` + `nGQL 语言` = `原生 nGQL 语句` + `openCypher 兼容语句` -### nGQL完全兼容openCypher 9吗? +!!! Danger "行为未定义" -!!! compatibility "nGQL部分兼容openCypher 9" + 不要在同一个复合语句中,同时使用`原生 nGQL 语句`和`openCypher 兼容语句`,其行为是未定义的。 - 在[Nebula Graph Issues](https://github.com/vesoft-inc/nebula/issues?q=is%3Aissue+is%3Aopen+label%3Aincompatible)中已经列出已知的37处不兼容项。如果发现这种类型的新问题,请提交问题并附带`incompatible`标签。在本文搜索"compatibility"或者“兼容性”查看具体不兼容细节。 +### nGQL 完全兼容 openCypher 9吗? + +不。 + +!!! compatibility "nGQL 部分兼容 openCypher 9 的 DQL" + + nGQL 设计目标为兼容部分 DQL (match)。不计划兼容任何 DDL,DML,DCL。 + + 在[Nebula Graph Issues](https://github.com/vesoft-inc/nebula/issues?q=is%3Aissue+is%3Aopen+label%3Aincompatible)中已经列出已知的多处不兼容项。如果发现这种类型的新问题,请提交问题并附带`incompatible`标签。在本文搜索"compatibility"或者“兼容性”查看具体不兼容细节。 + ### nGQL和openCypher 9的主要差异有哪些? diff --git a/docs-2.0/3.ngql-guide/1.nGQL-overview/3.graph-patterns.md b/docs-2.0/3.ngql-guide/1.nGQL-overview/3.graph-patterns.md index fdc62bcbdf9..2ca32a0769a 100644 --- a/docs-2.0/3.ngql-guide/1.nGQL-overview/3.graph-patterns.md +++ b/docs-2.0/3.ngql-guide/1.nGQL-overview/3.graph-patterns.md @@ -1,6 +1,6 @@ # 模式 -模式(pattern)和图模式匹配,是图查询语言的核心,本文介绍Nebula Graph的各种模式。 +模式(pattern)和图模式匹配,是图查询语言的核心功能,本文介绍 Nebula Graph 设计的各种模式,部分还未实现。 ## 单点模式 @@ -56,7 +56,7 @@ !!! compatibility "openCypher兼容性" - nGQL中的`MATCH`语句尚不支持用`(a:User:Admin)`匹配多个标签。如需匹配多标签可使用过滤条件,如`WHERE "User" IN tags(n) AND "Admin" IN tags(n)`。 + nGQL中的`MATCH`语句不支持用`(a:User:Admin)`匹配多个标签。如需匹配多标签可使用过滤条件,如`WHERE "User" IN tags(n) AND "Admin" IN tags(n)`。 ## 属性模式 diff --git a/docs-2.0/3.ngql-guide/1.nGQL-overview/ngql-style-guide.md b/docs-2.0/3.ngql-guide/1.nGQL-overview/ngql-style-guide.md index d60b0efc90c..9bb1d319fe4 100644 --- a/docs-2.0/3.ngql-guide/1.nGQL-overview/ngql-style-guide.md +++ b/docs-2.0/3.ngql-guide/1.nGQL-overview/ngql-style-guide.md @@ -103,6 +103,20 @@ nGQL没有严格的构建格式要求,但根据恰当而统一的风格创建n RETURN v; ``` +3. 语法关键词大写,变量小写。 + + 不推荐: + + ```ngql + go from "player100" over Follow + ``` + + 推荐: + + ```ngql + GO FROM "player100" OVER follow + ``` + ## Pattern 1. 分行写Pattern时,在表示边的箭头右侧换行,而不是左侧。 diff --git a/docs-2.0/3.ngql-guide/10.tag-statements/1.create-tag.md b/docs-2.0/3.ngql-guide/10.tag-statements/1.create-tag.md index 930febf8dd1..4a92d30590c 100644 --- a/docs-2.0/3.ngql-guide/10.tag-statements/1.create-tag.md +++ b/docs-2.0/3.ngql-guide/10.tag-statements/1.create-tag.md @@ -33,7 +33,7 @@ CREATE TAG [IF NOT EXISTS] |`IF NOT EXISTS`|检测待创建的Tag是否存在,只有不存在时,才会创建Tag。仅检测Tag的名称,不会检测具体属性。| |``|每个图空间内的Tag必须是唯一的。Tag名称设置后无法修改。Tag名称由大小写英文字母、数字或下划线组成,区分大写小,且不可使用[关键字和保留字](../../3.ngql-guide/1.nGQL-overview/keywords-and-reserved-words.md)。| |``|属性名称。每个Tag中的属性名称必须唯一。属性的命名规则与Tag相同。| -|``|属性的数据类型。数据类型的完整说明,请参见[数值类型](../3.data-types/1.numeric.md)、[布尔](../3.data-types/2.boolean.md)等文档。| +|``|属性的数据类型,目前支持[数值](../3.data-types/1.numeric.md)、[布尔](../3.data-types/2.boolean.md)、[字符串](../3.data-types/3.string.md)以及[日期与时间](../3.data-types/4.date-and-time.md)。| |`NULL \| NOT NULL`|指定属性值是否支持为`NULL`。默认值为`NULL`。| |`DEFAULT`|指定属性的默认值。默认值可以是一个文字值或Nebula Graph支持的表达式。如果插入点时没有指定某个属性的值,则使用默认值。| |`COMMENT`|对单个属性或Tag的描述。最大为256字节。默认无描述。| diff --git a/docs-2.0/3.ngql-guide/11.edge-type-statements/1.create-edge.md b/docs-2.0/3.ngql-guide/11.edge-type-statements/1.create-edge.md index 13e19339141..3ba88807761 100644 --- a/docs-2.0/3.ngql-guide/11.edge-type-statements/1.create-edge.md +++ b/docs-2.0/3.ngql-guide/11.edge-type-statements/1.create-edge.md @@ -33,7 +33,7 @@ CREATE EDGE [IF NOT EXISTS] |`IF NOT EXISTS`|检测待创建的Edge type是否存在,只有不存在时,才会创建Edge type。仅检测Edge type的名称,不会检测具体属性。| |``|每个图空间内的Edge type必须是唯一的。Edge type名称设置后无法修改。Edge type名称由大小写英文字母、数字或下划线组成,区分大写小,且不可使用[关键字和保留字](../../3.ngql-guide/1.nGQL-overview/keywords-and-reserved-words.md)。| |``|属性名称。每个Edge type中的属性名称必须唯一。属性的命名规则与Edge type相同。| -|``|属性的数据类型。数据类型的完整说明,请参见[数值类型](../3.data-types/1.numeric.md)、[布尔](../3.data-types/2.boolean.md)等文档。| +|``|属性的数据类型,目前支持[数值](../3.data-types/1.numeric.md)、[布尔](../3.data-types/2.boolean.md)、[字符串](../3.data-types/3.string.md)以及[日期与时间](../3.data-types/4.date-and-time.md)。| |`NULL \| NOT NULL`|指定属性值是否支持为`NULL`。默认值为`NULL`。| |`DEFAULT`|指定属性的默认值。默认值可以是一个文字值或Nebula Graph支持的表达式。如果插入边时没有指定某个属性的值,则使用默认值。| |`COMMENT`|对单个属性或Edge type的描述。最大为256字节。默认无描述。| diff --git a/docs-2.0/3.ngql-guide/13.edge-statements/3.upsert-edge.md b/docs-2.0/3.ngql-guide/13.edge-statements/3.upsert-edge.md index 2119d0b0c0d..78fd063e82f 100644 --- a/docs-2.0/3.ngql-guide/13.edge-statements/3.upsert-edge.md +++ b/docs-2.0/3.ngql-guide/13.edge-statements/3.upsert-edge.md @@ -106,7 +106,7 @@ nebula> UPSERT EDGE on serve \ 上面最后一个示例中,因为`end_year`没有默认值,插入边时,`end_year`默认值为`NULL`,执行`end_year = end_year + 1`后仍为`NULL`。如果`end_year`有默认值,则`end_year = end_year + 1`可以正常执行,例如: ```ngql -nebula> CREATE EDGE serve_with_default(start_year int, end_year DEFAULT 2010); +nebula> CREATE EDGE serve_with_default(start_year int, end_year int DEFAULT 2010); Execution succeeded nebula> UPSERT EDGE on serve_with_default \ diff --git a/docs-2.0/3.ngql-guide/14.native-index-statements/1.create-native-index.md b/docs-2.0/3.ngql-guide/14.native-index-statements/1.create-native-index.md index 50afad496ce..9bb3a0e35c8 100644 --- a/docs-2.0/3.ngql-guide/14.native-index-statements/1.create-native-index.md +++ b/docs-2.0/3.ngql-guide/14.native-index-statements/1.create-native-index.md @@ -12,11 +12,23 @@ `CREATE INDEX`语句用于对Tag、EdgeType或其属性创建原生索引。通常分别称为“Tag索引”、“Edge type索引”和“属性索引”。 -"Tag索引"和"Edge type索引"应用于和"Tag"、"Edge type"(自身)相关的查询,而不是"基于Tag上某属性"的查询。例如用 `LOOKUP` 找到"某种Edge type E"的所有的边。 +- Tag索引和Edge type索引应用于和Tag、Edge type自身相关的查询,例如用`LOOKUP`查找有Tag `player`的所有点。 -"属性索引"目的是"基于属性的查询"。例如基于属性`Age`找到`Age == 19`的所有的点VID。 - -如果已经为"某个Tag T的属性A"建立过属性索引`i_TA`,则没有必要对于`Tag T`额外再建立一个Tag索引`i_T`。这是因为查询引擎可以使用`i_TA`来替代`i_T`。Edge type索引同理。但是,`i_T`却不能替代`i_TA`用于属性查找。 +- “属性索引”应用于基于属性的查询,例如基于属性`age`找到`age == 19`的所有的点。 + +如果已经为Tag `T`的属性`A`建立过属性索引`i_TA`,索引之间的可替代关系如下(Edge type索引同理): + +- 查询引擎可以使用`i_TA`来替代`i_T`。 + +- 在`MATCH`语句中`i_T`不能替代`i_TA`用于属性查找。 + +- 在`LOOKUP`语句中`i_T`可能替代`i_TA`用于属性查找。 + + !!! compatibility "历史版本兼容性" + + 在此前的版本中,`LOOKUP`语句中的Tag或Edge type索引不可替代属性索引用于属性查找。 + +使用替代索引进行查询虽然能获得相同的结果,但查询性能会根据选择的索引有所区别。 !!! caution diff --git a/docs-2.0/3.ngql-guide/16.subgraph-and-path/1.get-subgraph.md b/docs-2.0/3.ngql-guide/16.subgraph-and-path/1.get-subgraph.md index 0ddf75ed3bf..56169573880 100644 --- a/docs-2.0/3.ngql-guide/16.subgraph-and-path/1.get-subgraph.md +++ b/docs-2.0/3.ngql-guide/16.subgraph-and-path/1.get-subgraph.md @@ -11,7 +11,7 @@ GET SUBGRAPH [WITH PROP] [ STEPS] FROM {, ...} [BOTH , ...]; ``` -- `WITH PROP`:展示边的属性。不添加本参数则隐藏边的属性。 +- `WITH PROP`:展示属性。不添加本参数则隐藏属性。 - `step_count`:指定从起始点开始的跳数,返回从0到`step_count`跳的子图。必须是非负整数。默认值为1。 @@ -33,13 +33,13 @@ GET SUBGRAPH [WITH PROP] [ STEPS] FROM {, ...} ```ngql nebula> GET SUBGRAPH 1 STEPS FROM "player100"; - +-------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ - | _vertices | _edges | - +-------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ - | [("player100" :player{age: 42, name: "Tim Duncan"})] | [[:follow "player100"->"player101" @0 {}], [:follow "player100"->"player102" @0 {}], [:serve "player100"->"team200" @0 {}]] | - +-------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ - | [("player102" :player{age: 33, name: "LaMarcus Aldridge"}), ("player101" :player{age: 36, name: "Tony Parker"}), ("team200" :team{name: "Warriors"})] | [[:follow "player102"->"player101" @0 {}]] | - +-------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ + | _vertices | _edges | + +-------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ + | [("player100" :player{})] | [[:serve "player100"->"team200" @0 {}], [:follow "player100"->"player101" @0 {}], [:follow "player100"->"player102" @0 {}]] | + +-------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ + | [("team200" :team{}), ("player101" :player{}), ("player102" :player{})] | [[:follow "player102"->"player101" @0 {}]] | + +-------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ ``` 返回的子图如下。 @@ -50,13 +50,13 @@ GET SUBGRAPH [WITH PROP] [ STEPS] FROM {, ...} ```ngql nebula> GET SUBGRAPH 1 STEPS FROM "player100" IN follow; - +------------------------------------------------------+--------+ - | _vertices | _edges | - +------------------------------------------------------+--------+ - | [("player100" :player{age: 42, name: "Tim Duncan"})] | [] | - +------------------------------------------------------+--------+ - | [] | [] | - +------------------------------------------------------+--------+ + +---------------------------+--------+ + | _vertices | _edges | + +---------------------------+--------+ + | [("player100" :player{})] | [] | + +---------------------------+--------+ + | [] | [] | + +---------------------------+--------+ ``` 因为`player100`没有`follow`类型的入边。所以仅返回点`player100`。 @@ -103,11 +103,11 @@ nebula> go 1 steps from "A" over follow; ```ngql nebula> GET SUBGRAPH 100 STEPS FROM "player141" OUT follow; -+-------------------------------------------------------+------------------------------------------------------+ -| _vertices | _edges | -+-------------------------------------------------------+------------------------------------------------------+ -| [("player141" :player{age: 43, name: "Ray Allen"})] | [[:follow "player141"->"player124" @0 {degree: 9}]] | -+-------------------------------------------------------+------------------------------------------------------+ -| [("player124" :player{age: 33, name: "Rajon Rondo"})] | [[:follow "player124"->"player141" @0 {degree: -1}]] | -+-------------------------------------------------------+------------------------------------------------------+ ++-------------------------------------------------------+--------------------------------------------+ +| _vertices | _edges | ++-------------------------------------------------------+--------------------------------------------+ +| [("player141" :player{age: 43, name: "Ray Allen"})] | [[:follow "player141"->"player124" @0 {}]] | ++-------------------------------------------------------+--------------------------------------------+ +| [("player124" :player{age: 33, name: "Rajon Rondo"})] | [[:follow "player124"->"player141" @0 {}]] | ++-------------------------------------------------------+--------------------------------------------+ ``` diff --git a/docs-2.0/3.ngql-guide/16.subgraph-and-path/2.find-path.md b/docs-2.0/3.ngql-guide/16.subgraph-and-path/2.find-path.md index 02f819f18df..18c679d10e8 100644 --- a/docs-2.0/3.ngql-guide/16.subgraph-and-path/2.find-path.md +++ b/docs-2.0/3.ngql-guide/16.subgraph-and-path/2.find-path.md @@ -20,13 +20,13 @@ OVER [REVERSELY | BIDIRECT] [] [UPTO STEPS] [ - `WITH PROP`:展示点和边的属性。不添加本参数则隐藏属性。 -- ``:点ID列表.多个点用英文逗号(,)分隔。支持`$-`和`$var`。 +- ``:点ID列表。多个点用英文逗号(,)分隔。支持`$-`和`$var`。 -- ``:Edge type列表.多个Edge type用英文逗号(,)分隔。`*`表示所有Edge type。 +- ``:Edge type列表。多个Edge type用英文逗号(,)分隔。`*`表示所有Edge type。 - `REVERSELY | BIDIRECT`:`REVERSELY`表示反向,`BIDIRECT`表示双向。 -- ``:可以使用`WHERE`子句过滤边属性。 +- ``:可以使用`WHERE`子句过滤边属性。 - ``:路径的最大跳数。默认值为`5`。 diff --git a/docs-2.0/3.ngql-guide/18.operation-and-maintenance-statements/4.job-statements.md b/docs-2.0/3.ngql-guide/18.operation-and-maintenance-statements/4.job-statements.md index c00dd4ed43c..1baa86d5e9c 100644 --- a/docs-2.0/3.ngql-guide/18.operation-and-maintenance-statements/4.job-statements.md +++ b/docs-2.0/3.ngql-guide/18.operation-and-maintenance-statements/4.job-statements.md @@ -4,7 +4,7 @@ ## SUBMIT JOB COMPACT -`SUBMIT JOB COMPACT语句`会触发RocksDB的长耗时`compact`操作。 +`SUBMIT JOB COMPACT` 语句会触发 RocksDB 的长耗时 `compact` 操作。 `compact`配置详情请参见[Storage服务配置](../../5.configurations-and-logs/1.configurations/4.storage-config.md)。 @@ -168,4 +168,4 @@ nebula> RECOVER JOB; ```bash curl "http://{storaged-ip}:19779/admin?space={space_name}&op=compact" -``` \ No newline at end of file +``` diff --git a/docs-2.0/3.ngql-guide/3.data-types/3.string.md b/docs-2.0/3.ngql-guide/3.data-types/3.string.md index 9f41bfe09c5..59b9157a2fe 100644 --- a/docs-2.0/3.ngql-guide/3.data-types/3.string.md +++ b/docs-2.0/3.ngql-guide/3.data-types/3.string.md @@ -33,7 +33,10 @@ nGQL支持以如下方式使用字符串: nebula> CREATE TAG t2 (p2 STRING); ``` -在写入定长字符串时,如果尝试写入的字符串超出长度限制,Nebula Graph将截断字符串,仅存入符合长度限制的部分。例如,当一个图空间的VID类型为`FIXED_STRING(8)`时,如果尝试将`A_string_with_27_characters`设置为VID,然后使用nGQL命令查询该VID,获取到的只有`A_string`。 +如果尝试写入的定长字符串超出长度限制: + +- 当该定长字符串为属性值时,写入会成功,Nebula Graph将截断字符串,仅存入符合长度限制的部分。 +- 当该定长字符串为VID时,写入会失败,Nebula Graph将报错。 ## 转义字符 diff --git a/docs-2.0/3.ngql-guide/3.data-types/4.date-and-time.md b/docs-2.0/3.ngql-guide/3.data-types/4.date-and-time.md index e7e14dd75af..3a7946eeee2 100644 --- a/docs-2.0/3.ngql-guide/3.data-types/4.date-and-time.md +++ b/docs-2.0/3.ngql-guide/3.data-types/4.date-and-time.md @@ -129,11 +129,11 @@ ```ngql nebula> WITH time({hour: 12, minute: 31, second: 14}) AS d RETURN d; -+--------------+ -| d | -+--------------+ -| 12:31:14.000 | -+--------------+ ++-----------------+ +| d | ++-----------------+ +| 12:31:14.000000 | ++-----------------+ nebula> WITH date({year: 1984, month: 10, day: 11}) AS x RETURN x + 1; +------------+ diff --git a/docs-2.0/3.ngql-guide/3.data-types/6.list.md b/docs-2.0/3.ngql-guide/3.data-types/6.list.md index 2caad21acf5..489bf92ba5a 100644 --- a/docs-2.0/3.ngql-guide/3.data-types/6.list.md +++ b/docs-2.0/3.ngql-guide/3.data-types/6.list.md @@ -217,6 +217,6 @@ nebula> MATCH p = (n:player{name:"Tim Duncan"})-[:follow]->(m) \ - 复合数据类型(例如set、map、list)**不能**存储为点或边的属性。 - + 建议修改图建模方式:将复合数据类型建模为点的邻边,而不是该点的自身属性,每条邻边可以动态增删,并且可以设置邻边的 Rank 值来控制邻边的顺序。 + - 建议修改图建模方式:将复合数据类型建模为点的邻边,而不是该点的自身属性,每条邻边可以动态增删,并且可以设置邻边的 Rank 值来控制邻边的顺序。 - List中不支持pattern,例如 `[(src)-[]->(m) | m.name]`。 diff --git a/docs-2.0/3.ngql-guide/4.variable-and-composite-queries/1.composite-queries.md b/docs-2.0/3.ngql-guide/4.variable-and-composite-queries/1.composite-queries.md index 0eefb360805..eefeadaa195 100644 --- a/docs-2.0/3.ngql-guide/4.variable-and-composite-queries/1.composite-queries.md +++ b/docs-2.0/3.ngql-guide/4.variable-and-composite-queries/1.composite-queries.md @@ -14,10 +14,15 @@ Nebula Graph支持三种方式进行复合查询(或子查询): 在复合查询中,请**不要**混用opencypher兼容语句和原生nGQL语句,例如`MATCH ... | GO ... | YIELD ...`,混用两种语句,行为是未定义的。 -- 如果使用opencypher兼容语句(`MATCH`、`RETURN`、`WITH`等),请不要使用管道符或分号组合子句。 +- 如果使用openCypher兼容语句(`MATCH`、`RETURN`、`WITH`等),请不要使用管道符或分号组合子句。 - 如果使用原生nGQL语句(`FETCH`、`GO`、`LOOKUP`等),必须使用管道符或分号组合子句。 + +!!! Danger "行为未定义" + + 不要混用 openCypher 兼容语句和原生 nGQL语句,行为是未定义的。 + ## 复合查询不支持事务 例如一个查询由三个子查询A、B、C组成,A是一个读操作,B是一个计算操作,C是一个写操作,如果在执行过程中,任何一个操作执行失败,则整个结果是未定义的:没有回滚,而且写入的内容取决于执行程序。 diff --git a/docs-2.0/3.ngql-guide/4.variable-and-composite-queries/2.user-defined-variables.md b/docs-2.0/3.ngql-guide/4.variable-and-composite-queries/2.user-defined-variables.md index b0ddf1bb37d..0f005f75250 100644 --- a/docs-2.0/3.ngql-guide/4.variable-and-composite-queries/2.user-defined-variables.md +++ b/docs-2.0/3.ngql-guide/4.variable-and-composite-queries/2.user-defined-variables.md @@ -21,7 +21,7 @@ nebula> MATCH (v:player{name:"Tim Duncan"}) RETURN v; nGQL扩展的自定义变量可以表示为`$var_name`,`var_name`由字母、数字或下划线(_)构成,不允许使用其他字符。 -自定义变量仅在当前执行有效,执行结束后变量也会释放,**不能**在其他客户端或执行中使用之前的自定义变量。 +自定义变量仅在当前执行(本复合查询中)有效,执行结束后变量也会释放,**不能**在其他客户端、执行、session中使用之前的自定义变量。 用户可以在复合查询中使用自定义变量。复合查询的详细信息请参见[复合查询](1.composite-queries.md)。 @@ -33,8 +33,8 @@ nGQL扩展的自定义变量可以表示为`$var_name`,`var_name`由字母、 ```ngql nebula> $var = GO FROM "player100" OVER follow YIELD follow._dst AS id; \ -GO FROM $var.id OVER serve YIELD $$.team.name AS Team, \ -$^.player.name AS Player; + GO FROM $var.id OVER serve YIELD $$.team.name AS Team, \ + $^.player.name AS Player; +---------+-------------+ | Team | Player | +---------+-------------+ diff --git a/docs-2.0/3.ngql-guide/4.variable-and-composite-queries/3.property-reference.md b/docs-2.0/3.ngql-guide/4.variable-and-composite-queries/3.property-reference.md index 11365a1a412..33a82c0bca7 100644 --- a/docs-2.0/3.ngql-guide/4.variable-and-composite-queries/3.property-reference.md +++ b/docs-2.0/3.ngql-guide/4.variable-and-composite-queries/3.property-reference.md @@ -53,8 +53,8 @@ $$.. |:----------|:------------------| |`_src`|边的起始点 | |`_dst`|边的目的点| -|`_type`|边的类型内部编码,正负号表示方向| -|`_rank`|边的rank值| +|`_type`|边的类型内部编码,正负号表示方向:正数为正向边,负数为逆向边| +|`_rank`|边的 rank 值| ## 示例 @@ -79,7 +79,7 @@ nebula> GO FROM "player100" OVER follow YIELD follow.degree; | 90 | +---------------+ -# 返回Edge type follow的起始点、目的点、Edge type编码和边rank值。 +# 返回EdgeType 是 follow 的起始点 VID、目的点 VID、EdgeType 编码(正数为正向边,负数为逆向边),和边的 rank 值。 nebula> GO FROM "player100" OVER follow YIELD follow._src, follow._dst, follow._type, follow._rank; +-------------+-------------+--------------+--------------+ | follow._src | follow._dst | follow._type | follow._rank | diff --git a/docs-2.0/3.ngql-guide/5.operators/4.pipe.md b/docs-2.0/3.ngql-guide/5.operators/4.pipe.md index 4906fd9f580..997a7c26f6c 100644 --- a/docs-2.0/3.ngql-guide/5.operators/4.pipe.md +++ b/docs-2.0/3.ngql-guide/5.operators/4.pipe.md @@ -18,8 +18,8 @@ nGQL和SQL之间的一个主要区别是子查询的组成方式。 ```ngql nebula> GO FROM "player100" OVER follow \ -YIELD follow._dst AS dstid, $$.player.name AS Name | \ -GO FROM $-.dstid OVER follow; + YIELD follow._dst AS dstid, $$.player.name AS Name | \ + GO FROM $-.dstid OVER follow; +-------------+ | follow._dst | diff --git a/docs-2.0/3.ngql-guide/5.operators/6.set.md b/docs-2.0/3.ngql-guide/5.operators/6.set.md index eab4d94fd65..d7edceb037c 100644 --- a/docs-2.0/3.ngql-guide/5.operators/6.set.md +++ b/docs-2.0/3.ngql-guide/5.operators/6.set.md @@ -25,8 +25,8 @@ ```ngql # 返回两个查询结果的并集,不包含重复的元素。 nebula> GO FROM "player102" OVER follow \ - UNION \ - GO FROM "player100" OVER follow; + UNION \ + GO FROM "player100" OVER follow; +-------------+ | follow._dst | +-------------+ @@ -37,8 +37,8 @@ nebula> GO FROM "player102" OVER follow \ # 返回两个查询结果的并集,包含重复的元素。 nebula> GO FROM "player102" OVER follow \ - UNION ALL \ - GO FROM "player100" OVER follow; + UNION ALL \ + GO FROM "player100" OVER follow; +-------------+ | follow._dst | +-------------+ diff --git a/docs-2.0/3.ngql-guide/5.operators/7.string.md b/docs-2.0/3.ngql-guide/5.operators/7.string.md index a73dd9cb9fe..a1b45669b68 100644 --- a/docs-2.0/3.ngql-guide/5.operators/7.string.md +++ b/docs-2.0/3.ngql-guide/5.operators/7.string.md @@ -40,7 +40,7 @@ nebula> UNWIND 'a' AS a UNWIND 'b' AS b RETURN a + b; ```ngql nebula> MATCH (s:player)-[e:serve]->(t:team) WHERE id(s) == "player101" \ - AND t.name CONTAINS "ets" RETURN s.name, e.start_year, e.end_year, t.name; + AND t.name CONTAINS "ets" RETURN s.name, e.start_year, e.end_year, t.name; +---------------+--------------+------------+-----------+ | s.name | e.start_year | e.end_year | t.name | +---------------+--------------+------------+-----------+ @@ -48,8 +48,8 @@ nebula> MATCH (s:player)-[e:serve]->(t:team) WHERE id(s) == "player101" \ +---------------+--------------+------------+-----------+ nebula> GO FROM "player101" OVER serve WHERE (STRING)serve.start_year CONTAINS "19" AND \ - $^.player.name CONTAINS "ny" \ - YIELD $^.player.name, serve.start_year, serve.end_year, $$.team.name; + $^.player.name CONTAINS "ny" \ + YIELD $^.player.name, serve.start_year, serve.end_year, $$.team.name; +----------------+------------------+----------------+--------------+ | $^.player.name | serve.start_year | serve.end_year | $$.team.name | +----------------+------------------+----------------+--------------+ @@ -57,7 +57,7 @@ nebula> GO FROM "player101" OVER serve WHERE (STRING)serve.start_year CONTAINS " +----------------+------------------+----------------+--------------+ nebula> GO FROM "player101" OVER serve WHERE !($$.team.name CONTAINS "ets") \ - YIELD $^.player.name, serve.start_year, serve.end_year, $$.team.name; + YIELD $^.player.name, serve.start_year, serve.end_year, $$.team.name; +----------------+------------------+----------------+--------------+ | $^.player.name | serve.start_year | serve.end_year | $$.team.name | +----------------+------------------+----------------+--------------+ @@ -68,11 +68,11 @@ nebula> GO FROM "player101" OVER serve WHERE !($$.team.name CONTAINS "ets") \ ### `(NOT) IN` ```ngql -nebula> RETURN 1 IN [1,2,3], "Yao" NOT IN ["Yi", "Tim", "Kobe"], NULL in ["Yi", "Tim", "Kobe"] +nebula> RETURN 1 IN [1,2,3], "Yao" NOT IN ["Yi", "Tim", "Kobe"], NULL IN ["Yi", "Tim", "Kobe"] +----------------+------------------------------------+-------------------------------+ | (1 IN [1,2,3]) | ("Yao" NOT IN ["Yi","Tim","Kobe"]) | (NULL IN ["Yi","Tim","Kobe"]) | +----------------+------------------------------------+-------------------------------+ -| true | true | false | +| true | true | __NULL__ | +----------------+------------------------------------+-------------------------------+ ``` diff --git a/docs-2.0/3.ngql-guide/5.operators/8.list.md b/docs-2.0/3.ngql-guide/5.operators/8.list.md index 87f5fc36045..98ae11abbc0 100644 --- a/docs-2.0/3.ngql-guide/5.operators/8.list.md +++ b/docs-2.0/3.ngql-guide/5.operators/8.list.md @@ -29,7 +29,7 @@ nebula> RETURN NULL IN [NULL, 1]; +--------------------+ | (NULL IN [NULL,1]) | +--------------------+ -| true | +| __NULL__ | +--------------------+ nebula> WITH [2, 3, 4, 5] AS numberlist \ diff --git a/docs-2.0/3.ngql-guide/6.functions-and-expressions/3.date-and-time.md b/docs-2.0/3.ngql-guide/6.functions-and-expressions/3.date-and-time.md index 2a75abd54e7..cef9d856cc6 100644 --- a/docs-2.0/3.ngql-guide/6.functions-and-expressions/3.date-and-time.md +++ b/docs-2.0/3.ngql-guide/6.functions-and-expressions/3.date-and-time.md @@ -21,10 +21,10 @@ Nebula Graph支持以下内置日期时间函数。 ## 示例 ```ngql -> RETURN now(), timestamp(), date(), time(), datetime(), timestamp(); +> RETURN now(), timestamp(), date(), time(), datetime(); +------------+-------------+------------+-----------------+----------------------------+ | now() | timestamp() | date() | time() | datetime() | +------------+-------------+------------+-----------------+----------------------------+ | 1625470028 | 1625470028 | 2021-07-05 | 07:27:07.944000 | 2021-07-05T07:27:07.944000 | +------------+-------------+------------+-----------------+----------------------------+ -``` \ No newline at end of file +``` diff --git a/docs-2.0/3.ngql-guide/6.functions-and-expressions/6.list.md b/docs-2.0/3.ngql-guide/6.functions-and-expressions/6.list.md index e93b2eede00..7a7dc216ae5 100644 --- a/docs-2.0/3.ngql-guide/6.functions-and-expressions/6.list.md +++ b/docs-2.0/3.ngql-guide/6.functions-and-expressions/6.list.md @@ -55,7 +55,7 @@ nebula> MATCH p = (a:player)-[]->(b)-[]->(c:team) \ | [("player100" :player{age: 42, name: "Tim Duncan"}), ("player125" :player{age: 41, name: "Manu Ginobili"}), ("team204" :team{name: "Spurs"})] | +-----------------------------------------------------------------------------------------------------------------------------------------------+ -nebula> MATCH p = (a:player)-[]->(b)-[]->(c:team) WHERE a.name == "Tim Duncan" AND c.name == "Spurs" RETURN relationships(p) +nebula> MATCH p = (a:player)-[]->(b)-[]->(c:team) WHERE a.name == "Tim Duncan" AND c.name == "Spurs" RETURN relationships(p); +-----------------------------------------------------------------------------------------------------------------------------+ | relationships(p) | +-----------------------------------------------------------------------------------------------------------------------------+ diff --git a/docs-2.0/3.ngql-guide/6.functions-and-expressions/7.count.md b/docs-2.0/3.ngql-guide/6.functions-and-expressions/7.count.md index 5ed81fc4ff7..6fa5178aeaf 100644 --- a/docs-2.0/3.ngql-guide/6.functions-and-expressions/7.count.md +++ b/docs-2.0/3.ngql-guide/6.functions-and-expressions/7.count.md @@ -66,7 +66,7 @@ nebula> LOOKUP ON player \ YIELD player.age As playerage \ | GROUP BY $-.playerage \ YIELD $-.playerage as age, count(*) AS number \ - | ORDER BY number DESC, age DESC; + | ORDER BY $-.number DESC, $-.age DESC; +-----+--------+ | age | number | +-----+--------+ diff --git a/docs-2.0/3.ngql-guide/7.general-query-statements/2.match.md b/docs-2.0/3.ngql-guide/7.general-query-statements/2.match.md index 5fb9bcf3204..e0e8769dcc8 100644 --- a/docs-2.0/3.ngql-guide/7.general-query-statements/2.match.md +++ b/docs-2.0/3.ngql-guide/7.general-query-statements/2.match.md @@ -156,11 +156,11 @@ nebula> MATCH (v:player) WHERE v.name == "Tim Duncan" RETURN v; ```ngql nebula> MATCH (v) WHERE id(v) == 'player101' RETURN v; -+---------------------------------------------------+ -| v | -+---------------------------------------------------+ -| (player101) player.name:Tony Parker,player.age:36 | -+---------------------------------------------------+ ++-----------------------------------------------------+ +| v | ++-----------------------------------------------------+ +| ("player101" :player{age: 36, name: "Tony Parker"}) | ++-----------------------------------------------------+ ``` 要匹配多个点的ID,可以用`WHERE id(v) IN [vid_list]`。 @@ -716,6 +716,8 @@ nebula> MATCH p=(v:player{name:"Tim Duncan"})-[*..2]->(v2) \ +----------------------------------------------------------------------+--------+ ``` -## 性能提示 +!!! Performance -Nebula Graph {{ nebula.release }} 中 `MATCH` 语句未进行资源占用和性能调优。较简单的逻辑可以使用 `GO`, `LOOKUP`, `|` 和 `FETCH` 等来替代。 + Nebula Graph {{ nebula.release }} 中 `MATCH` 语句对性能和资源占用进行了初步优化。 + + 较简单的逻辑可以使用 `GO`, `LOOKUP`, `|` 和 `FETCH` 等来替代。 diff --git a/docs-2.0/3.ngql-guide/7.general-query-statements/3.go.md b/docs-2.0/3.ngql-guide/7.general-query-statements/3.go.md index 83f76750b17..906e3f3b97a 100644 --- a/docs-2.0/3.ngql-guide/7.general-query-statements/3.go.md +++ b/docs-2.0/3.ngql-guide/7.general-query-statements/3.go.md @@ -44,7 +44,7 @@ OVER [{REVERSELY | BIDIRECT}] - ``:遍历的Edge type列表。 -- `REVERSELY | BIDIRECT`:默认情况下检索的是``的出边,`REVERSELY`表示反向,即检索入边,`BIDIRECT`表示双向,即检索出边和入边。 +- `REVERSELY | BIDIRECT`:默认情况下检索的是``的出边(正向),`REVERSELY`表示反向,即检索入边;`BIDIRECT` 为双向,即检索正向和反向,通过返回 `._type` 字段判断方向,其正数为正向,负数为反向。 - `WHERE `:指定遍历的过滤条件。用户可以在起始点、目的点和边使用`WHERE`子句,还可以结合`AND`、`OR`、`NOT`、`XOR`一起使用。详情请参见[WHERE](../8.clauses-and-options/where.md)。 diff --git a/docs-2.0/3.ngql-guide/7.general-query-statements/5.lookup.md b/docs-2.0/3.ngql-guide/7.general-query-statements/5.lookup.md index 36c69b628e2..2023d438d1f 100644 --- a/docs-2.0/3.ngql-guide/7.general-query-statements/5.lookup.md +++ b/docs-2.0/3.ngql-guide/7.general-query-statements/5.lookup.md @@ -17,8 +17,14 @@ ## 注意事项 - 索引会导致写性能大幅降低(降低90%甚至更多)。请不要随意在生产环境中使用索引,除非很清楚使用索引对业务的影响。 - -- 如果查询时没有合适的索引,会退化为全表扫描。 + +- 如果用`LOOKUP`语句基于指定属性查询时该属性没有索引,系统会在可用的索引中随机选择一个。 + + 例如,Tag `player`有属性`name`和`age`,Tag `player`本身和属性`name`有索引,而属性`age`没有索引。当运行`LOOKUP ON player WHERE player.age == 36 YIELD player.name;`时,系统会在Tag `player`和属性`age`的索引中随机使用一个。 + + !!! compatibility "历史版本兼容性" + + 在此前的版本中,如果用`LOOKUP`语句基于指定属性查询时该属性没有索引,系统将报错,而不会使用其它索引。 ## 前提条件 @@ -27,7 +33,9 @@ ## 语法 ```ngql -LOOKUP ON { | } [WHERE [AND ...]] [YIELD ]; +LOOKUP ON { | } +[WHERE [AND ...]] +[YIELD ]; [AS ] [, [AS ] ...]; @@ -65,40 +73,27 @@ nebula> REBUILD TAG INDEX index_player; | 15 | +------------+ -nebula> LOOKUP ON player WHERE player.name == "Tony Parker"; +nebula> LOOKUP ON player \ + WHERE player.name == "Tony Parker"; ============ | VertexID | ============ | 101 | ------------ -# 正则表达式匹配 -nebula> LOOKUP ON player WHERE player.name =~ "^.{15,20}$" \ +nebula> LOOKUP ON player \ + WHERE player.name == "Tony Parker" \ YIELD player.name, player.age; -+-------------+----------------------+------------+ -| VertexID | player.name | player.age | -+-------------+----------------------+------------+ -| "player147" | "Amar'e Stoudemire" | 36 | -+-------------+----------------------+------------+ -| "player144" | "Shaquille O'Neal" | 47 | -+-------------+----------------------+------------+ -... - -nebula> LOOKUP ON player WHERE player.name CONTAINS toLower("L") \ - YIELD player.name, player.age; -+-------------+---------------------+------------+ -| VertexID | player.name | player.age | -+-------------+---------------------+------------+ -| "player145" | "JaVale McGee" | 31 | -+-------------+---------------------+------------+ -| "player144" | "Shaquille O'Neal" | 47 | -+-------------+---------------------+------------+ -| "player102" | "LaMarcus Aldridge" | 33 | -+-------------+---------------------+------------+ -... - -nebula> LOOKUP ON player WHERE player.name == "Kobe Bryant" YIELD player.name AS name \ - | GO FROM $-.VertexID OVER serve \ +======================================= +| VertexID | player.name | player.age | +======================================= +| 101 | Tony Parker | 36 | +--------------------------------------- + +nebula> LOOKUP ON player \ + WHERE player.name == "Kobe Bryant" \ + YIELD player.name AS name |\ + GO FROM $-.VertexID OVER serve \ YIELD $-.name, serve.start_year, serve.end_year, $$.team.name; ================================================================== | $-.name | serve.start_year | serve.end_year | $$.team.name | @@ -121,7 +116,8 @@ nebula> REBUILD EDGE INDEX index_follow; | 62 | +------------+ -nebula> LOOKUP ON follow WHERE follow.degree == 90; +nebula> LOOKUP ON follow \ + WHERE follow.degree == 90; +-------------+-------------+---------+ | SrcVID | DstVID | Ranking | +-------------+-------------+---------+ @@ -133,7 +129,9 @@ nebula> LOOKUP ON follow WHERE follow.degree == 90; +-------------+-------------+---------+ ... -nebula> LOOKUP ON follow WHERE follow.degree == 90 YIELD follow.degree; +nebula> LOOKUP ON follow \ + WHERE follow.degree == 90 \ + YIELD follow.degree; +-------------+-------------+---------+---------------+ | SrcVID | DstVID | Ranking | follow.degree | +-------------+-------------+---------+---------------+ @@ -145,8 +143,10 @@ nebula> LOOKUP ON follow WHERE follow.degree == 90 YIELD follow.degree; +-------------+-------------+---------+---------------+ ... -nebula> LOOKUP ON follow WHERE follow.degree == 60 YIELD follow.degree AS Degree \ - | GO FROM $-.DstVID OVER serve \ +nebula> LOOKUP ON follow \ + WHERE follow.degree == 60 \ + YIELD follow.degree AS Degree |\ + GO FROM $-.DstVID OVER serve \ YIELD $-.DstVID, serve.start_year, serve.end_year, $$.team.name; +-------------+------------------+----------------+--------------+ | $-.DstVID | serve.start_year | serve.end_year | $$.team.name | @@ -163,7 +163,7 @@ nebula> LOOKUP ON follow WHERE follow.degree == 60 YIELD follow.degree AS Degree 如果需要通过Tag列出所有的点,或通过Edge type列出边,则Tag、Edge type或属性上必须有至少一个索引。 -例如一个Tag`player`有两个属性`name`和`age`,为了遍历所有包含Tag`player`的点ID,Tag`player`、属性`name`或属性`age`中必须有一个已经创建索引。 +例如一个Tag `player`有属性`name`和`age`,为了遍历所有包含Tag `player`的点ID,Tag `player`、属性`name`或属性`age`中必须有一个已经创建索引。 - 查找所有Tag为`player`的点 VID。 @@ -179,7 +179,8 @@ nebula> LOOKUP ON follow WHERE follow.degree == 60 YIELD follow.degree AS Degree | 66 | +------------+ - nebula> INSERT VERTEX player(name,age) VALUES "player100":("Tim Duncan", 42), "player101":("Tony Parker", 36); + nebula> INSERT VERTEX player(name,age) \ + VALUES "player100":("Tim Duncan", 42), "player101":("Tony Parker", 36); # 列出所有的 player。类似于 MATCH (n:player) RETURN id(n) /*, n */。 @@ -207,7 +208,8 @@ nebula> LOOKUP ON follow WHERE follow.degree == 60 YIELD follow.degree AS Degree | 88 | +------------+ - nebula> INSERT EDGE like(likeness) values "player100"->"player101":(95); + nebula> INSERT EDGE like(likeness) \ + VALUES "player100"->"player101":(95); # 列出所有的 like 边。类似于 MATCH (s)-[e:like]->(d) RETURN id(s), rank(e), id(d) /*, type(e) */。 @@ -224,14 +226,16 @@ nebula> LOOKUP ON follow WHERE follow.degree == 60 YIELD follow.degree AS Degree 统计Tag为`player`的点和Edge type为`like`的边。 ```ngql -nebula> LOOKUP ON player | YIELD COUNT(*) AS Player_Number; +nebula> LOOKUP ON player |\ + YIELD COUNT(*) AS Player_Number; +---------------+ | Player_Number | +---------------+ | 2 | +---------------+ -nebula> LOOKUP ON like | YIELD COUNT(*) AS Like_Number; +nebula> LOOKUP ON like | \ + YIELD COUNT(*) AS Like_Number; +-------------+ | Like_Number | +-------------+ @@ -242,4 +246,3 @@ nebula> LOOKUP ON like | YIELD COUNT(*) AS Like_Number; !!! note 使用[`show-stats`命令](./6.show/14.show-stats.md)也可以统计点和边。 - diff --git a/docs-2.0/3.ngql-guide/7.general-query-statements/6.show/6.show-hosts.md b/docs-2.0/3.ngql-guide/7.general-query-statements/6.show/6.show-hosts.md index 3412329fe9e..d7a87059612 100644 --- a/docs-2.0/3.ngql-guide/7.general-query-statements/6.show/6.show-hosts.md +++ b/docs-2.0/3.ngql-guide/7.general-query-statements/6.show/6.show-hosts.md @@ -25,35 +25,35 @@ nebula> SHOW HOSTS; +-------------+-------+----------+--------------+----------------------------------+-----------------------------+ nebula> SHOW HOSTS GRAPH; -+-----------+------+----------+---------+--------------+---------------------------------------------+ -| Host | Port | Status | Role | Git Info Sha | Version | -+-----------+------+----------+---------+--------------+---------------------------------------------+ -| "graphd" | 9669 | "ONLINE" | "GRAPH" | "5368115" | "5368115, Build Time: Jul 19 2021 02:31:12" | -+-----------+------+----------+---------+--------------+---------------------------------------------+ -| "graphd1" | 9669 | "ONLINE" | "GRAPH" | "5368115" | "5368115, Build Time: Jul 19 2021 02:31:12" | -+-----------+------+----------+---------+--------------+---------------------------------------------+ -| "graphd2" | 9669 | "ONLINE" | "GRAPH" | "5368115" | "5368115, Build Time: Jul 19 2021 02:31:12" | -+-----------+------+----------+---------+--------------+---------------------------------------------+ ++-----------+------+----------+---------+---------------+------------------------------------------+ +| Host | Port | Status | Role | Git Info Sha | Version | ++-----------+------+----------+---------+--------------+-------------------------------------------+ +| "graphd" | 9669 | "ONLINE" | "GRAPH" | "c397299c" | "2.5.0, Build Time: Aug 19 2021 11:20:18" | ++-----------+------+----------+---------+--------------+-------------------------------------------+ +| "graphd1" | 9669 | "ONLINE" | "GRAPH" | "c397299c" | "2.5.0, Build Time: Aug 19 2021 11:20:18" | ++-----------+------+----------+---------+--------------+-------------------------------------------+ +| "graphd2" | 9669 | "ONLINE" | "GRAPH" | "c397299c" | "2.5.0, Build Time: Aug 19 2021 11:20:18" | ++-----------+------+----------+---------+--------------+-------------------------------------------+ nebula> SHOW HOSTS STORAGE; -+-------------+------+----------+-----------+--------------+---------------------------------------------+ -| Host | Port | Status | Role | Git Info Sha | Version | -+-------------+------+----------+-----------+--------------+---------------------------------------------+ -| "storaged0" | 9779 | "ONLINE" | "STORAGE" | "0dfa699" | "0dfa699, Build Time: Jul 19 2021 02:22:45" | -+-------------+------+----------+-----------+--------------+---------------------------------------------+ -| "storaged1" | 9779 | "ONLINE" | "STORAGE" | "0dfa699" | "0dfa699, Build Time: Jul 19 2021 02:22:45" | -+-------------+------+----------+-----------+--------------+---------------------------------------------+ -| "storaged2" | 9779 | "ONLINE" | "STORAGE" | "0dfa699" | "0dfa699, Build Time: Jul 19 2021 02:22:45" | -+-------------+------+----------+-----------+--------------+---------------------------------------------+ ++-------------+------+----------+-----------+--------------+-------------------------------------------+ +| Host | Port | Status | Role | Git Info Sha | Version | ++-------------+------+----------+-----------+--------------+-------------------------------------------+ +| "storaged0" | 9779 | "ONLINE" | "STORAGE" | "5b83e5cb" | "2.5.0, Build Time: Aug 19 2021 10:30:28" | ++-------------+------+----------+-----------+--------------+-------------------------------------------+ +| "storaged1" | 9779 | "ONLINE" | "STORAGE" | "5b83e5cb" | "2.5.0, Build Time: Aug 19 2021 10:30:28" | ++-------------+------+----------+-----------+--------------+-------------------------------------------+ +| "storaged2" | 9779 | "ONLINE" | "STORAGE" | "5b83e5cb" | "2.5.0, Build Time: Aug 19 2021 10:30:28" | ++-------------+------+----------+-----------+--------------+-------------------------------------------+ nebula> SHOW HOSTS META; -+----------+------+----------+--------+--------------+---------------------------------------------+ -| Host | Port | Status | Role | Git Info Sha | Version | -+----------+------+----------+--------+--------------+---------------------------------------------+ -| "metad2" | 9559 | "ONLINE" | "META" | "0dfa699" | "0dfa699, Build Time: Jul 19 2021 02:23:49" | -+----------+------+----------+--------+--------------+---------------------------------------------+ -| "metad0" | 9559 | "ONLINE" | "META" | "0dfa699" | "0dfa699, Build Time: Jul 19 2021 02:23:49" | -+----------+------+----------+--------+--------------+---------------------------------------------+ -| "metad1" | 9559 | "ONLINE" | "META" | "0dfa699" | "0dfa699, Build Time: Jul 19 2021 02:23:49" | -+----------+------+----------+--------+--------------+---------------------------------------------+ ++----------+------+----------+--------+--------------+-------------------------------------------+ +| Host | Port | Status | Role | Git Info Sha | Version | ++----------+------+----------+--------+--------------+-------------------------------------------+ +| "metad2" | 9559 | "ONLINE" | "META" | "5b83e5cb" | "2.5.0, Build Time: Aug 19 2021 10:30:28" | ++----------+------+----------+--------+--------------+-------------------------------------------+ +| "metad0" | 9559 | "ONLINE" | "META" | "5b83e5cb" | "2.5.0, Build Time: Aug 19 2021 10:30:28" | ++----------+------+----------+--------+--------------+-------------------------------------------+ +| "metad1" | 9559 | "ONLINE" | "META" | "5b83e5cb" | "2.5.0, Build Time: Aug 19 2021 10:30:28" | ++----------+------+----------+--------+--------------+-------------------------------------------+ ``` diff --git a/docs-2.0/3.ngql-guide/7.general-query-statements/6.show/8.show-indexes.md b/docs-2.0/3.ngql-guide/7.general-query-statements/6.show/8.show-indexes.md index a6d5ea9e1dd..dd9ce30a069 100644 --- a/docs-2.0/3.ngql-guide/7.general-query-statements/6.show/8.show-indexes.md +++ b/docs-2.0/3.ngql-guide/7.general-query-statements/6.show/8.show-indexes.md @@ -1,6 +1,6 @@ # SHOW INDEXES -`SHOW INDEXES`语句显示现有的原生索引。 +`SHOW INDEXES`语句可以列出当前图空间内的所有Tag和Edge type(包括属性)的索引。 ## 语法 @@ -12,18 +12,27 @@ SHOW {TAG | EDGE} INDEXES; ```ngql nebula> SHOW TAG INDEXES; -+------------------+ -| Names | -+------------------+ -| "play_age_0" | -+------------------+ -| "player_index_0" | -+------------------+ ++------------------+--------------+-----------------+ +| Index Name | By Tag | Columns | ++------------------+--------------+-----------------+ +| "fix" | "fix_string" | ["p1"] | ++------------------+--------------+-----------------+ +| "player_index_0" | "player" | ["name"] | ++------------------+--------------+-----------------+ +| "player_index_1" | "player" | ["name", "age"] | ++------------------+--------------+-----------------+ +| "var" | "var_string" | ["p1"] | ++------------------+--------------+-----------------+ nebula> SHOW EDGE INDEXES; -+----------------+ -| Names | -+----------------+ -| "index_follow" | -+----------------+ ++----------------+----------+---------+ +| Index Name | By Edge | Columns | ++----------------+----------+---------+ +| "follow_index" | "follow" | [] | ++----------------+----------+---------+ ``` + + +!!! Compatibility "历史版本兼容性" + + Nebula Graph 2.0.1中, `SHOW TAG/EDGE INDEXES` 语句仅返回 `Names`。 diff --git a/docs-2.0/3.ngql-guide/8.clauses-and-options/limit.md b/docs-2.0/3.ngql-guide/8.clauses-and-options/limit.md index 25d811643e3..94ab6de5624 100644 --- a/docs-2.0/3.ngql-guide/8.clauses-and-options/limit.md +++ b/docs-2.0/3.ngql-guide/8.clauses-and-options/limit.md @@ -31,7 +31,7 @@ YIELD # 从排序结果中返回第2行开始的3行数据。 nebula> GO FROM "player100" OVER follow REVERSELY \ YIELD $$.player.name AS Friend, $$.player.age AS Age \ - | ORDER BY Age,Friend \ + | ORDER BY $-.Age, $-.Friend \ | LIMIT 1, 3; +-------------------+-----+ | Friend | Age | diff --git a/docs-2.0/3.ngql-guide/8.clauses-and-options/order-by.md b/docs-2.0/3.ngql-guide/8.clauses-and-options/order-by.md index 147dc9d8bd7..b147559d96e 100644 --- a/docs-2.0/3.ngql-guide/8.clauses-and-options/order-by.md +++ b/docs-2.0/3.ngql-guide/8.clauses-and-options/order-by.md @@ -18,12 +18,16 @@ ORDER BY [ASC | DESC] [, [ASC | DESC] ...]; ``` +!!! compatibility + + 原生nGQL语法中,`ORDER BY`命令后必须使用引用符`$-.`。但在2.5.0之前的版本中不需要。 + ### 示例 ```ngql nebula> FETCH PROP ON player "player100", "player101", "player102", "player103" \ YIELD player.age AS age, player.name AS name \ - | ORDER BY age ASC, name DESC; + | ORDER BY $-.age ASC, $-.name DESC; +-------------+-----+---------------------+ | VertexID | age | name | +-------------+-----+---------------------+ @@ -111,4 +115,4 @@ nebula> MATCH (v:player{name:"Tim Duncan"}) --> (v2) \ +-----------------+----------+ | "Tony Parker" | 36 | +-----------------+----------+ -``` \ No newline at end of file +``` diff --git a/docs-2.0/3.ngql-guide/8.clauses-and-options/return.md b/docs-2.0/3.ngql-guide/8.clauses-and-options/return.md index 831bf233a08..f8f2e53ef30 100644 --- a/docs-2.0/3.ngql-guide/8.clauses-and-options/return.md +++ b/docs-2.0/3.ngql-guide/8.clauses-and-options/return.md @@ -34,6 +34,26 @@ - 在nGQL 2.0中,`RETURN`不适用于原生nGQL。 +## Map顺序说明 + +`RETURN`返回Map时,Key的顺序是未定义的。 + +```ngql +nebula> RETURN {age: 32, name: "Marco Belinelli"}; ++------------------------------------+ +| {age:32,name:"Marco Belinelli"} | ++------------------------------------+ +| {age: 32, name: "Marco Belinelli"} | ++------------------------------------+ + +nebula> RETURN {zage: 32, name: "Marco Belinelli"}; ++-------------------------------------+ +| {zage:32,name:"Marco Belinelli"} | ++-------------------------------------+ +| {name: "Marco Belinelli", zage: 32} | ++-------------------------------------+ +``` + ## 返回点 ```ngql diff --git a/docs-2.0/3.ngql-guide/8.clauses-and-options/where.md b/docs-2.0/3.ngql-guide/8.clauses-and-options/where.md index afaf2248b96..35643bcec6d 100644 --- a/docs-2.0/3.ngql-guide/8.clauses-and-options/where.md +++ b/docs-2.0/3.ngql-guide/8.clauses-and-options/where.md @@ -182,7 +182,7 @@ nebula> GO FROM "1" \ OVER e1 \ WHERE e1._rank>2 \ YIELD e1._src, e1._dst, e1._rank AS Rank, e1.p1 | \ - ORDER BY Rank DESC; + ORDER BY $-.Rank DESC; ==================================== | e1._src | e1._dst | Rank | e1.p1 | ==================================== diff --git a/docs-2.0/4.deployment-and-installation/1.resource-preparations.md b/docs-2.0/4.deployment-and-installation/1.resource-preparations.md index 177cc0ff0b4..8b30a6ccef3 100644 --- a/docs-2.0/4.deployment-and-installation/1.resource-preparations.md +++ b/docs-2.0/4.deployment-and-installation/1.resource-preparations.md @@ -43,7 +43,7 @@ | xz | 任意稳定版本 | - | | readline-devel | 任意稳定版本 | - | | ncurses-devel | 任意稳定版本 | - | -| zlid-devel | 任意稳定版本 | - | +| zlib-devel | 任意稳定版本 | - | | gcc | 7.5.0及以上 | 执行命令`gcc -v`检查版本。 | | gcc-c++ | 任意稳定版本 | - | | cmake | 3.9.0及以上 | 执行命令`cmake --version`检查版本。 | @@ -117,7 +117,7 @@ 1. 克隆仓库`nebula-common`到主机。 ```bash - $ git clone -b {{common.release}} https://github.com/vesoft-inc/nebula-common.git + $ git clone -b v{{ nebula.release}} https://github.com/vesoft-inc/nebula-common.git ``` 如需安装特定版本的Nebula Graph,使用`--branch`或`-b`选项指定相应的nebula-common分支。 例如,指定{{ nebula.release }},命令如下: @@ -209,7 +209,9 @@ ### 服务架构建议 -!!! danger "**不要**跨机房部署集群" +!!! danger + + **不要**跨机房部署集群。 | 进程 | 数量| | ------------------------| ------| @@ -263,7 +265,7 @@ Nebula Graph 是针对 NVMe SSD 进行设计和实现的,所有默认参数都 - 不要使用远端存储设备(如 NAS 或 SAN),不要外接基于 HDFS 或者 Ceph 的虚拟硬盘。 -- 不需要使用磁盘阵列(RAID); +- 不需要使用磁盘阵列(RAID)。 - 使用本地 SSD 设备。 diff --git a/docs-2.0/4.deployment-and-installation/2.compile-and-install-nebula-graph/1.install-nebula-graph-by-compiling-the-source-code.md b/docs-2.0/4.deployment-and-installation/2.compile-and-install-nebula-graph/1.install-nebula-graph-by-compiling-the-source-code.md index cf921adca08..310aee953d4 100644 --- a/docs-2.0/4.deployment-and-installation/2.compile-and-install-nebula-graph/1.install-nebula-graph-by-compiling-the-source-code.md +++ b/docs-2.0/4.deployment-and-installation/2.compile-and-install-nebula-graph/1.install-nebula-graph-by-compiling-the-source-code.md @@ -75,6 +75,12 @@ $ sudo make install-all ``` +7. 安装目录下的 `etc/` 目录中(默认为`/usr/local/nebula/etc`)的配置文件为参考模版,用户可以根据需要创建自己的配置文件。如果要使用 `script` 目录下的脚本,启动、停止、重启、中止和查看服务,配置文件需要命名为 `nebula-graph.conf`,`nebula-metad.conf`和`nebula-storaged.conf`。 + + !!! compatibility + + 在 2.0.1 中,可以直接使用 `script` 目录下的脚本,不需要将配置文件重新命名。 + ## 更新master版本 master分支的代码更新速度快,如果安装了master分支对应的开发版Nebula Graph,可根据以下步骤更新版本。 @@ -170,7 +176,7 @@ $ cmake -DCMAKE_C_COMPILER= -DCMAKE_CXX_COMPILER=/nebula-graph-.el7.x86_64.rpm - - //Centos 8 - https://oss-cdn.nebula-graph.com.cn/package//nebula-graph-.el8.x86_64.rpm - - //Ubuntu 1604 - https://oss-cdn.nebula-graph.com.cn/package//nebula-graph-.ubuntu1604.amd64.deb - - //Ubuntu 1804 - https://oss-cdn.nebula-graph.com.cn/package//nebula-graph-.ubuntu1804.amd64.deb - - //Ubuntu 2004 - https://oss-cdn.nebula-graph.com.cn/package//nebula-graph-.ubuntu2004.amd64.deb - ``` - - 例如要下载适用于`Centos 7.5`的`{{ nebula.release }}`安装包: - - ```bash - wget https://oss-cdn.nebula-graph.com.cn/package/{{ nebula.release }}/nebula-graph-{{ nebula.release }}.el7.x86_64.rpm - wget https://oss-cdn.nebula-graph.com.cn/package/{{ nebula.release }}/nebula-graph-{{ nebula.release }}.el7.x86_64.rpm.sha256sum.txt - ``` - - 下载适用于`ubuntu 1804`的`{{ nebula.release }}`安装包: - ```bash - wget https://oss-cdn.nebula-graph.com.cn/package/{{ nebula.release }}/nebula-graph-{{ nebula.release }}.ubuntu1804.amd64.deb - wget https://oss-cdn.nebula-graph.com.cn/package/{{ nebula.release }}/nebula-graph-{{ nebula.release }}.ubuntu1804.amd64.deb.sha256sum.txt - ``` - -- 下载日常开发版本(nightly) - - >**禁止**:nightly版本通常用于测试新功能、新特性,请**不要**在生产环境中使用nightly版本。 - - URL格式如下: - - ```bash - //Centos 7 - https://oss-cdn.nebula-graph.com.cn/package/v2-nightly//nebula-graph--nightly.el7.x86_64.rpm - - //Centos 8 - https://oss-cdn.nebula-graph.com.cn/package/v2-nightly//nebula-graph--nightly.el8.x86_64.rpm - - //Ubuntu 1604 - https://oss-cdn.nebula-graph.com.cn/package/v2-nightly//nebula-graph--nightly.ubuntu1604.amd64.deb - - //Ubuntu 1804 - https://oss-cdn.nebula-graph.com.cn/package/v2-nightly//nebula-graph--nightly.ubuntu1804.amd64.deb - - //Ubuntu 2004 - https://oss-cdn.nebula-graph.com.cn/package/v2-nightly//nebula-graph--nightly.ubuntu1804.amd64.deb - ``` - - 例如要下载`2021.03.28`适用于`Centos 7.5`的`2.x`安装包: - - ```bash - wget https://oss-cdn.nebula-graph.com.cn/package/v2-nightly/2021.03.28/nebula-graph-2021.03.28-nightly.el7.x86_64.rpm - wget https://oss-cdn.nebula-graph.com.cn/package/v2-nightly/2021.03.28/nebula-graph-2021.03.28-nightly.el7.x86_64.rpm.sha256sum.txt - ``` - - 要下载`2021.03.28`适用于`Ubuntu 1804`的`2.x`安装包: - ```bash - wget https://oss-cdn.nebula-graph.com.cn/package/v2-nightly/2021.03.28/nebula-graph-2021.03.28-nightly.ubuntu1804.amd64.deb - wget https://oss-cdn.nebula-graph.com.cn/package/v2-nightly/2021.03.28/nebula-graph-2021.03.28-nightly.ubuntu1804.amd64.deb.sha256sum.txt - ``` - - - -## 安装Nebula Graph - -- 安装RPM包 - - ```bash - $ sudo rpm -ivh --prefix= - ``` - -- 安装DEB包 - - ```bash - $ sudo dpkg -i --instdir== - ``` - -!!! Note - - 如果不设置安装路径,默认安装路径为`/usr/local/nebula/`。 - -## 后续操作 - -- [启动Nebula Graph](../manage-service.md) -- [连接Nebula Graph](../../2.quick-start/3.connect-to-nebula-graph.md) +{% include "/source_install-nebula-graph-by-rpm-or-deb.md" %} + diff --git a/docs-2.0/4.deployment-and-installation/2.compile-and-install-nebula-graph/3.deploy-nebula-graph-with-docker-compose.md b/docs-2.0/4.deployment-and-installation/2.compile-and-install-nebula-graph/3.deploy-nebula-graph-with-docker-compose.md index dae71f08211..e040d7fd447 100644 --- a/docs-2.0/4.deployment-and-installation/2.compile-and-install-nebula-graph/3.deploy-nebula-graph-with-docker-compose.md +++ b/docs-2.0/4.deployment-and-installation/2.compile-and-install-nebula-graph/3.deploy-nebula-graph-with-docker-compose.md @@ -27,7 +27,7 @@ `master`分支包含最新的未测试代码。请**不要**在生产环境使用此版本。 ```bash - $ git clone -b {{dockercompose.release}} https://github.com/vesoft-inc/nebula-docker-compose.git + $ git clone -b v{{dockercompose.release}} https://github.com/vesoft-inc/nebula-docker-compose.git ``` 2. 切换至目录`nebula-docker-compose`。 @@ -64,7 +64,7 @@ 1. 使用Nebula Console镜像启动一个容器,并连接到Nebula Graph服务所在的网络(nebula-docker-compose_nebula-net)中。 ```bash - $ docker run --rm -ti --network nebula-docker-compose_nebula-net --entrypoint=/bin/sh vesoft/nebula-console:v2-nightly + $ docker run --rm -ti --network nebula-docker-compose_nebula-net --entrypoint=/bin/sh vesoft/nebula-console:v2.5.0 ``` !!! Note @@ -199,9 +199,9 @@ Removing nebula-docker-compose_metad1_1 ... done Removing network nebula-docker-compose_nebula-net ``` -!!! Note +!!! danger - 命令`docker-compose down -v`将会**删除**所有本地Nebula Graph的数据。如果使用的是developing或nightly版本,并且有一些兼容性问题,请尝试这个命令。 + 命令`docker-compose down -v`的参数`-v`将会**删除**所有本地的数据。如果使用的是nightly版本,并且有一些兼容性问题,请尝试这个命令。 ## 修改配置 @@ -217,7 +217,7 @@ Docker Compose部署的Nebula Graph,配置文件位置为`nebula-docker-compos ```bash graphd: - image: vesoft/nebula-graphd:v2-nightly + image: vesoft/nebula-graphd:v2.5.0 ... ports: - 9669:9669 @@ -244,7 +244,7 @@ graphd: 执行如下命令可以更新Nebula Console客户端镜像。 ```bash -docker pull vesoft/nebula-console:v2-nightly +docker pull vesoft/nebula-console:v2.5.0 ``` ### 如何升级Nebula Graph? diff --git a/docs-2.0/4.deployment-and-installation/3.upgrade-nebula-graph/upgrade-nebula-from-200-to-250.md b/docs-2.0/4.deployment-and-installation/3.upgrade-nebula-graph/upgrade-nebula-from-200-to-250.md index 8dad4cd6691..2229b5129ce 100644 --- a/docs-2.0/4.deployment-and-installation/3.upgrade-nebula-graph/upgrade-nebula-from-200-to-250.md +++ b/docs-2.0/4.deployment-and-installation/3.upgrade-nebula-graph/upgrade-nebula-from-200-to-250.md @@ -10,16 +10,21 @@ Nebula Graph v2.0.x升级至v{{nebula.release}},只需要使用v{{nebula.relea 1. 下载[RPM/DEB包](https://github.com/vesoft-inc/nebula-graph/releases/tag/v{{nebula.release}})。 -2. 停止所有Nebula Graph服务。详情请参见[管理Nebula Graph服务](../../2.quick-start/5.start-stop-service.md)。 +2. 停止所有Nebula Graph服务。详情请参见[管理Nebula Graph服务](../../2.quick-start/5.start-stop-service.md)。建议更新前备份配置文件。 3. 执行如下命令升级: - RPM包 ```bash - $ sudo rpm -Uivh + $ sudo rpm -Uvh + ``` + + 若安装时指定路径,那么升级时也需要指定路径 + + ```bash + $ sudo rpm -Uivh --prefix= ``` - - DEB包 ```bash diff --git a/docs-2.0/4.deployment-and-installation/3.upgrade-nebula-graph/upgrade-nebula-graph-to-250.md b/docs-2.0/4.deployment-and-installation/3.upgrade-nebula-graph/upgrade-nebula-graph-to-250.md index 0a7f9da6bf1..36914a79d25 100644 --- a/docs-2.0/4.deployment-and-installation/3.upgrade-nebula-graph/upgrade-nebula-graph-to-250.md +++ b/docs-2.0/4.deployment-and-installation/3.upgrade-nebula-graph/upgrade-nebula-graph-to-250.md @@ -1,4 +1,4 @@ -# 升级 Nebula Graph 历史版本至 v{{nebula.release}} +# 升级Nebula Graph历史版本至v{{nebula.release}} Nebula Graph历史版本指低于Nebula Graph v2.0.0-GA的版本,本文介绍如何升级历史版本至v{{nebula.release}}。 @@ -273,7 +273,7 @@ Nebula Graph历史版本指低于Nebula Graph v2.0.0-GA的版本,本文介绍 11. 升级其他客户端。 - 所有的客户端都必须升级到支持Nebula Graph v{{nebula.release}} 的版本。包括但不限于[Studio](https://github.com/vesoft-inc/nebula-docker-compose), [Python](https://github.com/vesoft-inc/nebula-python), [Java](https://github.com/vesoft-inc/nebula-java), [go](https://github.com/vesoft-inc/nebula-go), [C++](https://github.com/vesoft-inc/nebula-cpp), [Flink-connector](https://github.com/vesoft-inc/nebula-flink-connector), [Spark-util](https://github.com/vesoft-inc/nebula-spark-utils), [Benchmark](https://github.com/vesoft-inc/nebula-bench)。请找到各 repo 对应的 branch。 + 所有的客户端都必须升级到支持Nebula Graph v{{nebula.release}} 的版本。包括但不限于[Python](https://github.com/vesoft-inc/nebula-python)、[Java](https://github.com/vesoft-inc/nebula-java)、[go](https://github.com/vesoft-inc/nebula-go)、[C++](https://github.com/vesoft-inc/nebula-cpp)、[Flink-connector](https://github.com/vesoft-inc/nebula-flink-connector)、[Spark-util](https://github.com/vesoft-inc/nebula-spark-utils)、[Nebula Bench](https://github.com/vesoft-inc/nebula-bench)。请找到各 repo 对应的 branch。 !!! Note diff --git a/docs-2.0/4.deployment-and-installation/connect-to-nebula-graph.md b/docs-2.0/4.deployment-and-installation/connect-to-nebula-graph.md new file mode 100644 index 00000000000..1c009ff8414 --- /dev/null +++ b/docs-2.0/4.deployment-and-installation/connect-to-nebula-graph.md @@ -0,0 +1,4 @@ +# 连接Nebula Graph服务 + +{% include "/source_connect-to-nebula-graph.md" %} + diff --git a/docs-2.0/4.deployment-and-installation/manage-service.md b/docs-2.0/4.deployment-and-installation/manage-service.md index 0145e7c9fef..c6474392a25 100644 --- a/docs-2.0/4.deployment-and-installation/manage-service.md +++ b/docs-2.0/4.deployment-and-installation/manage-service.md @@ -1,3 +1,4 @@ # 管理Nebula Graph服务 ---8<-- "source_manage-service.md" +{% include "/source_manage-service.md" %} + diff --git a/docs-2.0/5.configurations-and-logs/1.configurations/4.storage-config.md b/docs-2.0/5.configurations-and-logs/1.configurations/4.storage-config.md index 0260a61a078..3932063cb11 100644 --- a/docs-2.0/5.configurations-and-logs/1.configurations/4.storage-config.md +++ b/docs-2.0/5.configurations-and-logs/1.configurations/4.storage-config.md @@ -77,7 +77,7 @@ Storage服务提供了两份初始配置文件`nebula-storaged.conf.default`和` | 名称 | 预设值 | 说明 | | :--------------------------| :-------------- | :------------------------ | |`data_path` | `data/storage` | 数据存储路径,多个路径用英文逗号(,)分隔。一个RocksDB实例对应一个路径。 | -|`minimum_reserved_bytes`|`268435456`|每个数据存储路径的剩余空间最小值,低于该值时,可能会导致集群元数据操作失败。单位:字节。默认为`1073741824`,即1GB。| +|`minimum_reserved_bytes`|`268435456`|每个数据存储路径的剩余空间最小值,低于该值时,可能会导致集群数据写入失败。单位:字节。默认为`1073741824`,即1GB。| |`rocksdb_batch_size` | `4096` | 批量操作的缓存大小。单位:字节。 | |`rocksdb_block_cache` | `4` | BlockBasedTable的默认块缓存大小。单位:兆(MB)。 | |`engine_type` | `rocksdb` | 存储引擎类型。 | diff --git a/docs-2.0/7.data-security/1.authentication/1.authentication.md b/docs-2.0/7.data-security/1.authentication/1.authentication.md index 97d77a272dc..878cf83b33e 100644 --- a/docs-2.0/7.data-security/1.authentication/1.authentication.md +++ b/docs-2.0/7.data-security/1.authentication/1.authentication.md @@ -6,7 +6,7 @@ !!! Note - 默认情况下,身份验证功能是关闭的,输入任意用户名和密码都可以连接到Nebula Graph。 + 默认情况下,身份验证功能是关闭的,用户可以使用root用户名和任意密码连接到Nebula Graph。 Nebula Graph支持两种身份验证方式:本地身份验证和LDAP验证。 @@ -30,4 +30,6 @@ Nebula Graph支持两种身份验证方式:本地身份验证和LDAP验证。 ### 启用LDAP验证 -当前仅企业版支持集成LDAP进行身份验证,详情请参见使用LDAP进行身份验证(TODO: doc)。 \ No newline at end of file +!!! Enterpriseonly + + 当前仅企业版支持集成LDAP进行身份验证,详情请参见使用LDAP进行身份验证。 diff --git a/docs-2.0/7.data-security/1.authentication/2.management-user.md b/docs-2.0/7.data-security/1.authentication/2.management-user.md index d38968f8d65..646a186ba67 100644 --- a/docs-2.0/7.data-security/1.authentication/2.management-user.md +++ b/docs-2.0/7.data-security/1.authentication/2.management-user.md @@ -6,7 +6,7 @@ !!! Note - * 默认情况下,身份验证功能是关闭的,输入任意用户名和密码都可以连接到Nebula Graph。 + * 默认情况下,身份验证功能是关闭的,用户可以使用root用户名和任意密码连接到Nebula Graph。 * 修改权限后,对应的用户需要重新登录才能生效。 @@ -58,6 +58,27 @@ nebula> REVOKE ROLE USER ON basketballplayer FROM user1; ``` +## 查看用户权限(`SHOW ROLES`) + +执行`SHOW ROLES`语句可以显示分配给用户的角色信息。 + +- 语法 + + ```ngql + SHOW ROLES IN ; + ``` + +- 示例 + + ```ngql + nebula> SHOW ROLES IN basketballplayer; + +---------+-----------+ + | Account | Role Type | + +---------+-----------+ + | "user1" | "ADMIN" | + +---------+-----------+ + ``` + ## 修改用户密码(`CHANGE PASSWORD`) 执行`CHANGE PASSWORD`语句可以修改用户密码,修改时需要提供旧密码和新密码。 diff --git a/docs-2.0/7.data-security/1.authentication/3.role-list.md b/docs-2.0/7.data-security/1.authentication/3.role-list.md index cb96c37b709..4bf5761363c 100644 --- a/docs-2.0/7.data-security/1.authentication/3.role-list.md +++ b/docs-2.0/7.data-security/1.authentication/3.role-list.md @@ -57,13 +57,13 @@ Nebula Graph内置了多种角色,说明如下: |权限|God |Admin|DBA|User|Guest|相关语句| |:---|:---|:---|:---|:---|:---|:---| |Read space|Y|Y|Y|Y|Y|`USE`、`DESCRIBE SPACE`| - |Write space|Y|||||`CREATE SPACE`、`DROP SPACE`、`CREATE SNAPSHOT`、`DROP SNAPSHOT`、`BALANCE`、`ADMIN`、`CONFIG`、`INGEST`、`DOWNLOAD`| + |Write space|Y|||||`CREATE SPACE`、`DROP SPACE`、`CREATE SNAPSHOT`、`DROP SNAPSHOT`、`BALANCE DATA`、`BALANCE DATA STOP`、`BALANCE DATA REMOVE`、`BALANCE LEADER`、`ADMIN`、`CONFIG`、`INGEST`、`DOWNLOAD`、`SUBMIT JOB COMPACT`、`SUBMIT JOB FLUSH`、`SUBMIT JOB STATS`、`STOP JOB`、`RECOVER JOB`、`BUILD TAG INDEX`、`BUILD EDGE INDEX`| |Read schema|Y|Y|Y|Y|Y|`DESCRIBE TAG`、`DESCRIBE EDGE`、`DESCRIBE TAG INDEX`、`DESCRIBE EDGE INDEX`| |Write schema|Y|Y|Y|||`CREATE TAG`、`ALTER TAG`、`CREATE EDGE`、`ALTER EDGE`、`DROP TAG`、`DROP EDGE`、`CREATE TAG INDEX`、`CREATE EDGE INDEX`、`DROP TAG INDEX`、`DROP EDGE INDEX`| |Write user|Y|||||`CREATE USER`、`DROP USER`、`ALTER USER`| |Write role|Y|Y||||`GRANT`、`REVOKE`| |Read data|Y|Y|Y|Y|Y|`GO`、`SET`、`PIPE`、`MATCH`、`ASSIGNMENT`、`LOOKUP`、`YIELD`、`ORDER BY`、`FETCH VERTICES`、`Find`、`FETCH EDGES`、`FIND PATH`、`LIMIT`、`GROUP BY`、`RETURN`| - |Write data|Y|Y|Y|Y||`BUILD TAG INDEX`、`BUILD EDGE INDEX`、`INSERT VERTEX`、`UPDATE VERTEX`、`INSERT EDGE`、`UPDATE EDGE`、`DELETE VERTEX`、`DELETE EDGES`| + |Write data|Y|Y|Y|Y||`INSERT VERTEX`、`UPDATE VERTEX`、`INSERT EDGE`、`UPDATE EDGE`、`DELETE VERTEX`、`DELETE EDGES`| |Show operations|Y|Y|Y|Y|Y|`SHOW`、`CHANGE PASSWORD`| >**注意**: diff --git a/docs-2.0/7.data-security/2.backup-restore/3.br-backup-data.md b/docs-2.0/7.data-security/2.backup-restore/3.br-backup-data.md index fd8963fcbb5..442c2f1eef6 100644 --- a/docs-2.0/7.data-security/2.backup-restore/3.br-backup-data.md +++ b/docs-2.0/7.data-security/2.backup-restore/3.br-backup-data.md @@ -52,6 +52,7 @@ $ ./bin/br backup full --meta --storage --user ://\
Schema:可选值为 `local` 和 `hdfs`。
PATH:存储位置的路径。 | string | | --user | 是 | 无 | 登录到 meta/storage 服务所在主机的用户名。 | string | | --verbose | 否 | 无 | 显示的详细信息。 | - | + ## 下一步 备份文件生成后,可以使用BR将备份文件的数据恢复到Nebula Graph中。具体操作,请参见[使用BR恢复数据](4.br-restore-data.md)。 diff --git a/docs-2.0/7.data-security/2.backup-restore/4.br-restore-data.md b/docs-2.0/7.data-security/2.backup-restore/4.br-restore-data.md index 9b16ca9a9fe..1d7868f1c42 100644 --- a/docs-2.0/7.data-security/2.backup-restore/4.br-restore-data.md +++ b/docs-2.0/7.data-security/2.backup-restore/4.br-restore-data.md @@ -2,7 +2,7 @@ 如果使用BR备份了Nebula Graph的数据,可以通过备份文件进行数据恢复。本文介绍如何通过备份文件恢复数据。 -!!! warning +!!! caution 恢复执行成功后,目标集群上已有的数据会被删除,然后替换为备份文件中的数据。建议提前备份目标集群上的数据。 @@ -28,7 +28,7 @@ - 如果使用Alibaba Cloud OSS或Amazon S3保存备份文件,请确保Meta服务器、Storage服务器和BR机器都已安装相应的客户端。详情请参见[Alibaba Cloud ossutil文档](https://www.alibabacloud.com/help/zh/doc-detail/120075.htm#concept-303829)和[Amazon S3 CLI文档](https://docs.amazonaws.cn/cli/latest/userguide/cli-services-s3.html)。 - !!! warning + !!! caution 请创建软链接方便使用ossutil命令。命令为`ln -s // /usr/local/bin/ossutil`,根据实际路径和系统替换内容。 diff --git a/docs-2.0/8.service-tuning/compaction.md b/docs-2.0/8.service-tuning/compaction.md index 29069eee20b..910140cb4cf 100644 --- a/docs-2.0/8.service-tuning/compaction.md +++ b/docs-2.0/8.service-tuning/compaction.md @@ -14,7 +14,10 @@ Nebula Graph有两种类型的`Compaction`操作:自动`Compaction`和全量`C ## 自动`Compaction` -自动`Compaction`是在系统读取数据、写入数据或系统重启时自动触发`Compaction`操作,提升短时间内的读取性能。默认情况下,自动`Compaction`是开启状态,可能在业务高峰期触发,导致意外抢占IO影响业务。如果需要完全手动控制`Compaction`操作,用户可以关闭自动`Compaction`。 +自动`Compaction`是在系统读取数据、写入数据或系统重启时自动触发`Compaction`操作,提升短时间内的读取性能。默认情况下,自动`Compaction`是开启状态,可能在业务高峰期触发,导致意外抢占IO影响业务。 + + ## 全量`Compaction` @@ -76,13 +80,17 @@ nebula> SHOW JOB ; 为保证Nebula Graph的性能,请参考如下操作建议: + - 数据导入完成后,请执行`SUBMIT JOB COMPACT`。 - 业务低峰期(例如凌晨)执行`SUBMIT JOB COMPACT`。 + - 为控制`Compaction`的读写速率,请在配置文件`nebula-storaged.conf`中设置如下两个参数: diff --git a/docs-2.0/README.md b/docs-2.0/README.md index 16499f86cb5..b72dd43ffff 100644 --- a/docs-2.0/README.md +++ b/docs-2.0/README.md @@ -1,6 +1,8 @@ # 欢迎阅读Nebula Graph {{ nebula.release }} 文档 -!!! Note "本文档更新时间{{ now().year }}-{{ now().month }}-{{ now().day }}, [GitHub commit](https://github.com/vesoft-inc/nebula-docs-cn) {{ git.short_commit }}。" +!!! Note "确认正在阅读最新的版本" + + 本文档更新时间{{ now().year }}-{{ now().month }}-{{ now().day }}, [GitHub commit](https://github.com/vesoft-inc/nebula-docs-cn/tree/v{{ nebula.release }}) {{ git.short_commit }}。 Nebula Graph是一款开源的、分布式的、易扩展的原生图数据库,能够承载数千亿个点和数万亿条边的超大规模数据集,并且提供毫秒级查询。 @@ -16,6 +18,7 @@ Nebula Graph是一款开源的、分布式的、易扩展的原生图数据库 - [《开源分布式图数据库 Nebula Graph 完全指南》](https://docs.nebula-graph.com.cn/site/pdf/NebulaGraph-book.pdf) +- [Release note](20.appendix/releasenote.md) - [论坛](https://discuss.nebula-graph.com.cn/) - [项目主页](https://nebula-graph.com.cn/) - [系列视频](https://space.bilibili.com/472621355) @@ -24,13 +27,20 @@ Graph 完全指南》](https://docs.nebula-graph.com.cn/site/pdf/NebulaGraph-boo ## 图例说明 + + + !!! note 额外的信息或者操作相关的提醒等。 !!! caution - 需要严格遵守的注意事项。不遵守caution可能导致系统故障、数据丢失、安全问题等。 + 需要严格遵守的注意事项。不遵守 caution 可能导致系统故障、数据丢失、安全问题等。 !!! danger diff --git a/docs-2.0/nebula-algorithm.md b/docs-2.0/nebula-algorithm.md index 27adda3a823..763f51a551a 100644 --- a/docs-2.0/nebula-algorithm.md +++ b/docs-2.0/nebula-algorithm.md @@ -54,7 +54,7 @@ Nebula Algorithm实现图计算的流程如下: 1. 克隆仓库`nebula-spark-utils`。 ```bash - $ git clone -b {{algorithm.release}} https://github.com/vesoft-inc/nebula-spark-utils.git + $ git clone -b {{algorithm.branch}} https://github.com/vesoft-inc/nebula-spark-utils.git ``` 2. 进入目录`nebula-algorithm`。 @@ -69,11 +69,11 @@ Nebula Algorithm实现图计算的流程如下: $ mvn clean package -Dgpg.skip -Dmaven.javadoc.skip=true -Dmaven.test.skip=true ``` -编译完成后,在目录`nebula-algorithm/target`下生成类似文件`nebula-algorithm-2.0.0.jar`。 +编译完成后,在目录`nebula-algorithm/target`下生成类似文件`nebula-algorithm-{{algorithm.release}}.jar`。 ### Maven远程仓库下载 -[下载地址](https://repo1.maven.org/maven2/com/vesoft/nebula-algorithm/2.0.0/) +[下载地址](https://repo1.maven.org/maven2/com/vesoft/nebula-algorithm/{{algorithm.release}}/) ## 使用方法 @@ -87,7 +87,7 @@ Nebula Algorithm实现图计算的流程如下: com.vesoft nebula-algorithm - 2.0.0 + {{algorithm.release}} ``` @@ -106,7 +106,7 @@ Nebula Algorithm实现图计算的流程如下: !!! note 使用封装好的算法包有一定的局限性,例如落库到Nebula Graph时,落库的图空间中创建的Tag的属性名称必须和代码内预设的名称保持一致。如果用户有开发能力,推荐使用第一种方法。 -1. 设置[配置文件](https://github.com/vesoft-inc/nebula-spark-utils/blob/master/nebula-algorithm/src/main/resources/application.conf)。 +1. 设置[配置文件](https://github.com/vesoft-inc/nebula-spark-utils/blob/{{algorithm.branch}}/nebula-algorithm/src/main/resources/application.conf)。 ```bash { diff --git a/docs-2.0/nebula-dashboard/2.deploy-dashboard.md b/docs-2.0/nebula-dashboard/2.deploy-dashboard.md index fe446f697fc..dd3f9b9161c 100644 --- a/docs-2.0/nebula-dashboard/2.deploy-dashboard.md +++ b/docs-2.0/nebula-dashboard/2.deploy-dashboard.md @@ -26,11 +26,11 @@ Dashboard版本和Nebula Graph的版本对应关系如下。 ## 下载Dashboard -执行如下命令下载压缩包: +根据需要下载 tar 包,建议选择最新版本。 -```bash -wget https://oss-cdn.nebula-graph.com.cn/nebula-graph-dashboard/nebula-graph-dashboard-1.0.0-1.x86_64.tar.gz -``` +| Dashboard 安装包 | Nebula Graph版本 | +| :----- | :----- | +| [nebula-graph-dashboard-{{ dashboard.base100 }}-1.x86_64.tar.gz](https://oss-cdn.nebula-graph.com.cn/nebula-graph-dashboard/{{ dashboard.base100 }}/nebula-graph-dashboard-{{ dashboard.base100 }}-1.x86_64.tar.gz) | 2.5.0 | ## 目录结构说明 @@ -57,7 +57,7 @@ wget https://oss-cdn.nebula-graph.com.cn/nebula-graph-dashboard/nebula-graph-das 在目录`node-exporter`内执行如下命令启动服务: ```bash -$ nohup ./node-exporter --web.listen-address=:9100 & +$ nohup ./node-exporter --web.listen-address=":9100" & ``` 服务启动后,可以在浏览器中输入`:9100`检查服务是否正常启动。 @@ -71,41 +71,52 @@ $ nohup ./node-exporter --web.listen-address=:9100 & 1. 在目录`nebula-stats-exporter`内修改文件`config.yaml`,配置所有服务的HTTP端口,示例如下: ```bash - version: v0.0.2 - nebulaItems: - - instanceName: metad0 - endpointIP: 192.168.xx.1 - endpointPort: 19559 - componentType: metad - - instanceName: metad1 - endpointIP: 192.168.xx.2 - endpointPort: 19559 - componentType: metad - - instanceName: metad2 - endpointIP: 192.168.xx.3 - endpointPort: 19559 - componentType: metad - - instanceName: graphd0 - endpointIP: 192.168.xx.4 - endpointPort: 19669 - componentType: graphd - - instanceName: storaged0 - endpointIP: 192.168.xx.5 - endpointPort: 19779 - componentType: storaged - - instanceName: storaged1 - endpointIP: 192.168.xx.6 - endpointPort: 19779 - componentType: storaged - - instanceName: storaged2 - endpointIP: 192.168.xx.7 - endpointPort: 19779 + version: v0.0.4 + clusters: + - name: nebula + instances: + - name: metad0 + endpointIP: 192.168.8.157 + endpointPort: 19559 + componentType: metad + - name: metad1 + endpointIP: 192.168.8.155 + endpointPort: 19559 + componentType: metad + - name: metad2 + endpointIP: 192.168.8.154 + endpointPort: 19559 + componentType: metad + - name: graphd0 + endpointIP: 192.168.8.157 + endpointPort: 19669 + componentType: graphd + - name: graphd1 + endpointIP: 192.168.8.155 + endpointPort: 19669 + componentType: graphd + - name: graphd2 + endpointIP: 192.168.8.154 + endpointPort: 19669 + componentType: graphd + - name: storaged0 + endpointIP: 192.168.8.157 + endpointPort: 19779 + componentType: storaged + - name: storaged1 + endpointIP: 192.168.8.155 + endpointPort: 19779 + componentType: storaged + - name: storaged2 + endpointIP: 192.168.8.154 + endpointPort: 19779 + componentType: storaged ``` 2. 执行如下命令启动服务: ```bash - $ nohup ./nebula-stats-exporter --bare-metal --bare-metal-config=./config.yaml & + $ nohup ./nebula-stats-exporter --listen-address=":9200" --bare-metal --bare-metal-config=./config.yaml & ``` 服务启动后,可以在浏览器中输入`:9200`检查服务是否正常启动。 @@ -127,6 +138,7 @@ $ nohup ./node-exporter --web.listen-address=:9100 & static_configs: - targets: [ '192.168.xx.100:9200', # nebula-stats-exporter服务的IP地址和端口。 + '192.168.xx.101:9200' ] - job_name: 'node-exporter' static_configs: diff --git a/docs-2.0/nebula-exchange/about-exchange/ex-ug-limitations.md b/docs-2.0/nebula-exchange/about-exchange/ex-ug-limitations.md index 5540a420415..a8ca9ebbee8 100644 --- a/docs-2.0/nebula-exchange/about-exchange/ex-ug-limitations.md +++ b/docs-2.0/nebula-exchange/about-exchange/ex-ug-limitations.md @@ -8,6 +8,7 @@ Nebula Exchange版本(即JAR包版本)和Nebula Graph的版本对应关系 |Exchange client版本|Nebula Graph版本| |:---|:---| +|{{exchange.release}}|{{nebula.release}}| |2.1.0|2.0.0、2.0.1| |2.0-SNAPSHOT|v2-nightly| |2.0.1|2.0.0、2.0.1| diff --git a/docs-2.0/nebula-exchange/parameter-reference/ex-ug-parameter.md b/docs-2.0/nebula-exchange/parameter-reference/ex-ug-parameter.md index 2c34ccf898c..b25020c4591 100644 --- a/docs-2.0/nebula-exchange/parameter-reference/ex-ug-parameter.md +++ b/docs-2.0/nebula-exchange/parameter-reference/ex-ug-parameter.md @@ -22,7 +22,7 @@ |参数|数据类型|默认值|是否必须|说明| |:---|:---|:---|:---|:---| -|`spark.app.name`|string|`Nebula Exchange 2.0`|否|Spark驱动程序名称。| +|`spark.app.name`|string|-|否|Spark驱动程序名称。| |`spark.driver.cores`|int|`1`|否|驱动程序使用的CPU核数,仅适用于集群模式。| |`spark.driver.maxResultSize`|string|`1G`|否|单个Spark操作(例如collect)时,所有分区的序列化结果的总大小限制(字节为单位)。最小值为1M,0表示无限制。| |`spark.executor.memory`|string|`1G`|否|Spark驱动程序使用的内存量,可以指定单位,例如512M、1G。| @@ -49,9 +49,9 @@ |`nebula.user`|string|-|是|拥有Nebula Graph写权限的用户名。| |`nebula.pswd`|string|-|是|用户名对应的密码。| |`nebula.space`|string|-|是|需要导入数据的的图空间名称。| -|`nebula.path.local`|string|`"/tmp"`|否|(TODO:coding)导入SST文件时需要设置本地SST文件路径。| -|`nebula.path.remote`|string|`"/sst"`|否|(TODO:coding)导入SST文件时需要设置远端SST文件路径。| -|`nebula.path.hdfs.namenode`|string|`"hdfs://name_node:9000"`|否|(TODO:coding)导入SST文件时需要设置HDFS的namenode。| +|`nebula.path.local`|string|`"/tmp"`|否|导入SST文件时需要设置本地SST文件路径。| +|`nebula.path.remote`|string|`"/sst"`|否|导入SST文件时需要设置远端SST文件路径。| +|`nebula.path.hdfs.namenode`|string|`"hdfs://name_node:9000"`|否|导入SST文件时需要设置HDFS的namenode。| |`nebula.connection.timeout`|int|`3000`|否|Thrift连接的超时时间,单位为 ms。| |`nebula.connection.retry`|int|`3`|否|Thrift连接重试次数。| |`nebula.execution.retry`|int|`3`|否|nGQL语句执行重试次数。| @@ -70,7 +70,7 @@ |:---|:---|:---|:---|:---| |`tags.name`|string|-|是|Nebula Graph中定义的Tag名称。| |`tags.type.source`|string|-|是|指定数据源。例如`csv`。| -|`tags.type.sink`|string|`client`|是|指定导入方式,可选值为`client`和`SST`(不支持)。| +|`tags.type.sink`|string|`client`|是|指定导入方式,可选值为`client`和`SST`。| |`tags.fields`|list\[string\]|-|是|属性对应的列的表头或列名。如果有表头或列名,请直接使用该名称。如果CSV文件没有表头,用`[_c0, _c1, _c2]`的形式表示第一列、第二列、第三列,以此类推。| |`tags.nebula.fields`|list\[string\]|-|是|Nebula Graph中定义的属性名称,顺序必须和`tags.fields`一一对应。例如`[_c1, _c2]`对应`[name, age]`,表示第二列为属性name的值,第三列为属性age的值。| |`tags.vertex.field`|string|-|是|点ID的列。例如CSV文件没有表头时,可以用`_c0`表示第一列的值作为点ID。| @@ -97,6 +97,19 @@ |:---|:---|:---|:---|:---| |`tags.exec`|string|-|是|查询数据源的语句。例如`select name,age from mooc.users`。| +### MaxCompute源特有参数 + +|参数|数据类型|默认值|是否必须|说明| +|:---|:---|:---|:---|:---| +|`tags.table`|string|-|是|MaxCompute的表名。| +|`tags.project`|string|-|是|MaxCompute的项目名。| +|`tags.odpsUrl`|string|-|是|MaxCompute服务的odpsUrl。地址可根据[阿里云文档](https://help.aliyun.com/document_detail/34951.html)查看。| +|`tags.tunnelUrl`|string|-|是|MaxCompute服务的tunnelUrl。地址可根据[阿里云文档](https://help.aliyun.com/document_detail/34951.html)查看。| +|`tags.accessKeyId`|string|-|是|MaxCompute服务的accessKeyId。| +|`tags.accessKeySecret`|string|-|是|MaxCompute服务的accessKeySecret。| +|`tags.partitionSpec`|string|-|否|MaxCompute表的分区描述。| +|`tags.sentence`|string|-|否|查询数据源的语句。SQL语句中的表名和上方table的值相同。| + ### Neo4j源特有参数 |参数|数据类型|默认值|是否必须|说明| @@ -118,7 +131,17 @@ |`tags.table`|string|-|是|需要作为数据源的表名称。| |`tags.user`|string|-|是|拥有读取权限的MySQL用户名。| |`tags.password`|string|-|是|用户名对应密码。| -|`tags.sentence`|string|-|是|查询数据源的语句。例如`"select teamid, name from basketball.team order by teamid;"`。| +|`tags.sentence`|string|-|是|查询数据源的语句。例如`"select teamid, name from basketball.team order by teamid;"`。| + +### ClickHouse源特有参数 + +|参数|数据类型|默认值|是否必须|说明| +|:---|:---|:---|:---|:---| +|`tags.url`|string|-|是|ClickHouse的JDBC URL。| +|`tags.user`|string|-|是|有读取权限的ClickHouse用户名。| +|`tags.password`|string|-|是|用户名对应密码。| +|`tags.numPartition`|string|-|是|ClickHouse分区数。| +|`tags.sentence`|string|-|是|查询数据源的语句。| ### Hbase源特有参数 @@ -146,6 +169,12 @@ |`tags.topic`|string|-|是|消息类别。| |`tags.interval.seconds`|int|`10`|是|读取消息的间隔。单位:秒。| +### SST源特有参数 + +|参数|数据类型|默认值|是否必须|说明| +|:---|:---|:---|:---|:---| +|`tags.path`|string|-|是|指定需要生成SST文件的源文件的路径。| + ## 边配置 对于不同的数据源,边的配置也有所不同,有很多通用参数,也有部分特有参数,配置时需要配置通用参数和不同数据源的特有参数。 @@ -158,11 +187,11 @@ |:---|:---|:---|:---|:---| |`edges.name`| string|-|是|Nebula Graph中定义的Edge type名称。| |`edges.type.source`|string|-|是|指定数据源。例如`csv`。| -|`edges.type.sink`|string|`client`|是|指定导入方式,可选值为`client`和`SST`(不支持)。| +|`edges.type.sink`|string|`client`|是|指定导入方式,可选值为`client`和`SST`。| |`edges.fields`|list\[string\]|-|是|属性对应的列的表头或列名。如果有表头或列名,请直接使用该名称。如果CSV文件没有表头,用`[_c0, _c1, _c2]`的形式表示第一列、第二列、第三列,以此类推。| |`edges.nebula.fields`|list\[string\]|-|是|Nebula Graph中定义的属性名称,顺序必须和`edges.fields`一一对应。例如`[_c2, _c3]`对应`[start_year, end_year]`,表示第三列为开始年份的值,第四列为结束年份的值。| |`edges.source.field`|string|-|是|边的起始点的列。例如`_c0`表示第一列的值作为边的起始点。| |`edges.target.field`|string|-|是|边的目的点的列。例如`_c1`表示第二列的值作为边的目的点。| |`edges.ranking`|int|-|否|rank值的列。没有指定时,默认所有rank值为`0`。| |`edges.batch`|int|`256`|是|单批次写入Nebula Graph的最大边数量。| -|`edges.partition`|int|`32`|是|Spark分片数量。| \ No newline at end of file +|`edges.partition`|int|`32`|是|Spark分片数量。| diff --git a/docs-2.0/nebula-exchange/use-exchange/ex-ug-import-from-kafka.md b/docs-2.0/nebula-exchange/use-exchange/ex-ug-import-from-kafka.md index a9cd3ae26c8..4870c497756 100644 --- a/docs-2.0/nebula-exchange/use-exchange/ex-ug-import-from-kafka.md +++ b/docs-2.0/nebula-exchange/use-exchange/ex-ug-import-from-kafka.md @@ -76,6 +76,10 @@ ### 步骤 2:修改配置文件 +!!! note + + 如果部分数据存储在Kafka的value域内,需要自行修改源码,从Kafka中获取value域,将value通过from_json函数解析,然后作为Dataframe返回。 + 编译Exchange后,复制`target/classes/application.conf`文件设置Kafka数据源相关的配置。在本示例中,复制的文件名为`kafka_application.conf`。各个配置项的详细说明请参见[配置说明](../parameter-reference/ex-ug-parameter.md)。 ```conf @@ -142,8 +146,8 @@ # 消息类别。 topic: "topic_name1" - # kafka数据有固定的字段名称:key、value、topic、partition、offset、timestamp、timestampType。 - # 如果需要指定多个列名称,用英文逗号(,)隔开。 + # Kafka数据有固定的域名称:key、value、topic、partition、offset、timestamp、timestampType。 + # Spark读取为DataFrame后,如果需要指定多个字段,用英文逗号(,)隔开。 # 在fields里指定字段名称,例如用key对应Nebula中的name, value对应Nebula中的age,示例如下: fields: [key,value] nebula.fields: [name,age] @@ -205,8 +209,8 @@ # 消息类别。 topic: "topic_name3" - # kafka数据有固定的字段名称:key、value、topic、partition、offset、timestamp、timestampType。 - # 如果需要指定多个列名称,用英文逗号(,)隔开。 + # Kafka数据有固定的域名称:key、value、topic、partition、offset、timestamp、timestampType。 + # Spark读取为DataFrame后,如果需要指定多个字段,用英文逗号(,)隔开。 # 在fields里指定字段名称,例如用key对应Nebula中的degree,示例如下: fields: [key] nebula.fields: [degree] @@ -293,4 +297,4 @@ GO FROM "player100" OVER follow; ### 步骤 5:(如有)在Nebula Graph中重建索引 -导入数据后,用户可以在Nebula Graph中重新创建并重建索引。详情请参见[索引介绍](../../3.ngql-guide/14.native-index-statements/README.md)。 \ No newline at end of file +导入数据后,用户可以在Nebula Graph中重新创建并重建索引。详情请参见[索引介绍](../../3.ngql-guide/14.native-index-statements/README.md)。 diff --git a/docs-2.0/nebula-exchange/use-exchange/ex-ug-import-from-sst.md b/docs-2.0/nebula-exchange/use-exchange/ex-ug-import-from-sst.md index 28824c0ef8d..216a204498a 100644 --- a/docs-2.0/nebula-exchange/use-exchange/ex-ug-import-from-sst.md +++ b/docs-2.0/nebula-exchange/use-exchange/ex-ug-import-from-sst.md @@ -1,6 +1,6 @@ # 导入SST文件数据 -本文以一个示例说明如何将数据源的数据生成SST(Sorted String Table)文件,然后导入Nebula Graph,示例数据源是CSV文件。 +本文以一个示例说明如何将数据源的数据生成SST(Sorted String Table)文件并保存在HDFS上,然后导入Nebula Graph,示例数据源是CSV文件。 > **说明**:仅Linux系统支持导入SST文件。 @@ -236,8 +236,7 @@ SST文件是一个内部包含了任意长度的有序键值对集合的文件 } # 指定CSV文件的路径。 - # 如果文件存储在HDFS上,用双引号括起路径,以hdfs://开头,例如"hdfs://ip:port/xx/xx"。 - # 如果文件存储在本地,用双引号括起路径,以file://开头,例如"file:///tmp/xx.csv"。 + # 文件存储在HDFS上,用双引号括起路径,以hdfs://开头,例如"hdfs://ip:port/xx/xx"。 path: "hdfs://*.*.*.*:9000/dataset/vertex_player.csv" # 如果CSV文件没有表头,使用[_c0, _c1, _c2, ..., _cn]表示其表头,并将列指示为属性值的源。 @@ -282,8 +281,7 @@ SST文件是一个内部包含了任意长度的有序键值对集合的文件 } # 指定CSV文件的路径。 - # 如果文件存储在HDFS上,用双引号括起路径,以hdfs://开头,例如"hdfs://ip:port/xx/xx"。 - # 如果文件存储在本地,用双引号括起路径,以file://开头,例如"file:///tmp/xx.csv"。 + # 文件存储在HDFS上,用双引号括起路径,以hdfs://开头,例如"hdfs://ip:port/xx/xx"。 path: "hdfs://*.*.*.*:9000/dataset/vertex_team.csv" # 如果CSV文件没有表头,使用[_c0, _c1, _c2, ..., _cn]表示其表头,并将列指示为属性值的源。 @@ -333,8 +331,7 @@ SST文件是一个内部包含了任意长度的有序键值对集合的文件 } # 指定CSV文件的路径。 - # 如果文件存储在HDFS上,用双引号括起路径,以hdfs://开头,例如"hdfs://ip:port/xx/xx"。 - # 如果文件存储在本地,用双引号括起路径,以file://开头,例如"file:///tmp/xx.csv"。 + # 文件存储在HDFS上,用双引号括起路径,以hdfs://开头,例如"hdfs://ip:port/xx/xx"。 path: "hdfs://*.*.*.*:9000/dataset/edge_follow.csv" # 如果CSV文件没有表头,使用[_c0, _c1, _c2, ..., _cn]表示其表头,并将列指示为属性值的源。 @@ -386,8 +383,7 @@ SST文件是一个内部包含了任意长度的有序键值对集合的文件 } # 指定CSV文件的路径。 - # 如果文件存储在HDFS上,用双引号括起路径,以hdfs://开头,例如"hdfs://ip:port/xx/xx"。 - # 如果文件存储在本地,用双引号括起路径,以file://开头,例如"file:///tmp/xx.csv"。 + # 文件存储在HDFS上,用双引号括起路径,以hdfs://开头,例如"hdfs://ip:port/xx/xx"。 path: "hdfs://*.*.*.*:9000/dataset/edge_serve.csv" # 如果CSV文件没有表头,使用[_c0, _c1, _c2, ..., _cn]表示其表头,并将列指示为属性值的源。 diff --git a/docs-2.0/nebula-explorer/deploy-connect/ex-ug-deploy.md b/docs-2.0/nebula-explorer/deploy-connect/ex-ug-deploy.md index 7e373281938..a4f65587bd7 100644 --- a/docs-2.0/nebula-explorer/deploy-connect/ex-ug-deploy.md +++ b/docs-2.0/nebula-explorer/deploy-connect/ex-ug-deploy.md @@ -16,6 +16,8 @@ | ---- | ---- | | 7002 | Explorer 提供的 web 服务 | | 8070 | Nebula-http-gateway 的 HTTP 服务 | + +- 使用的 Linux 发行版为 CentOS ,安装有版本为 v10.16.0 + 以上的 Node.js。 ### 安装 @@ -66,7 +68,7 @@ $ sudo rpm -e nebula-graph-explorer-.x86_64 - Nebula Graph 服务已经部署并启动。详细信息参考[Nebula Graph安装部署](../../4.deployment-and-installation/1.resource-preparations.md "点击前往 Nebula Graph 安装部署")。 -- 使用的 Linux 上安装有版本为 v10.12.0 以上的Node.js。 +- 使用的 Linux 发行版为 CentOS ,安装有版本为 v10.16.0 + 以上的 Node.js。 - 以下端口未被使用。 @@ -127,4 +129,4 @@ $ npm run stop # 停止 nebula-graph-explorer ![Nebula Graph Explorer 登录页面](../figs/ex-ug-001.png) -进入 Explorer 登录界面后,用户需要连接 Nebula Graph。详细信息,参考[连接数据库](../deploy-connect/ex-ug-connect.md)。 \ No newline at end of file +进入 Explorer 登录界面后,用户需要连接 Nebula Graph。详细信息,参考[连接数据库](../deploy-connect/ex-ug-connect.md)。 diff --git a/docs-2.0/nebula-spark-connector.md b/docs-2.0/nebula-spark-connector.md index b2e1da3d85d..e6e26412a47 100644 --- a/docs-2.0/nebula-spark-connector.md +++ b/docs-2.0/nebula-spark-connector.md @@ -36,7 +36,7 @@ Nebula Spark Connector {{sparkconnector.release}}版本特性如下: - Reader支持将Nebula Graph数据读取成Graphx的VertexRDD和EdgeRDD,支持非Long型点ID。 -- Nebula Spark Connector 2.0统一了SparkSQL的扩展数据源,统一采用DataSourceV2进行Nebula Graph数据扩展。 +- 统一了SparkSQL的扩展数据源,统一采用DataSourceV2进行Nebula Graph数据扩展。 - 支持`insert`和`update`两种写入模式。`insert`模式会插入(覆盖)数据,`update`模式仅会更新已存在的数据。 @@ -47,7 +47,7 @@ Nebula Spark Connector {{sparkconnector.release}}版本特性如下: 1. 克隆仓库`nebula-spark-utils`。 ```bash - $ git clone -b {{sparkconnector.release}} https://github.com/vesoft-inc/nebula-spark-utils.git + $ git clone -b {{sparkconnector.branch}} https://github.com/vesoft-inc/nebula-spark-utils.git ``` 2. 进入目录`nebula-spark-connector`。 @@ -215,7 +215,7 @@ df.write.nebula(config, nebulaWriteVertexConfig).writeVertices() |`withSpace` |是| Nebula Graph图空间名称。 | |`withTag` |是| 写入点时需要关联的Tag名称。 | |`withVidField` |是| DataFrame中作为点ID的列。 | - |`withVidPolicy` |否| 写入点ID时,采用的映射函数,Nebula Graph 2.0仅支持HASH。默认不做映射。 | + |`withVidPolicy` |否| 写入点ID时,采用的映射函数,Nebula Graph 2.x仅支持HASH。默认不做映射。 | |`withVidAsProp` |否| DataFrame中作为点ID的列是否也作为属性写入。默认值为`false`。如果配置为`true`,请确保Tag中有和`VidField`相同的属性名。 | |`withUser` |否| Nebula Graph用户名。若未开启[身份验证](7.data-security/1.authentication/1.authentication.md),无需配置用户名和密码。 | |`withPasswd` |否| Nebula Graph用户名对应的密码。 | @@ -229,9 +229,9 @@ df.write.nebula(config, nebulaWriteVertexConfig).writeVertices() |`withSpace` |是| Nebula Graph图空间名称。 | |`withEdge` |是| 写入边时需要关联的Edge type名称。 | |`withSrcIdField` |是| DataFrame中作为起始点的列。 | - |`withSrcPolicy` |否| 写入起始点时,采用的映射函数,Nebula Graph 2.0仅支持HASH。默认不做映射。 | + |`withSrcPolicy` |否| 写入起始点时,采用的映射函数,Nebula Graph 2.x仅支持HASH。默认不做映射。 | |`withDstIdField` |是| DataFrame中作为目的点的列。 | - |`withDstPolicy` |否| 写入目的点时,采用的映射函数,Nebula Graph 2.0仅支持HASH。默认不做映射。 | + |`withDstPolicy` |否| 写入目的点时,采用的映射函数,Nebula Graph 2.x仅支持HASH。默认不做映射。 | |`withRankField` |否| DataFrame中作为rank的列。默认不写入rank。 | |`withSrcAsProperty` |否| DataFrame中作为起始点的列是否也作为属性写入。默认值为`false`。如果配置为`true`,请确保Edge type中有和`SrcIdField`相同的属性名。 | |`withDstAsProperty` |否| DataFrame中作为目的点的列是否也作为属性写入。默认值为`false`。如果配置为`true`,请确保Edge type中有和`DstIdField`相同的属性名。 | diff --git a/docs-2.0/nebula-studio/about-studio/st-ug-what-is-graph-studio.md b/docs-2.0/nebula-studio/about-studio/st-ug-what-is-graph-studio.md index 1d31dc0082a..bde449d0450 100644 --- a/docs-2.0/nebula-studio/about-studio/st-ug-what-is-graph-studio.md +++ b/docs-2.0/nebula-studio/about-studio/st-ug-what-is-graph-studio.md @@ -1,20 +1,20 @@ # 什么是 Nebula Graph Studio -Nebula Graph Studio(简称 Studio)是一款可以通过 Web 访问的图数据库可视化工具,搭配 [Nebula Graph](../../README.md) 内核使用,提供构图、数据导入、编写 nGQL 查询、图探索等一站式服务。即使没有图数据库操作经验,用户也可以快速成为图专家。 +Nebula Graph Studio(简称 Studio)是一款可以通过 Web 访问的图数据库开源可视化工具,搭配 [Nebula Graph](../../README.md) 内核使用,提供构图、数据导入、编写 nGQL 查询、图探索等一站式服务。即使没有图数据库操作经验,用户也可以快速成为图专家。用户可以在 Nebula Graph GitHub 仓库中查看最新源码,详情参见[nebula-studio](https://github.com/vesoft-inc/nebula-studio)。 ## 发行版本 Studio 目前有三个发行版本: -- Docker 版本:用户可以使用 Docker 服务部署 Studio,并连接到 Nebula Graph 数据库。详细信息参考 [部署 Studio](../deploy-connect/st-ug-deploy.md)。 -- RPM 版本:用户可以使用 RPM 服务部署 Studio,并连接到 Nebula Graph 数据库。详细信息参考 [部署 Studio](../deploy-connect/st-ug-deploy.md)。 -- tar 包安装部署:用户可以使用 tar 包安装并部署 Studio,并连接到 Nebula Graph 数据库。详细信息参考 [部署 Studio](../deploy-connect/st-ug-deploy.md)。 +- Docker 版本:用户可以使用 Docker 服务部署 Studio,并连接到 Nebula Graph 数据库。详细信息参考 [Docker 部署 Studio](../deploy-connect/st-ug-deploy.md)。 +- RPM 版本:用户可以使用 RPM 服务部署 Studio,并连接到 Nebula Graph 数据库。详细信息参考 [RPM 部署 Studio](../deploy-connect/st-ug-deploy.md)。 +- tar 包安装部署:用户可以使用 tar 包安装并部署 Studio,并连接到 Nebula Graph 数据库。详细信息参考 [tar 包部署 Studio](../deploy-connect/st-ug-deploy.md)。 -三个发行版本功能基本相同。但是,因为部署方式不同,会有不同的使用限制。详细信息,参考 [使用限制](st-ug-limitations.md)。 +三个发行版本功能基本相同,在使用 Studio 时可能会受到限制。详细信息,参考 [使用限制](st-ug-limitations.md)。 ## 产品功能 diff --git a/docs-2.0/nebula-studio/deploy-connect/st-ug-deploy.md b/docs-2.0/nebula-studio/deploy-connect/st-ug-deploy.md index 2ff9fbbd431..251855dbe02 100644 --- a/docs-2.0/nebula-studio/deploy-connect/st-ug-deploy.md +++ b/docs-2.0/nebula-studio/deploy-connect/st-ug-deploy.md @@ -100,7 +100,7 @@ Nebula Graph Studio( 以下简称 Studio )支持云端或本地部署。云 - Nebula Graph 服务已经部署并启动。详细信息,参考[Nebula Graph 安装部署](../../4.deployment-and-installation/1.resource-preparations.md "点击前往 Nebula Graph 安装部署")。 -- 使用的 Linux 发行版为 CentOS ,安装有 lsof 和版本为 v10.16.0 + 以上的 [Node.js](https://www.softwarecollections.org/en/scls/jstanek/rh-nodejs12/)。 +- 使用的 Linux 发行版为 CentOS ,安装有 lsof 和版本为 v10.16.0 + 以上的 [Node.js](https://nodejs.org/zh-cn/)。 !!! note @@ -126,14 +126,14 @@ Nebula Graph Studio( 以下简称 Studio )支持云端或本地部署。云 | 安装包 | 检验和 | Nebula版本 | | ----- | ----- | ----- | - | [nebula-graph-studio-3.0.0-1.x86_64.rpm](https://oss-cdn.nebula-graph.com.cn/nebula-graph-studio/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.com.cn/nebula-graph-studio/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.com.cn/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.com.cn/nebula-graph-studio/3.0.0/nebula-graph-studio-3.0.0-1.x86_64.rpm.sha256) | 2.5.0 | 2. 使用`sudo rpm -i `命令安装RPM包。 - 例如,安装Studio {{ studio.base220 }} 版本需要运行以下命令: + 例如,安装Studio 3.0.0 版本需要运行以下命令: ```bash - $ sudo rpm -i nebula-graph-studio-{{ studio.base220 }}-6.x86_64.rpm + $ sudo rpm -i nebula-graph-studio-3.0.0-1.x86_64.rpm ``` 当屏幕返回以下信息时,表示 PRM 版 Studio 已经成功启动。 @@ -157,7 +157,7 @@ Nebula Graph Studio( 以下简称 Studio )支持云端或本地部署。云 用户可以使用以下的命令卸载 Studio。 ```bash -$ sudo rpm -e nebula-graph-studio-{{ studio.base220 }}-1.x86_64 +$ sudo rpm -e nebula-graph-studio-3.0.0-1.x86_64 ``` ### 异常处理 @@ -219,9 +219,10 @@ $ npm run start ### 安装 1. 根据需要下载 tar 包,建议选择最新版本。 + | 安装包 | Studio 版本 | | --- | --- | - | [nebula-graph-studio-3.0.0-1.x86_64.tar.gz](https://oss-cdn.nebula-graph.com.cn/nebula-graph-studio/nebula-graph-studio-3.0.0-1.x86_64.tar.gz) | 3.0.0 | + | [nebula-graph-studio-3.0.0-1.x86_64.tar.gz](https://oss-cdn.nebula-graph.com.cn/nebula-graph-studio/3.0.0/nebula-graph-studio-3.0.0-1.x86_64.tar.gz) | 3.0.0 | 2. 使用 `tar -xvf` 解压 tar 包。 diff --git a/docs-2.0/reuse/assets.png b/docs-2.0/reuse/assets.png new file mode 100644 index 00000000000..f0dba0f5374 Binary files /dev/null and b/docs-2.0/reuse/assets.png differ diff --git a/docs-2.0/reuse/console.png b/docs-2.0/reuse/console.png new file mode 100644 index 00000000000..3f08d4ba19b Binary files /dev/null and b/docs-2.0/reuse/console.png differ 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 53aabccb681..d8e7b754d0e 100644 --- a/docs-2.0/reuse/source_connect-to-nebula-graph.md +++ b/docs-2.0/reuse/source_connect-to-nebula-graph.md @@ -12,7 +12,7 @@ Nebula Graph支持多种类型客户端,包括CLI客户端、GUI客户端和 ### 前提条件 -- Nebula Graph服务已启动。如何启动服务,请参见[启动和停止Nebula Graph服务](../2.quick-start/5.start-stop-service.md)。 +- Nebula Graph服务已[启动](../2.quick-start/5.start-stop-service.md)。 - 运行Nebula Console的机器和运行Nebula Graph的服务器网络互通。 @@ -21,14 +21,14 @@ Nebula Graph支持多种类型客户端,包括CLI客户端、GUI客户端和 1. 在[Nebula Console](https://github.com/vesoft-inc/nebula-console/releases "the nebula-console Releases page")下载页面,确认需要的版本,单击**Assets**。 !!! Note - + 建议选择**最新**版本。 - ![Select a Nebula Graph version and click **Assets**](https://docs-cdn.nebula-graph.com.cn/docs-2.0/2.quick-start/nebula-console-releases-1.png "Click Assets to show the available Nebula Graph binary files") + ![Select a Nebula Graph version and click **Assets**](../reuse/console.png "Click Assets to show the available Nebula Graph binary files") 2. 在**Assets**区域找到机器运行所需的二进制文件,下载文件到机器上。 - ![Click to download the package according to your hardware architecture](https://docs-cdn.nebula-graph.com.cn/docs-2.0/2.quick-start/nebula-console-releases-2-1.png "Click the package name to download it") + ![Click to download the package according to your hardware architecture](../reuse/assets.png "Click the package name to download it") 3. (可选)为方便使用,重命名文件为`nebula-console`。 @@ -39,7 +39,7 @@ Nebula Graph支持多种类型客户端,包括CLI客户端、GUI客户端和 4. 在运行Nebula Console的机器上执行如下命令,为用户授予nebula-console文件的执行权限。 !!! Note - + Windows系统请跳过此步骤。 ```bash @@ -50,21 +50,21 @@ Nebula Graph支持多种类型客户端,包括CLI客户端、GUI客户端和 6. 执行如下命令连接Nebula Graph。 - - Linux或macOS + - Linux或macOS ```bash $ ./nebula-console -addr -port -u -p - [-t 120] [-e "nGQL_statement" | -f filename.nGQL] + [-t 120] [-e "nGQL_statement" | -f filename.nGQL] ``` - - Windows + - Windows ```powershell > nebula-console.exe -addr -port -u -p - [-t 120] [-e "nGQL_statement" | -f filename.nGQL] + [-t 120] [-e "nGQL_statement" | -f filename.nGQL] ``` - 参数说明如下。 + 参数说明如下。 | 参数 | 说明 | | - | - | @@ -79,31 +79,124 @@ Nebula Graph支持多种类型客户端,包括CLI客户端、GUI客户端和 用户可以使用`./nebula-console --help`命令获取所有参数的说明,也可以在[项目仓库](https://github.com/vesoft-inc/nebula-console/tree/v2.0.0-ga)找到更多说明。 -## Nebula Console导出模式 +## Nebula Console命令 + +Nebula Console提供部分命令,可以导出CSV文件、导出DOT文件、导入测试数据集等。 + +!!! note + + 命令不区分大小写。 + +### 导出CSV文件 + +!!! note + + - CSV文件保存在当前工作目录中,即Linux命令`pwd`显示的目录。 + + - 命令只对下一条查询语句生效。 -导出模式开启时,Nebula Console会导出所有请求的结果到CSV格式文件中。关闭导出模式会停止导出。使用语法如下: +导出CSV文件命令如下: + +```ngql +nebula> :CSV +``` + +### 导出DOT文件 !!! Note - - 命令不区分大小写。 - - CSV格式文件保存在当前工作目录中,即Linux命令`pwd`显示的目录。 + - DOT文件保存在当前工作目录中,即Linux命令`pwd`显示的目录。 + + - DOT文件的内容可以复制后在[GraphvizOnline](https://dreampuf.github.io/GraphvizOnline/)网页中粘贴,生成可视化的执行计划图。 + + - 命令只对下一条查询语句生效。 + +导出DOT文件命令如下: + +```ngql +nebula> :dot +``` + +示例: + +```ngql +nebula> :dot a.dot +nebula> PROFILE FORMAT="dot" GO FROM "player100" OVER follow; +``` + +### 加载测试数据集 + +测试数据集名称为nba,详细Schema信息和数据信息请使用相关`SHOW`命令查看。 + +加载测试数据集命令如下: + +```ngql +nebula> :play nba +``` + +### 重复执行 -- 开启导出模式 +重复执行下一个命令N次,然后打印平均执行时间。命令如下: ```ngql -nebula> :SET CSV +nebula> :repeat N ``` -- 关闭导出模式 +示例: ```ngql -nebula> :UNSET CSV +nebula> :repeat 3 +nebula> GO FROM "player100" OVER follow; ++-------------+ +| follow._dst | ++-------------+ +| "player101" | ++-------------+ +| "player125" | ++-------------+ +Got 2 rows (time spent 2602/3214 us) + +Fri, 20 Aug 2021 06:36:05 UTC + ++-------------+ +| follow._dst | ++-------------+ +| "player101" | ++-------------+ +| "player125" | ++-------------+ +Got 2 rows (time spent 583/849 us) + +Fri, 20 Aug 2021 06:36:05 UTC + ++-------------+ +| follow._dst | ++-------------+ +| "player101" | ++-------------+ +| "player125" | ++-------------+ +Got 2 rows (time spent 496/671 us) + +Fri, 20 Aug 2021 06:36:05 UTC + +Executed 3 times, (total time spent 3681/4734 us), (average time spent 1227/1578 us) ``` -## 使用Nebula Console断开连接 +### 睡眠 + +睡眠N秒。常用于修改Schema的操作中,因为修改Schema是异步实现的,需要在下一个心跳周期才同步数据。命令如下: + +```ngql +nebula> :sleep N +``` + +### 断开连接 用户可以使用`:EXIT`或者`:QUIT`从Nebula Graph断开连接。为方便使用,Nebula Console支持使用不带冒号(:)的小写命令,例如`quit`。 +示例: + ```ngql nebula> :QUIT diff --git a/docs-2.0/reuse/source_install-nebula-graph-by-rpm-or-deb.md b/docs-2.0/reuse/source_install-nebula-graph-by-rpm-or-deb.md new file mode 100644 index 00000000000..a992f8acd92 --- /dev/null +++ b/docs-2.0/reuse/source_install-nebula-graph-by-rpm-or-deb.md @@ -0,0 +1,130 @@ +RPM和DEB是Linux系统下常见的两种安装包格式,本文介绍如何使用RPM或DEB文件在一台机器上快速安装Nebula Graph。 + +!!! note + + 部署Nebula Graph集群的方式参见[使用RPM/DEB包部署集群](/4.deployment-and-installation/2.compile-and-install-nebula-graph/deploy-nebula-graph-cluster)。 + +## 前提条件 + +安装wget + +## 下载安装包 + +### 阿里云OSS下载 + +- 下载release版本 + + URL格式如下: + + ```bash + //Centos 7 + https://oss-cdn.nebula-graph.com.cn/package//nebula-graph-.el7.x86_64.rpm + + //Centos 8 + https://oss-cdn.nebula-graph.com.cn/package//nebula-graph-.el8.x86_64.rpm + + //Ubuntu 1604 + https://oss-cdn.nebula-graph.com.cn/package//nebula-graph-.Ubuntu1604.amd64.deb + + //Ubuntu 1804 + https://oss-cdn.nebula-graph.com.cn/package//nebula-graph-.Ubuntu1804.amd64.deb + + //Ubuntu 2004 + https://oss-cdn.nebula-graph.com.cn/package//nebula-graph-.Ubuntu2004.amd64.deb + ``` + + 例如要下载适用于`Centos 7.5`的`{{ nebula.release }}`安装包: + + ```bash + wget https://oss-cdn.nebula-graph.com.cn/package/{{ nebula.release }}/nebula-graph-{{ nebula.release }}.el7.x86_64.rpm + wget https://oss-cdn.nebula-graph.com.cn/package/{{ nebula.release }}/nebula-graph-{{ nebula.release }}.el7.x86_64.rpm.sha256sum.txt + ``` + + 下载适用于`ubuntu 1804`的`{{ nebula.release }}`安装包: + ```bash + wget https://oss-cdn.nebula-graph.com.cn/package/{{ nebula.release }}/nebula-graph-{{ nebula.release }}.Ubuntu1804.amd64.deb + wget https://oss-cdn.nebula-graph.com.cn/package/{{ nebula.release }}/nebula-graph-{{ nebula.release }}.Ubuntu1804.amd64.deb.sha256sum.txt + ``` + +- 下载日常开发版本(nightly) + + !!! danger + + nightly版本通常用于测试新功能、新特性,请**不要**在生产环境中使用nightly版本。 + + URL格式如下: + + ```bash + //Centos 7 + https://oss-cdn.nebula-graph.com.cn/package/v2-nightly//nebula-graph--nightly.el7.x86_64.rpm + + //Centos 8 + https://oss-cdn.nebula-graph.com.cn/package/v2-nightly//nebula-graph--nightly.el8.x86_64.rpm + + //Ubuntu 1604 + https://oss-cdn.nebula-graph.com.cn/package/v2-nightly//nebula-graph--nightly.Ubuntu1604.amd64.deb + + //Ubuntu 1804 + https://oss-cdn.nebula-graph.com.cn/package/v2-nightly//nebula-graph--nightly.Ubuntu1804.amd64.deb + + //Ubuntu 2004 + https://oss-cdn.nebula-graph.com.cn/package/v2-nightly//nebula-graph--nightly.Ubuntu2004.amd64.deb + ``` + + 例如要下载`2021.08.18`适用于`Centos 7.5`的`2.x`安装包: + + ```bash + wget https://oss-cdn.nebula-graph.com.cn/package/v2-nightly/2021.08.18/nebula-graph-2021.08.18-nightly.el7.x86_64.rpm + wget https://oss-cdn.nebula-graph.com.cn/package/v2-nightly/2021.08.18/nebula-graph-2021.08.18-nightly.el7.x86_64.rpm.sha256sum.txt + ``` + + 要下载`2021.08.18`适用于`Ubuntu 1804`的`2.x`安装包: + ```bash + wget https://oss-cdn.nebula-graph.com.cn/package/v2-nightly/2021.08.18/nebula-graph-2021.08.18-nightly.Ubuntu1804.amd64.deb + wget https://oss-cdn.nebula-graph.com.cn/package/v2-nightly/2021.08.18/nebula-graph-2021.08.18-nightly.Ubuntu1804.amd64.deb.sha256sum.txt + ``` + + + +## 安装Nebula Graph + +- 安装RPM包 + + ```bash + $ sudo rpm -ivh --prefix= + ``` + +- 安装DEB包 + + ```bash + $ sudo dpkg -i --instdir== + ``` + +!!! Note + + 如果不设置安装路径,默认安装路径为`/usr/local/nebula/`。 + +## 后续操作 + +- [启动Nebula Graph](/4.deployment-and-installation/manage-service) +- [连接Nebula Graph](/2.quick-start/3.connect-to-nebula-graph) diff --git a/docs-2.0/reuse/source_manage-service.md b/docs-2.0/reuse/source_manage-service.md index 892757f015f..6dd8971f72a 100644 --- a/docs-2.0/reuse/source_manage-service.md +++ b/docs-2.0/reuse/source_manage-service.md @@ -46,7 +46,7 @@ $ sudo /usr/local/nebula/scripts/nebula.service start all 对于使用Docker Compose部署的Nebula Graph,在`nebula-docker-compose/`目录内执行如下命令启动服务: ```bash -nebula-docker-compose]$ docker-compose up -d +[nebula-docker-compose]$ docker-compose up -d Building with native build. Learn about native build in Compose here: https://docs.docker.com/go/compose-native-build/ Creating network "nebula-docker-compose_nebula-net" with the default driver Creating nebula-docker-compose_metad0_1 ... done @@ -185,4 +185,4 @@ nebula-docker-compose]$ docker exec -it 2a6c56c405f5 bash ## 下一步 -[连接Nebula Graph](../2.quick-start/3.connect-to-nebula-graph.md) \ No newline at end of file +[连接Nebula Graph](../2.quick-start/3.connect-to-nebula-graph.md) diff --git a/mkdocs.yml b/mkdocs.yml index 3cc970655ef..cca8cf0eaee 100755 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,4 +1,3 @@ -# Project information site_name: Nebula Graph Database 手册 site_description: Documentation for Nebula Graph Database site_author: Nebula Graph @@ -101,7 +100,7 @@ nav: - 快速入门: - 快速入门流程: 2.quick-start/1.quick-start-workflow.md - - 步骤1:安装Nebula Graph: 4.deployment-and-installation/2.compile-and-install-nebula-graph/2.install-nebula-graph-by-rpm-or-deb.md + - 步骤1:安装Nebula Graph: 2.quick-start/2.install-nebula-graph.md - 步骤2:启动Nebula Graph: 2.quick-start/5.start-stop-service.md - 步骤3:连接Nebula Graph: 2.quick-start/3.connect-to-nebula-graph.md - 步骤4:使用常用命令: 2.quick-start/4.nebula-graph-crud.md @@ -259,6 +258,7 @@ nav: - 使用Docker Compose部署: 4.deployment-and-installation/2.compile-and-install-nebula-graph/3.deploy-nebula-graph-with-docker-compose.md - 使用RPM/DEB包部署集群: 4.deployment-and-installation/2.compile-and-install-nebula-graph/deploy-nebula-graph-cluster.md - 管理服务: 4.deployment-and-installation/manage-service.md + - 连接服务: 4.deployment-and-installation/connect-to-nebula-graph.md - 升级版本: - 升级历史版本至v2.5.0: 4.deployment-and-installation/3.upgrade-nebula-graph/upgrade-nebula-graph-to-250.md - 升级v2.0.x至v2.5.0: 4.deployment-and-installation/3.upgrade-nebula-graph/upgrade-nebula-from-200-to-250.md @@ -282,11 +282,11 @@ nav: - 身份验证: 7.data-security/1.authentication/1.authentication.md - 用户管理: 7.data-security/1.authentication/2.management-user.md - 内置角色权限: 7.data-security/1.authentication/3.role-list.md - - 备份恢复: - - 什么是BR: 7.data-security/2.backup-restore/1.what-is-br.md - - 编译BR: 7.data-security/2.backup-restore/2.compile-br.md - - 使用BR备份数据: 7.data-security/2.backup-restore/3.br-backup-data.md - - 使用BR恢复数据: 7.data-security/2.backup-restore/4.br-restore-data.md +# - 备份恢复: +# - 什么是BR: 7.data-security/2.backup-restore/1.what-is-br.md +# - 编译BR: 7.data-security/2.backup-restore/2.compile-br.md +# - 使用BR备份数据: 7.data-security/2.backup-restore/3.br-backup-data.md +# - 使用BR恢复数据: 7.data-security/2.backup-restore/4.br-restore-data.md - 管理快照: 7.data-security/3.manage-snapshot.md - 服务调优: @@ -383,6 +383,7 @@ nav: - 导入MaxCompute数据: nebula-exchange/use-exchange/ex-ug-import-from-maxcompute.md - 导入Pulsar数据: nebula-exchange/use-exchange/ex-ug-import-from-pulsar.md - 导入Kafka数据: nebula-exchange/use-exchange/ex-ug-import-from-kafka.md + - 导入SST文件数据: nebula-exchange/use-exchange/ex-ug-import-from-sst.md - Exchange 常见问题: nebula-exchange/ex-ug-FAQ.md - Nebula Algorithm: nebula-algorithm.md @@ -394,7 +395,8 @@ nav: - Nebula Bench: nebula-bench.md - 附录: - - Nebula Graph 常见问题: 20.appendix/0.FAQ.md + - Release Note: 20.appendix/releasenote.md + - 常见问题 FAQ: 20.appendix/0.FAQ.md - 生态工具概览: 20.appendix/6.eco-tool-version.md - 导入工具选择: 20.appendix/write-tools.md - 社区参与: 15.contribution/how-to-contribute.md @@ -422,11 +424,12 @@ markdown_extensions: # Plugins plugins: - search - - macros + - macros: + include_dir: docs-2.0/reuse/ - git-revision-date-localized - with-pdf: copyright: 2021 Vesoft Inc. - cover_subtitle: 2.5.0 + cover_subtitle: master since v2.5.0 author: 吴敏,周瑶,梁振亚,杨怡璇 cover: true back_cover: true diff --git a/overrides/partials/header.html b/overrides/partials/header.html index c6443709a9b..023ed66359f 100644 --- a/overrides/partials/header.html +++ b/overrides/partials/header.html @@ -1,100 +1,100 @@ {#- - This file was automatically generated - do not edit --#} -
-
- -