Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: update java studio docs #106

Merged
merged 3 commits into from
Nov 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions nebula-algorithm/na-ug-toc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# nebula-algorithm 用户手册

- [什么是 nebula-algorithm](na-ug-what-is-nebula-algorithm.md)
- [使用限制](na-ug-limitations.md)
- [编译 nebula-algorithm](na-ug-compile.md)
- [使用示例](na-ug-compile.md)
4 changes: 2 additions & 2 deletions nebula-algorithm/na-ug-what-is-nebula-algorithm.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# 什么是 nebula-algorithm

nebula-algorithm 是一款基于 [GraphX](https://spark.apache.org/graphx/) 的 Spark 应用程序,提供了 PageRank 和 Louvain 社区发现的图计算算法。使用 nebula-algorithm,您能以提交 Spark 任务的形式对 Nebula Graph 数据库中的数据执行图计算。
[nebula-algorithm](https://github.com/vesoft-inc/nebula-java/tree/master/tools/nebula-algorithm) 是一款基于 [GraphX](https://spark.apache.org/graphx/) 的 Spark 应用程序,提供了 PageRank 和 Louvain 社区发现的图计算算法。使用 nebula-algorithm,您能以提交 Spark 任务的形式对 Nebula Graph 数据库中的数据执行图计算。

目前 nebula-algorithm 仅提供了 PageRank 和 Louvain 社区发现算法。如果您有其他需求,可以参考本项目,编写 Spark 应用程序调用 GraphX 自带的其他图算法,如 LabelPropagation、ConnectedComponent 等。

Expand All @@ -12,7 +12,7 @@ nebula-algorithm 根据以下方式实现图算法:
2. 将 DataFrame 转换为 Graphx 的图。
3. 调用 Graphx 提供的图算法(例如 PageRank)或者您自己实现的算法(例如 Louvain 社区发现)。

详细的实现方式,您可以参考 [LouvainAlgo.scala 和 PageRankAlgo.scala](../../tools/nebula-algorithm/../../../tools/nebula-algorithm/src/main/scala/com/vesoft/nebula/tools/algorithm/lib)。
详细的实现方式,您可以参考 [LouvainAlgo.scala 和 PageRankAlgo.scala](https://github.com/vesoft-inc/nebula-java/tree/master/tools/nebula-algorithm/src/main/scala/com/vesoft/nebula/tools/algorithm/lib)。

## PageRank 和 Louvain 简介

Expand Down
1 change: 1 addition & 0 deletions nebula-exchange/about-exchange/ex-ug-limitations.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ Exchange 支持将以下格式或来源的数据转换为 Nebula Graph 能识别
- Apache ORC
- JSON
- CSV
- Apache HBase™
- 数据仓库:HIVE
- 图数据库:Neo4j 2.4.5-M1
- 关系型数据库:MySQL
Expand Down
2 changes: 1 addition & 1 deletion nebula-exchange/about-exchange/ex-ug-what-is-exchange.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# 什么是 Nebula Graph Exchange

Nebula Graph Exchange(简称为 Exchange)是一款 Apache Spark™ 应用,用于在分布式环境中将集群中的数据批量迁移到 Nebula Graph 中,能支持多种不同格式的批式数据和流式数据的迁移。
[Nebula Graph Exchange](https://github.com/vesoft-inc/nebula-java/tree/master/tools/exchange)(简称为 Exchange)是一款 Apache Spark™ 应用,用于在分布式环境中将集群中的数据批量迁移到 Nebula Graph 中,能支持多种不同格式的批式数据和流式数据的迁移。

Exchange 由 Reader、Processor 和 Writer 三部分组成。Reader 读取不同来源的数据返回 DataFrame 后,Processor 遍历 DataFrame 的每一行,根据配置文件中 `fields` 的映射关系,按列名获取对应的值。在遍历指定批处理的行数后,Writer 会将获取的数据一次性写入到 Nebula Graph 中。下图描述了 Exchange 完成数据转换和迁移的过程。

Expand Down
5 changes: 4 additions & 1 deletion nebula-exchange/ex-ug-toc.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
- 操作示例
- [导入 Neo4j 数据](use-exchange/ex-ug-import-from-neo4j.md)
- 导入 HDFS 数据[TODO]
- 导入 HBase 数据[TODO]
- 导入 HIVE 数据[TODO]
- 导入 JanusGraph 数据[TODO]
- 导入 Kafka 数据[TODO]
- 导入 MySQL 数据[TODO]
- [导入 SST 文件](use-exchange/ex-ug-import-sst.md)
Expand All @@ -22,9 +22,12 @@
- 数据源参数
- [Neo4j 参数](parameter-reference/ex-ug-paras-neo4j.md)
- HDFS 参数[TODO]
- HBase 参数[TODO]
- HIVE 参数[TODO]
- Kafka 参数[TODO]
- MySQL 参数[TODO]
- Pulsar 参数[TODO]
- [导入命令参数](parameter-reference/ex-ug-para-import-command.md)
- 错误信息[TODO]

\* 本页面所列 [TODO] 仅表示文档尚未完成。Exchange 已经具备文档所列所有功能。
Binary file modified nebula-exchange/figs/ex-ug-001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions nebula-exchange/use-exchange/ex-ug-import-from-neo4j.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Neo4j 的数据集信息如下:

开始迁移数据之前,您需要确保以下信息:

- 已经完成 Exchange 编译。详细信息,参考 [编译 Exchange](../compile-exchange/ex-ug-compile.md)。
- 已经完成 Exchange 编译。详细信息,参考 [编译 Exchange](../ex-ug-compile.md)。
- 已经安装了 Spark。
- 在 Nebula Graph 中创建图数据模式所需的所有信息,包括标签和边类型的名称、属性等。

Expand Down Expand Up @@ -101,7 +101,7 @@ Neo4j 的数据集信息如下:
CREATE EDGE edgeAB(idInt int, idString string, tboolean bool, tdouble double); -- 创建边类型 edgeAB
```

关于 Nebula Graph 构图的更多信息,参考《Nebula Graph Database 手册》的 [快速开始](https://docs.nebula-graph.com.cn/manual-CN/1.overview/2.quick-start/1.get-started/ "点击前往 Nebula Graph 网站")
关于 Nebula Graph 构图的更多信息,参考《Nebula Graph Database 手册》的 [快速开始](https://docs.nebula-graph.com.cn/manual-CN/1.overview/2.quick-start/1.get-started/ "点击前往 Nebula Graph 网站")。

### 步骤 2. 配置源数据

Expand Down
11 changes: 7 additions & 4 deletions nebula-exchange/use-exchange/ex-ug-import-sst.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,12 @@ RocksDB 提供了一系列 API 用于创建及导入 SST 文件,有助于您
```conf
# Nebula Graph 相关配置
nebula: {
addresses: ["127.0.0.1:3699"]
# 添加 Nebula Graph 数据库 Meta 服务的 IP 地址和端口
meta.addresses:["127.0.0.1:45500"]
address: {
# 添加 Nebula Graph 数据库 Graph 服务的 IP 地址和端口
graph: ["127.0.0.1:3699"]
# 添加 Nebula Graph 数据库 Meta 服务的 IP 地址和端口
meta:["127.0.0.1:45500"]
}
user: user
pswd: password
space: test
Expand Down Expand Up @@ -85,7 +88,7 @@ RocksDB 提供了一系列 API 用于创建及导入 SST 文件,有助于您

- [导入 Neo4j 数据](ex-ug-import-from-neo4j.md)
- 导入 HDFS 数据[TODO]
- 导入 HBase 数据[TODO]
- 导入 HIVE 数据[TODO]
- 导入 JanusGraph 数据[TODO]
- 导入 Kafka 数据[TODO]
- 导入 MySQL 数据[TODO]
4 changes: 2 additions & 2 deletions nebula-exchange/use-exchange/ex-ug-import-steps.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
按以下步骤将不同来源的数据导入 Nebula Graph 数据库:

1. 在 Nebula Graph 中构图,包括创建图空间、创建图数据模式(Schema)。
2. 配置源数据
3. 分别修改 Spark、Nebula Graph 和源数据配置文件
2. (可选)处理源数据。例如,在导入 Neo4j 时,为提高导出速度,在 Neo4j 数据库中为指定的标签属性创建索引
3. 分别修改 Spark、Nebula Graph 以及点和边数据的配置文件
4. 向 Nebula Graph 迁移数据。
5. (可选)在 Nebula Graph 中重构索引。

Expand Down
4 changes: 2 additions & 2 deletions nebula-studio/quick-start/st-ug-create-schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@

按以下步骤使用 **Schema** 创建 Schema:

1. 创建标签。详细信息,参考 [操作标签](../use-studio/manage-schema/st-ug-crud-tag.md)。
2. 创建边类型。详细信息,参考 [操作边类型](../use-studio/manage-schema/st-ug-crud-edge-type.md)。
1. 创建标签。详细信息,参考 [操作标签](../manage-schema/st-ug-crud-tag.md)。
2. 创建边类型。详细信息,参考 [操作边类型](../manage-schema/st-ug-crud-edge-type.md)。

## 使用控制台创建 Schema

Expand Down
3 changes: 3 additions & 0 deletions nebula-studio/st-ug-toc.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,11 @@
- 使用控制台
- 界面介绍 [TODO]
- [导入图探索](use-console/st-ug-open-in-explorer.md)
- [查看子图](use-console/st-ug-visualize-findpath.md)
- 导出 CSV 文件[TODO]
- 最佳实践 [TODO]
- 故障排查 [TODO]
- 连接问题
- 错误信息

\* 本页面所列 [TODO] 仅表示文档尚未完成,并非表示 Studio 不具备相应的功能。
16 changes: 4 additions & 12 deletions spark-connector/sc-ug-what-is-spark-connector.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
# 什么是 Spark Connector
# 什么是 Spark-connector

Spark-connector Spark Nebula Graph 之间进行数据交换的一个工具,包括
[Spark-connector](https://github.com/vesoft-inc/nebula-java/tree/master/tools/nebula-spark) 是一个 Spark 连接器,提供了通过 Spark 标准形式读写 Nebula Graph 数据库的能力,由以下两部分组成

- Spark-connector Reader:为您提供了一个 Spark SQL 接口,您可以使用 Spark SQL 接口编程读取 Nebula Graph 图数据,单次读取一个点或边类型的数据,并将读取的结果组装成 Spark 的 DataFrame。参考 [Spark-connector Reader 相关信息](reader/screader-ug-what-is-sparkconnector-reader.md)。
- Reader:为您提供了一个 Spark SQL 接口,您可以使用 Spark SQL 接口编程读取 Nebula Graph 图数据,单次读取一个点或边类型的数据,并将读取的结果组装成 Spark 的 DataFrame。参考 [Spark-connector Reader 相关信息](reader/screader-ug-what-is-sparkconnector-reader.md)。

- Spark-connector Writer:目前正在开发中。

## 贡献

Spark-connector 是一个完全开源的项目,欢迎开源爱好者通过以下方式参与:

- 前往 [Nebula Graph 论坛](https://discuss.nebula-graph.com.cn/ "点击前往“Nebula Graph 论坛") 上参与 Issue 讨论,如答疑、提供想法或者报告无法解决的问题
- 撰写或改进文档
- 提交优化代码
- Writer:目前正在开发中。
oldLady344 marked this conversation as resolved.
Show resolved Hide resolved