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

Import optimization #2782

Merged
merged 5 commits into from
May 22, 2023
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
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
!!! enterpriseonly

- 如需购买{{explorer.name}},请[联系我们](https://yueshu.com.cn/contact)。
- 新用户可以[申请 30 天试用](https://wj.qq.com/s2/10158890/69a8)。你也可以[在线体验{{explorer.name}}](https://explorer.nebula-graph.com.cn/) 部分功能
- 新用户可以[申请 30 天试用](https://computenest.console.aliyun.com/user/cn-hangzhou/serviceInstanceCreate?spm=5176.product-detail.detail.2.7b69418emmnkV9&ServiceId=service-39f4f251e9484369a778&isTrial=true)

## 适用场景

Expand Down Expand Up @@ -56,8 +56,10 @@
| 2.6.x | 2.1.0 |
| 2.5.x | 2.0.0 |


<!--
## 视频

* [NebulaGraph Explore Demo Show](https://www.bilibili.com/video/BV1VL4y1V7C2/)(2 分 54 秒)
<iframe src="//player.bilibili.com/player.html?aid=853353222&bvid=BV1VL4y1V7C2&cid=581214591&page=1&high_quality=1" scrolling="no" border="0" frameborder="no" framespacing="0" allowfullscreen="true" width="720px" height="480px"> </iframe>

-->
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,3 @@
| 画质 | 高:点以球的形式展示,光影效果更好。<br />低:点以圆的形式展示,可以支持更大数据量。 |
| 重新受力 | 当不同的点重叠时,分散点与点之间的距离。 |

!!! compatibility "历史版本兼容性"

针对 3.0.0 以下版本的 NebulaGraph,需要创建索引后才可以使用鸟瞰功能。更多信息,参见[创建索引](../../3.ngql-guide/14.native-index-statements/1.create-native-index.md)。
46 changes: 29 additions & 17 deletions docs-2.0/nebula-explorer/db-management/11.import-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## 前提条件

-{{nebula.name}}里已经创建 Schema。
- {{nebula.name}}里已经创建 Schema。

- CSV 文件符合 Schema 要求。

Expand All @@ -16,36 +16,48 @@

## 操作步骤

### 上传文件
导入数据主要分为 2 个部分,新建数据源和创建导入任务,接下来将详细介绍。

1. 选择的**上传文件**页签,单击**上传文件**按钮,选择需要的 CSV 文件。
### 新建数据源

!!! Note
在页面右上角单击**新建数据源**,设置数据来源及其相关设置。当前支持 3 种类型的数据源。

一次可以选择多个 CSV 文件。
| 数据源类型 | 说明 |
| :--- | :--- |
| 云存储 | 添加云存储作为 CSV 文件来源,只支持兼容 Amazon S3接口的云服务。 |
| SFTP | 添加 SFTP 作为 CSV 文件来源。 |
| 本地文件 | 上传本地 CSV 文件。文件大小不能超过 200 MB,超过限制的文件请放入其他方式的数据源中。 |

2. 上传结束后,可以在文件列表的 **操作** 列,单击 ![detail](https://docs-cdn.nebula-graph.com.cn/figures/detail.png) 图标预览文件内容。
!!! Note

### 导入数据
- 上传本地 CSV 文件时,一次可以选择多个 CSV 文件。
- 数据源添加后,可以在页面上方单击**数据源管理**,切换页签即可查看不同类型的数据源详情,也可以编辑或删除数据源。

1. 选择**导入数据**页签,单击**创建导入任务**按钮,完成如下设置:
### 创建导入任务

1. 在页面左上角单击**创建导入任务**,完成如下设置:

!!! caution

用户也可以单击**导入模版**,下载示例配置文件`example.yaml`,配置后再上传配置文件。配置方式与 [NebulaGraph Importer](../../nebula-importer/use-importer.md) 大致相同,但是所有文件路径仅保留文件名。并且请确保在导入配置文件之前已上传所有 CSV 数据文件
用户也可以单击**导入模版**,下载示例配置文件`example.yaml`,配置后再上传配置文件。配置方式与 [NebulaGraph Importer](../../nebula-importer/use-importer.md)大致相同。

- **图空间**:需要导入数据的图空间名称。
- **任务名称**:默认自动生成,可以修改。
- **批处理量**(可选):每批导入多少行数据。
- **关联点**:单击**绑定数据源** 按钮,在对话框中选择绑定文件并单击**确认**按钮。

- 在 **vertices 1** 页签内的 `vertexID` 项中,单击 **Select CSV Index**,在弹出的对话框内为 VID 选择数据源。
- 单击**添加Tag**按钮,然后在新创建的**Tag**页签内单击**选择 Tag**,选择需要关联的 Tag。在显示的属性列表中,为属性选择数据源。
- **更多配置**(可选):可以自定义设置并发数、批处理量、重试次数、读取并发数和导入并发数。
- **关联标签**:

1. 单击**添加 Tag**,然后在下方新增的标签内选择 Tag。
2. 单击**添加导入文件**,在**文件源**里选择**数据源类型**和**文件路径**,找到需要导入的文件,然后单击**添加**。
3. 在预览页面设置文件的分隔符和是否携带表头,然后单击**确认**。
4. 在**VID 列**为 VID 选择对应的列。支持选择多个列合并为 VID,也可以为 VID 添加前缀或后缀。
5. 在**属性**框内为属性选择对应的列。对于可以为`NULL`或设置了`DEFAULT`的属性,可以不指定对应的列。
6. 重复 2 ~ 5 步骤将步骤 1 所选 Tag 的数据文件全部导入。
7. 重复 1 ~ 6 步骤将所有需要导入的 Tag 数据全部导入。

- **关联边**:与关联点的操作相同
- **关联边**:与关联标签的操作相同

![导入任务](https://docs-cdn.nebula-graph.com.cn/figures/import_task_221111_cn.png)
![导入任务](https://docs-cdn.nebula-graph.com.cn/figures/explorer_import_230522_cn.png)

2. 完成设置后,单击**导入**,输入{{nebula.name}}账号的密码并确认。

可以在**导入数据**页签内查看日志、下载日志、下载配置文件、删除任务等操作。
导入任务创建后,可以在**导入数据**页签内查看导入任务的进度,支持编辑任务、查看日志、下载日志、重新导入、下载配置文件、删除任务等操作。
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
|:--|:--|
|账号|用户名。|
|密码|用户名对应密码。|
|IP 白名单|用户只有通过列表内的 IP 才能连接 NebulaGraph。多个 IP 之间用英文逗号(,)分隔。仅{{nebula.name}}企业版支持该参数。|
|IP 白名单|用户只有通过列表内的 IP 才能连接数据库。多个 IP 之间用英文逗号(,)分隔。|

!!! note

Expand Down
2 changes: 1 addition & 1 deletion docs-2.0/nebula-explorer/deploy-connect/ex-ug-connect.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ OAuth 部分的配置说明如下。

在浏览器窗口中看到以下登录界面表示已经成功部署并启动了{{explorer.name}}。

![{{explorer.name}}登录页面](https://docs-cdn.nebula-graph.com.cn/figures/explorer_connect_230116_cn.png)
![{{explorer.name}}登录页面](https://docs-cdn.nebula-graph.com.cn/figures/explorer_connect_230522_cn.png)

!!! note

Expand Down
46 changes: 21 additions & 25 deletions docs-2.0/nebula-explorer/deploy-connect/ex-ug-deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,25 +44,25 @@

2. 使用`sudo rpm -i <rpm>`命令安装 RPM 包。

例如,安装{{explorer.name}}需要运行以下命令,默认安装路径为`/usr/local/nebula-explorer`:
例如,安装{{explorer.name}}需要运行以下命令,默认安装路径为`/usr/local/yueshu-explorer`:

```bash
sudo rpm -i nebula-explorer-<version>.x86_64.rpm
sudo rpm -i yueshu-explorer-<version>.x86_64.rpm
```

也可以使用`--prefix`选项安装到指定路径:
```bash
sudo rpm -i nebula-explorer-<version>.x86_64.rpm --prefix=<path>
sudo rpm -i yueshu-explorer-<version>.x86_64.rpm --prefix=<path>
```

2. 进入解压后的文件夹,在`config`目录内修改`app-config.yaml`文件,设置`LicenseManagerURL`的值为 LM 所在的主机 IP 和端口号`9119`,例如`192.168.8.100:9119`。

3. (可选)配置 Dag Controller。参见下文 **配置 Dag Controller** 部分。

4. 进入`nebula-explorer`文件夹,执行以下命令启动服务。
4. 进入`yueshu-explorer`文件夹,执行以下命令启动服务。

```bash
cd nebula-explorer
cd yueshu-explorer

# 启动{{explorer.name}}。
sudo ./scripts/start.sh
Expand All @@ -76,9 +76,9 @@
支持使用 systemctl 服务控制项目启停。

```bash
systemctl status nebula-explorer #查看服务状态
systemctl stop nebula-explorer #停止服务
systemctl start nebula-explorer #启动服务
systemctl status yueshu-explorer #查看服务状态
systemctl stop yueshu-explorer #停止服务
systemctl start yueshu-explorer #启动服务
```

也可以在安装目录下使用以下命令,手动启动或停止服务。
Expand All @@ -95,7 +95,7 @@ sudo ./dag-ctrl/scripts/stop.sh #停止 Dag Controller 服务
使用以下的命令卸载{{explorer.name}}。

```bash
sudo rpm -e nebula-explorer-<version>.x86_64
sudo rpm -e yueshu-explorer-<version>.x86_64
```

## DEB 部署
Expand All @@ -111,10 +111,10 @@ sudo rpm -e nebula-explorer-<version>.x86_64

2. 使用`sudo dpkg -i <package_name>`命令安装 DEB 包。

例如,安装{{explorer.name}}需要运行以下命令,默认安装路径为`/usr/local/nebula-explorer`:
例如,安装{{explorer.name}}需要运行以下命令,默认安装路径为`/usr/local/yueshu-explorer`:

```bash
sudo dpkg -i nebula-explorer-{{explorer.release}}.x86_64.deb
sudo dpkg -i yueshu-explorer-{{explorer.release}}.x86_64.deb
```

!!! note
Expand All @@ -125,10 +125,10 @@ sudo rpm -e nebula-explorer-<version>.x86_64

4. (可选)配置 Dag Controller。参见下文 **配置 Dag Controller** 部分。

5. 进入`nebula-explorer`文件夹,执行以下命令启动服务。
5. 进入`yueshu-explorer`文件夹,执行以下命令启动服务。

```bash
cd nebula-explorer
cd yueshu-explorer

# 启动{{explorer.name}}。
sudo ./lib/start.sh
Expand All @@ -140,21 +140,21 @@ sudo rpm -e nebula-explorer-<version>.x86_64
### 查看服务状态

```bash
sudo systemctl status nebula-explorer.service
sudo systemctl status yueshu-explorer.service
```

### 停止服务

```bash
sudo systemctl stop nebula-explorer.service
sudo systemctl stop yueshu-explorer.service
```

### 卸载

使用以下的命令卸载{{explorer.name}}。

```bash
sudo dpkg -r nebula-explorer
sudo dpkg -r yueshu-explorer
```

## TAR 包部署
Expand All @@ -163,30 +163,26 @@ sudo dpkg -r nebula-explorer

1. 根据需要下载 TAR 包,建议选择最新版本。

!!! enterpriseonly

{{explorer.name}}仅在企业版提供,点击[定价](https://nebula-graph.com.cn/pricing/)查看更多。

2. 使用 `tar -xvf` 解压 tar 包。

```bash
tar -xvf nebula-explorer-<version>.tar.gz
tar -xvf yueshu-explorer-<version>.tar.gz
```

3. 进入解压后的文件夹,在`config`目录内修改`app-config.yaml`文件,设置`LicenseManagerURL`的值为 LM 所在的主机 IP 和端口号`9119`,例如`192.168.8.100:9119`。

4. (可选)配置 Dag Controller。参见下文 **配置 Dag Controller** 部分。

5. 进入`nebula-explorer`文件夹,执行以下命令启动服务。
5. 进入`yueshu-explorer`文件夹,执行以下命令启动服务。

```bash
cd nebula-explorer
cd yueshu-explorer

# 启动{{explorer.name}}和 Dag Controller。
sudo ./scripts/start.sh

# 单独启动{{explorer.name}}。
sudo nohup ./nebula-explorer-server > explorer.log 2>&1 &
sudo nohup ./yueshu-explorer-server > explorer.log 2>&1 &
```

### 停止服务
Expand Down Expand Up @@ -281,7 +277,7 @@ Dag Controller 可以结合{{plato.name}}进行复杂的图计算。例如 Dag C
- 其它参数是算法的执行参数,后续在[可视化工作流页面](../workflow/2.create-workflow.md)配置。

```bash
exec_file: /home/xxx/nebula-analytics/scripts/run_algo.sh
exec_file: /home/xxx/yueshu-analytics/scripts/run_algo.sh
```

## 后续操作
Expand Down
2 changes: 1 addition & 1 deletion docs-2.0/nebula-explorer/ex-ug-page-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

{{explorer.name}}由顶部导航栏、左侧导航栏、和画布三大模块组成。

![explorer-overview](https://docs-cdn.nebula-graph.com.cn/figures/ex-overview-230105-cn.png)
![explorer-overview](https://docs-cdn.nebula-graph.com.cn/figures/ex-overview-230522-cn.png)

## 顶部导航栏

Expand Down
6 changes: 3 additions & 3 deletions docs-2.0/nebula-explorer/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,19 @@ Dag Controller 包含图查询组件和图计算组件。图查询是发送请

修改`dag-ctrl/etc/dag-ctrl-api.yaml`配置文件,配置 SSH 的`UserName`。

## 任务运行失败,报错`bash: /home/xxx/nebula-analytics/scripts/run_algo.sh: No such file or directory`怎么办?
## 任务运行失败,报错`bash: /home/xxx/yueshu-analytics/scripts/run_algo.sh: No such file or directory`怎么办?

修改`dag-ctrl/etc/tasks.yaml`配置文件,配置算法执行路径`exec_file`。

## 任务运行失败,报错`/lib64/libm.so.6: version 'GLIBC_2.29' not found (required by /home/vesoft/jdk-18.0.1/jre/lib/amd64/server/libjvm.so)`怎么办?

由于 JDK18 版本太新,而操作系统版本太旧,`YUM`无法下载`GLIBC_2.29`,可以安装 JDK1.8,请同步修改`nebula-analytics/scripts/set_env.sh`中的 JDK 地址。
由于 JDK18 版本太新,而操作系统版本太旧,`YUM`无法下载`GLIBC_2.29`,可以安装 JDK1.8,请同步修改`yueshu-analytics/scripts/set_env.sh`中的 JDK 地址。

## 任务运行失败,报错`handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain`怎么办?

重新配置`.ssh`文件夹及`.ssh/authorized_keys`文件的权限,`.ssh`文件夹权限为`744`,`.ssh/authorized_keys`文件权限为`600`。

## 任务运行失败,报错`There are 0 NebulaGraph Analytics available. clusterSize should be less than or equal to it`怎么办?
## 任务运行失败,报错`There are 0 Yueshu Analytics available. clusterSize should be less than or equal to it`怎么办?

按如下流程排查:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
- 路径查询
- 查看属性

![query_exploration](https://docs-cdn.nebula-graph.com.cn/figures/exploration-query-22-04-06_cn.gif)

## 前提条件

使用**探索拓展**的所有功能前,确保画布中有点数据。具体操作,参见[开始探索](ex-ug-query-exploration.md)。
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@

已选择目标图空间。详情参见[选择图空间](13.choose-graphspace.md)。

!!! compatibility "历史版本兼容性"

针对 3.0.0 以下版本的 NebulaGraph,需要创建索引后才可以使用查询功能。更多信息,参见[创建索引](../../3.ngql-guide/14.native-index-statements/1.create-native-index.md)。

## 操作步骤

在{{explorer.name}}页面左侧单击**开始**图标![query](https://docs-cdn.nebula-graph.com.cn/figures/nav-query2_cn.png)然后查询数据。查询到的数据会显示在画布中。查询方式如下:
Expand All @@ -29,10 +25,6 @@

查询区域中每行仅支持填入一个 VID,用回车键分隔。

下图以图空间`basketballplayer`及相关数据为例演示如何查询数据。

![VID QUERY](https://docs-cdn.nebula-graph.com.cn/figures/vid-query-22-04-06_cn.gif)

### Tag 查询

用户可以选择 Tag 和对应索引查询目标点,还可以设置结果数量限制和筛选条件。
Expand Down
2 changes: 1 addition & 1 deletion docs-2.0/nebula-explorer/system-settings.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# 系统设置

本文介绍 NebulaGraph Explorer 的系统设置,包括全局设置和自定义设置。
本文介绍{{explorer.name}}的系统设置,包括全局设置和自定义设置。

## 全局设置

Expand Down
14 changes: 11 additions & 3 deletions docs-2.0/nebula-explorer/workflow/1.prepare-resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@

3. 配置如下资源:

![workflow_configuration](https://docs-cdn.nebula-graph.com.cn/figures/workflow_configuration_230424_cn.png)
![workflow_configuration](https://docs-cdn.nebula-graph.com.cn/figures/workflow_configuration_230522_cn.png)

- NebulaGraph 配置
- 悦数 配置

执行图查询或写入图计算结果的 Graph 服务地址。默认为登录 Explorer 使用的 Graph 服务,无法修改。可以设置三种服务的超时时间。

Expand All @@ -29,7 +29,7 @@
- 数据路径:Analytics 数据目录,NFS 服务的共享目录。工作流默认使用 NFS 方式存储图计算结果,但是需要用户手动安装 NFS 并挂载目录。
- SSH 免密私钥路径:Dag Controller 所在机器的私钥文件路径。用于机器间 SSH 免密登录。

- NebulaGraph Analytics 节点配置
- 悦数 Analytics 节点配置

添加执行图计算的 NebulaGraph Analytics 地址。

Expand All @@ -40,6 +40,14 @@
- Analytics 节点本地数据目录:默认为`~/analytics-data`。
- Analytics 节点算法脚本路径:默认为`~/nebula-analytics/scripts/run_algo.sh`。

- NFS 配置

!!! note

用户需要自行将 NFS Server 部署在 Dag Controller 所在机器上并配置共享目录,然后将 NFS Client 部署在所有 Analytics 节点机器上并挂载共享目录。

默认开启,任务运行结果将保存至本地。用户可以修改结果的保存路径。

- HDFS 配置(可选)

默认情况下使用的是 NFS 保存图计算结果,如果需要使用 HDFS,请先在 Analytics 所在机器上安装 HDFS 客户端,该配置才能生效。
Expand Down
2 changes: 1 addition & 1 deletion docs-2.0/nebula-explorer/workflow/2.create-workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
|配置项|说明|
|:---|:---|
|PageRank|单击![pencil](https://docs-cdn.nebula-graph.com.cn/figures/workflow-edit.png)可以修改组件名称,方别识别。|
|输入|支持多种数据源作为输入。<br>**NebulaGraph** 可以选择图空间和对应的边类型。<br>**Dependence** 会根据锚点的连接情况自动识别。<br>**HDFS**可以选择 HDFS 和数据源文件的相对路径。<br>**Local**可以选择 NFS 中数据源文件的相对路径。|
|输入|支持多种数据源作为输入。<br>**Graph Database** 可以选择图空间和对应的边类型。<br>**Dependence** 会根据锚点的连接情况自动识别。<br>**HDFS**可以选择 HDFS 和数据源文件的相对路径。<br>**Local**可以选择 NFS 中数据源文件的相对路径。|
|参数配置|设置图算法特有的参数。不同算法的参数不同,部分参数可以从任意上游组件获取,此时锚点显示为黄色。|
|输出|显示图计算结果的列名,无法修改。|
|执行配置|**机器数量**表示将要执行算法的机器数量。<br>**进程数量**表示将要执行算法的总进程数,会根据机器数量平均分配到各个机器。<br>**线程数量**表示每个进程会启动多少个线程。|
Expand Down
Loading