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

Update ex-ug-import-from-sst.md #819

Merged
merged 4 commits into from
Aug 12, 2021
Merged
Changes from 3 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
18 changes: 14 additions & 4 deletions docs-2.0/nebula-exchange/use-exchange/ex-ug-import-from-sst.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 导入SST文件数据(WIP)
# 导入SST文件数据

本文以一个示例说明如何将数据源的数据生成SST(Sorted String Table)文件,然后导入Nebula Graph,示例数据源是CSV文件。

Expand All @@ -12,13 +12,23 @@ Exchange支持两种数据导入模式:

- 将数据源的数据生成SST文件,然后借助Console将SST文件导入Nebula Graph。

下文将介绍生成导入SST文件的实现方法、前提条件、操作步骤等内容。
下文将介绍生成SST文件并用其导入数据的适用场景、实现方法、前提条件、操作步骤等内容。

## 适用场景

- 适合在线业务,因为生成时几乎不会影响业务(只是读取Schema),导入速度快。

!!! caution

虽然导入速度快,但是导入期间会阻塞对应空间的写操作,建议在业务低峰期进行导入。
cooper-lzy marked this conversation as resolved.
Show resolved Hide resolved

- 适合数据源数据量较大的场景,导入速度快。

## 实现方法

Nebula Graph底层使用RocksDB作为键值型存储引擎。RocksDB是基于磁盘的存储引擎,提供了一系列API用于创建及导入SST格式的文件,有助于快速导入海量数据。
cooper-lzy marked this conversation as resolved.
Show resolved Hide resolved

SST文件是一个内部包含了任意长度、排好序的键值对集合的文件,用于高效地存储大量键值型数据。生成SST文件的整个过程主要由Exchange的Reader、sstProcessor和sstWriter完成。整个数据处理过程如下:
SST文件是一个内部包含了任意长度的有序键值对集合的文件,用于高效地存储大量键值型数据。生成SST文件的整个过程主要由Exchange的Reader、sstProcessor和sstWriter完成。整个数据处理过程如下:

1. Reader从数据源中读取数据。

Expand Down Expand Up @@ -57,7 +67,7 @@ SST文件是一个内部包含了任意长度、排好序的键值对集合的

- Hadoop:2.9.2 伪分布式部署

- Nebula Graph:{{nebula.release}}。使用[Docker Compose部署](../../4.deployment-and-installation/2.compile-and-install-nebula-graph/3.deploy-nebula-graph-with-docker-compose.md)。
- Nebula Graph:{{nebula.release}}。

## 前提条件

Expand Down