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

Add administrator guide of load #1488

Merged
merged 4 commits into from
Jul 25, 2019
Merged

Conversation

EmmyMiao87
Copy link
Contributor

The catalogue of load docs:

  • load-manual.md
    ---- broker-load-manual.md
    ---- insert-into-manual.md
    ---- stream-load-manual.md

This commit also changes max/min_stream_load_timeout to max/min_load_timeout.
The old config named stream_load_timeout means the max timeout suited for all types of load.
So the config name has been changed.

The catalogue of load docs:
+ load-manual.md
---- broker-load-manual.md
---- insert-into-manual.md
---- stream-load-manual.md

This commit also changes max/min_stream_load_timeout to max/min_load_timeout.
The old config named stream_load_timeout means the max timeout suited for all types of load.
So the config name has been changed.
Copy link
Contributor

@morningman morningman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

建议按照如下方式组织文档:

  1. load-manual 中仅介绍 Doris 导入的一些总体概念,如

    • 针对批量导入设计,大致流程。
    • PENDING\ETL 这些状态。
    • 不介绍任何具体使用方式和参数
  2. 在各自的文档中,详细介绍和对应导入方式相关的所有使用方式和配置参数,保证用户在一个文档内就能完全掌握对应的导入方式。

  3. 每个导入文档可以在最开始提供一个demo,帮助用户可以跟着demo完成一次对应的导入操作。

  4. 任何已经废弃的、或即将废弃的(如mini load, version v1 等),不提,或者引导用户使用新的方式。

  5. 每种导入要给出最佳实践,比如适合的数据量、适用的场景、可能出现的问题和解决办法。

# 导入
导入(Load)功能就是将用户的原始数据导入到 Doris 中。导入成功后,用户即可通过 Mysql 客户端查询数据。

本文档主要介绍导入简单原理,目前支持的几种导入方式,以及最佳实践。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里说明下,该文档为 Doris 数据导入方式的总体介绍。具体的各种导入方式请参阅具体的导入文档。


本文档主要介绍导入简单原理,目前支持的几种导入方式,以及最佳实践。

# 基本概念
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

基本概念中最好直接列出Doris支持的几种导入方式的名称以及一句话介绍,并引导用户到对应的操作文档。


同步执行的导入比如:Stream load,任务会直接进入LOADING阶段。异步执行的导入方式比如: Broker load,任务会先进入PENDING阶段。

执行 ``` HELP BROKER LOAD;/ HELP MINI LOAD;/ HELP STREAM LOAD;/ HELP MULTI LOAD;``` 查看不同导入方式的语法帮助。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HELP BROKER LOAD;/ HELP MINI LOAD;/ HELP STREAM LOAD;/ HELP MULTI LOAD;
变成列表吧:

  • HELP BROKER LOAD;
  • HELP MINI LOAD;
    ...


上述阶段,除了 PENDING 到 LOADING 阶段是 Scheduler 轮训调度的,其他阶段之前的转移都是回调机制实现。

# 导入相关配置
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个相关配置建议写到各自的导入的手册中,即使冗余,但是方便用户在同一个文档内查看所有的配置

通常情况下,用户不需要手动设置导入任务的超时时间。每种导入任务都有默认的导入超时时间(具体见各个)。当在默认超时时间内无法完成导入时,可以手动设置任务的超时时间。(具体每种导入的默认超时配置见每种导入的操作手册)


**推荐超时时间**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

给个例子吧,比如 1G数据导入有3个rollup的表,大约需要多久。
而且这个和BE数量也有一定关系吧?


``` dpp.norm.ALL ``` 指的是导入过程中正确数据的条数。可以通过 ``` SHOW LOAD ``` 命令查询导入任务的正确数据量。

``` num_rows_unselected ``` 导入过程中被 where 条件过滤掉的数据量。过滤的数据量不参与容忍率的计算。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

num_rows_unselected 并不会显示在所有的 load 的返回结果中。比如 broker load 就没有。所以建议这些都放在各自的手册中吧。

导入任务的错误数据样例,访问 URL 地址既可获取本次导入的错误数据样例。当本次导入不存在错误数据时,URL 字段则为 N/A。


## 取消导入
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

并不是所有导入都可以取消

@@ -1,17 +1,88 @@
# Broker Load
Broker load 是一个异步的导入方式,主要支持的数据源有 HDFS, BOS, AFS。用户需要通过 Mysql client 创建 Broker load 导入,并通过查看导入命令检查导入结果。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

支持的数据源afs,和 bos,大家都不知道,afs外部用户也用不到。所以这里支持的数据源应该是broker进程支持读取的数据源。


### strict mode
broker load导入可以开启strict mode模式。开启方式为 ```properties ("strict_mode" = "true")``` 。默认的 strict mode为开启。
Broker load 导入可以开启 strict mode模式。开启方式为 ```properties ("strict_mode" = "true")``` 。默认的 strict mode为开启。

*注意:strict mode 功能仅在新版本的broker load中有效,如果导入明确指定 ```"version" = "v1"``` 则没有此功能。*
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

`"version" = "v1"`` 这个去掉吧,用户也不知道version 是啥

## 创建导入
Insert into 创建导入请求需要通过 Mysql 协议提交,创建导入请求会同步返回导入结果。

+ VALUES
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

要注明VALUES这种方式仅适用于导入几条数据作为demo,完全不适用于任何测试和生产环境。Doris 不合适单条导入的场景。请使用 Insert into select 进行批量导入

@EmmyMiao87
Copy link
Contributor Author

  1. 总文档中隐去transaction 的概念,用户不好理解。
  2. 异步导入方式下,用户可以提交的最大job数量和同时能够running的job数量之间的关系,以及对应的两个配置要说明下(你只说了 desired_max_waiting_jobs 这一个)
  3. ROUTINE LOAD 也应该放到总体文档介绍
  4. Stream load 中的列映射和转换方式介绍。

@morningman morningman merged commit 000e9cf into apache:master Jul 25, 2019
morningman pushed a commit to baidu-doris/incubator-doris that referenced this pull request Jul 28, 2019
The catalogue of load docs:
---- load-manual.md
---- broker-load-manual.md
---- insert-into-manual.md
---- stream-load-manual.md

This commit also changes max/min_stream_load_timeout to max/min_load_timeout.
The old config named stream_load_timeout means the max timeout suited for all types of load.
So the config name has been changed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants