Skip to content
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
2 changes: 1 addition & 1 deletion docs/.vuepress/sidebar/zh-CN.js
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ module.exports = [
"to_days",
"unix_timestamp",
"utc_timestamp",
"workofyear",
"weekofyear",
"year",
],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@ create/drop index 语法
或者 [ALTER TABLE](../../sql-reference/sql-statements/Data%20Definition/ALTER%20TABLE.html) 中bitmap 索引相关的操作

## 创建作业
参照 schema change 文档 [Scheam Change](alter-table-schema-change.html)
参照 schema change 文档 [Schema Change](alter-table-schema-change.html)

## 查看作业
参照 schema change 文档 [Scheam Change](alter-table-schema-change.html)
参照 schema change 文档 [Schema Change](alter-table-schema-change.html)

## 取消作业
参照 schema change 文档 [Scheam Change](alter-table-schema-change.html)
参照 schema change 文档 [Schema Change](alter-table-schema-change.html)

## 注意事项
* 目前索引仅支持 bitmap 类型的索引。
Expand Down
6 changes: 3 additions & 3 deletions docs/zh-CN/administrator-guide/colocation-join.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Colocation Join 功能,是将一组拥有相同 CGS 的 Table 组成一个 CG

同一个 CG 内的表,分区的个数、范围以及分区列的类型不要求一致。

在固定了分桶列和分桶数后,同一个 CG 内的表会拥有相同的 BucketsSequnce。而副本数决定了每个分桶内的 Tablet 的多个副本,存放在哪些 BE 上。假设 BucketsSequnce 为 `[0, 1, 2, 3, 4, 5, 6, 7]`,BE 节点有 `[A, B, C, D]` 4个。则一个可能的数据分布如下:
在固定了分桶列和分桶数后,同一个 CG 内的表会拥有相同的 BucketsSequence。而副本数决定了每个分桶内的 Tablet 的多个副本,存放在哪些 BE 上。假设 BucketsSequence 为 `[0, 1, 2, 3, 4, 5, 6, 7]`,BE 节点有 `[A, B, C, D]` 4个。则一个可能的数据分布如下:

```
+---+ +---+ +---+ +---+ +---+ +---+ +---+ +---+
Expand Down Expand Up @@ -141,7 +141,7 @@ SHOW PROC '/colocation_group/10005.10008';
* BucketIndex: 分桶序列的下标。
* BackendIds: 分桶中数据分片所在的 BE 节点 id 列表。

> 以上命令需要 AMDIN 权限。暂不支持普通用户查看。
> 以上命令需要 ADMIN 权限。暂不支持普通用户查看。

### 修改表 Colocate Group 属性

Expand Down Expand Up @@ -172,7 +172,7 @@ Group 自身有一个 Stable 属性,当 Stable 为 true 时,表示当前 Gro

### 副本均衡

Doris 会尽力将 Colocation 表的分片均匀分布在所有 BE 节点上。对于普通表的副本均衡,是以单副本为粒度的,即单独为每一个副本寻找负载较低的 BE 节点即可。而 Colocation 表的均衡是 Bucket 级别的,即一个 Bucket 内的所有副本都会一起迁移。我们采用一个简单的均衡算法,即在不考虑副本实际大小,而只根据副本数量,将 BucketsSequnce 均匀的分布在所有 BE 上。具体算法可以参阅 `ColocateTableBalancer.java` 中的代码注释。
Doris 会尽力将 Colocation 表的分片均匀分布在所有 BE 节点上。对于普通表的副本均衡,是以单副本为粒度的,即单独为每一个副本寻找负载较低的 BE 节点即可。而 Colocation 表的均衡是 Bucket 级别的,即一个 Bucket 内的所有副本都会一起迁移。我们采用一个简单的均衡算法,即在不考虑副本实际大小,而只根据副本数量,将 BucketsSequence 均匀的分布在所有 BE 上。具体算法可以参阅 `ColocateTableBalancer.java` 中的代码注释。

> 注1:当前的 Colocation 副本均衡和修复算法,对于异构部署的 Doris 集群效果可能不佳。所谓异构部署,即 BE 节点的磁盘容量、数量、磁盘类型(SSD 和 HDD)不一致。在异构部署情况下,可能出现小容量的 BE 节点和大容量的 BE 节点存储了相同的副本数量。
>
Expand Down
4 changes: 2 additions & 2 deletions docs/zh-CN/administrator-guide/export-manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ under the License.
1. 用户提交一个 Export 作业到 FE。
2. FE 的 Export 调度器会通过两阶段来执行一个 Export 作业:
1. PENDING:FE 生成 ExportPendingTask,向 BE 发送 snapshot 命令,对所有涉及到的 Tablet 做一个快照。并生成多个查询计划。
2. EXPORTING:FE 生成 ExportExporingTask,开始执行查询计划。
2. EXPORTING:FE 生成 ExportExportingTask,开始执行查询计划。

### 查询计划拆分

Expand Down Expand Up @@ -144,7 +144,7 @@ FinishTime: 2019-06-25 17:08:34
* JobId:作业的唯一 ID
* State:作业状态:
* PENDING:作业待调度
* EXPORING:数据导出中
* EXPORTING:数据导出中
* FINISHED:作业成功
* CANCELLED:作业失败
* Progress:作业进度。该进度以查询计划为单位。假设一共 10 个查询计划,当前已完成 3 个,则进度为 30%。
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ curl -X GET http://fe_host:fe_http_port/api/connection?connection_id=123

如果connection_id不存在,直接返回404 NOT FOUND错误

如果connection_id存在,会返回当前connectiond_id上一个进行的query_id
如果connection_id存在,会返回当前connection_id上一个进行的query_id
```
{
"query_id" : 9133b7efa92a44c8-8ed4b44772ec2a0c
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ specific language governing permissions and limitations
under the License.
-->

# Conection Action
# Connection Action

## Request

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ Insert Into 本身就是一个 SQL 命令,其返回结果会根据执行结果
## 最佳实践

### 应用场景
1. 用户希望仅导入几条假数据,验证一下 Doris 系统的功能。此时适合使用 INSERT INTO VALUS 的语法。
1. 用户希望仅导入几条假数据,验证一下 Doris 系统的功能。此时适合使用 INSERT INTO VALUES 的语法。
2. 用户希望将已经在 Doris 表中的数据进行 ETL 转换并导入到一个新的 Doris 表中,此时适合使用 INSERT INTO SELECT 语法。
3. 用户可以创建一种外部表,如 MySQL 外部表映射一张 MySQL 系统中的表。或者创建 Broker 外部表来映射 HDFS 上的数据文件。然后通过 INSERT INTO SELECT 语法将外部表中的数据导入到 Doris 表中存储。

Expand Down
12 changes: 6 additions & 6 deletions docs/zh-CN/administrator-guide/operation/monitor-alert.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ under the License.

本文档主要介绍 Doris 的监控项及如何采集、展示监控项。以及如何配置报警(TODO)

[Dashborad 模板点击下载](https://grafana.com/dashboards/9734/revisions)
[Dashboard 模板点击下载](https://grafana.com/dashboards/9734/revisions)

> 注:0.9.0(不含)之前的版本请使用 revision 1。0.9.x 版本请使用 revision 2。0.10.x 版本请使用 revision 3。

Expand Down Expand Up @@ -102,7 +102,7 @@ Doris 的监控数据通过 Frontend 和 Backend 的 http 接口向外暴露。
...
```

这是一个以 [Promethus 格式](https://prometheus.io/docs/practices/naming/) 呈现的监控数据。我们以其中一个监控项为例进行说明:
这是一个以 [Prometheus 格式](https://prometheus.io/docs/practices/naming/) 呈现的监控数据。我们以其中一个监控项为例进行说明:

```
# HELP jvm_heap_size_bytes jvm heap stat
Expand Down Expand Up @@ -135,7 +135,7 @@ jvm_heap_size_bytes{type="used"} 10113221064

1. 在 [Prometheus 官网](https://prometheus.io/download/) 下载最新版本的 Prometheus。这里我们以 2.3.2-linux-amd64 版本为例。
2. 在准备运行监控服务的机器上,解压下载后的 tar 文件。
3. 打开配置文件 promethues.yml。这里我们提供一个示例配置并加以说明(配置文件为 yml 格式,一定注意统一的缩进和空格):
3. 打开配置文件 prometheus.yml。这里我们提供一个示例配置并加以说明(配置文件为 yml 格式,一定注意统一的缩进和空格):

这里我们使用最简单的静态文件的方式进行监控配置。Prometheus 支持多种 [服务发现](https://prometheus.io/docs/prometheus/latest/configuration/configuration/) 方式,可以动态的感知节点的加入和删除。

Expand Down Expand Up @@ -180,15 +180,15 @@ jvm_heap_size_bytes{type="used"} 10113221064

```

4. 启动 Promethues
4. 启动 Prometheus

通过以下命令启动 Promethues
通过以下命令启动 Prometheus

`nohup ./prometheus --web.listen-address="0.0.0.0:8181" &`

该命令将后台运行 Prometheus,并指定其 web 端口为 8181。启动后,即开始采集数据,并将数据存放在 data 目录中。

5. 停止 Promethues
5. 停止 Prometheus

目前没有发现正式的进程停止方式,直接 kill -9 即可。当然也可以将 Prometheus 设为一种 service,以 service 的方式启停。

Expand Down
2 changes: 1 addition & 1 deletion docs/zh-CN/community/committer-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ Moderator主要负责给PR设定相关标签,推动相关reviewer进行评论

3. 鼓励Committer作为自己PR的Moderator。

4. Reviewer需要进行代码级的review,可以参考Code Review Guidline
4. Reviewer需要进行代码级的review,可以参考Code Review Guideline

5. Reviewer一旦评论了某个PR之后,需要持续跟进这个PR的后续改动,不鼓励评论了之后就不再管Contributor的后续回复了。

Expand Down
2 changes: 1 addition & 1 deletion docs/zh-CN/community/how-to-contribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ under the License.

您对 Doris 的各种建议、意见、评论可以直接通过 GitHub 的 [Issues](https://github.com/apache/incubator-doris/issues/new/choose) 提出。

参与 Doris 项目并为其作出贡献的方法有很多:代码实现、测试编写、流程工具改进、文档完善等等。任何贡献我们都会非常欢迎,并将您加入贡献者列表,进一步,有了足够的贡献后,您还可以有机会成为 AapcheCommiter,拥有 Apache 邮箱,并被收录到 [Apache Commiter 列表中](http://people.apache.org/committer-index.html)。
参与 Doris 项目并为其作出贡献的方法有很多:代码实现、测试编写、流程工具改进、文档完善等等。任何贡献我们都会非常欢迎,并将您加入贡献者列表,进一步,有了足够的贡献后,您还可以有机会成为 ApacheCommitter,拥有 Apache 邮箱,并被收录到 [Apache Committer 列表中](http://people.apache.org/committer-index.html)。

任何问题,您都可以联系我们得到及时解答,联系方式包括微信、Gitter(GitHub提供的即时聊天工具)、邮件等等。

Expand Down
4 changes: 2 additions & 2 deletions docs/zh-CN/developer-guide/debug-tool.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ thread.cpp:?

有时内存的申请并不是大内存的申请导致,而是通过小内存不断的堆积导致的。那么就没有办法通过查看日志定位到具体的申请信息,那么就需要通过其他方式来获得信息。

这个时候我们可以利用TCMalloc的[HEAPPROFILE](https://gperftools.github.io/gperftools/heapprofile.html)的功能。如果设置了HEAPPROFILE功能,那么我们可以获得进程整体的内存申请使用情况。使用方式是在启动Doris BE前设置`HEAPPROFILE`环境变量。比如:
这个时候我们可以利用TCMalloc的[HEAP PROFILE](https://gperftools.github.io/gperftools/heapprofile.html)的功能。如果设置了HEAPPROFILE功能,那么我们可以获得进程整体的内存申请使用情况。使用方式是在启动Doris BE前设置`HEAPPROFILE`环境变量。比如:

```
export HEAPPROFILE=/tmp/doris_be.hprof
Expand Down Expand Up @@ -113,7 +113,7 @@ pprof --svg lib/palo_be /tmp/doris_be.hprof.0012.heap > heap.svg

### pprof remote server

HEAPPROFILE虽然能够获得全部的内存使用信息,但是也有比较受限的地方。1. 需要重启BE进行。2. 需要一直开启这个命令,导致对整个进程的性能造成影响。
HEAP PROFILE虽然能够获得全部的内存使用信息,但是也有比较受限的地方。1. 需要重启BE进行。2. 需要一直开启这个命令,导致对整个进程的性能造成影响。

对Doris BE也可以使用动态开启、关闭heap profile的方式来对进程进行内存申请分析。Doris内部支持了GPerftools的[远程server调试](https://gperftools.github.io/gperftools/pprof_remote_servers.html)。那么可以通过`pprof`直接对远程运行的Doris BE进行动态的HEAP PROFILE。比如我们可以通过以下命令来查看Doris的内存的使用增量

Expand Down
4 changes: 2 additions & 2 deletions docs/zh-CN/developer-guide/fe-eclipse-dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ java.lang.Exception: Method xxxx should have no parameters

## 运行 FE

可以在 Ecplise 中直接启动一个 FE 进程,方便对代码进行调试。
可以在 Eclipse 中直接启动一个 FE 进程,方便对代码进行调试。

1. 创建一个运行目录:

Expand All @@ -115,7 +115,7 @@ java.lang.Exception: Method xxxx should have no parameters

在第一步创建的 `conf/` 目录下创建配置文件 `fe.conf`。你可以直接将源码目录下 `conf/fe.conf` 拷贝过来并做简单修改。

3. 在 Ecplise 中找到 `src/main/java/org/apache/doris/PaloFe.java` 文件,右击选择 `Run As -> Run Configurations...`。在 `Environment` 标签页中添加如下环境变量:
3. 在 Eclipse 中找到 `src/main/java/org/apache/doris/PaloFe.java` 文件,右击选择 `Run As -> Run Configurations...`。在 `Environment` 标签页中添加如下环境变量:

* `DORIS_HOME: /path/to/doris/fe/run/`
* `PID_DIR: /path/to/doris/fe/run/`
Expand Down
8 changes: 4 additions & 4 deletions docs/zh-CN/developer-guide/fe-idea-dev.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
{
"title": "FE 开发环境搭建 - Intellj IDEA",
"title": "FE 开发环境搭建 - IntelliJ IDEA",
"language": "zh-CN"
}
---
Expand All @@ -24,15 +24,15 @@ specific language governing permissions and limitations
under the License.
-->

# 使用 Intellj IDEA 搭建 FE 开发环境
# 使用 IntelliJ IDEA 搭建 FE 开发环境

## 1.环境准备

JDK1.8+ , Intellj IDEA
JDK1.8+, IntelliJ IDEA

1. 从 https://github.com/apache/incubator-doris.git 下载源码到本地

2. 使用Intellj IDEA 打开代码根目录
2. 使用IntelliJ IDEA 打开代码根目录

3. 如果仅进行fe开发而没有编译过thirdparty,则需要安装thrift,并将thrift 复制或者连接到 `thirdparty/installed/bin` 目录下

Expand Down
4 changes: 2 additions & 2 deletions docs/zh-CN/extending-doris/doris-on-es.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Doris-On-ES将Doris的分布式查询规划能力和ES(Elasticsearch)的全文

## 名词解释

### Doirs相关
### Doris相关
* FE:Frontend,Doris 的前端节点,负责元数据管理和请求接入
* BE:Backend,Doris 的后端节点,负责查询执行和数据存储

Expand Down Expand Up @@ -134,7 +134,7 @@ PROPERTIES (
**password** | 对应用户的密码信息

* ES 7.x之前的集群请注意在建表的时候选择正确的**索引类型type**
* 认证方式目前仅支持Http Bastic认证,并且需要确保该用户有访问: /\_cluster/state/、\_nodes/http等路径和index的读权限; 集群未开启安全认证,用户名和密码不需要设置
* 认证方式目前仅支持Http Basic认证,并且需要确保该用户有访问: /\_cluster/state/、\_nodes/http等路径和index的读权限; 集群未开启安全认证,用户名和密码不需要设置
* Doris表中的列名需要和ES中的字段名完全匹配,字段类型应该保持一致
* **ENGINE**必须是 **Elasticsearch**

Expand Down
2 changes: 1 addition & 1 deletion docs/zh-CN/extending-doris/odbc-of-doris.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ ODBC External Table Of Doris 提供了Doris通过数据库访问的标准接口(

## 名词解释

### Doirs相关
### Doris相关
* FE:Frontend,Doris 的前端节点,负责元数据管理和请求接入
* BE:Backend,Doris 的后端节点,负责查询执行和数据存储

Expand Down
2 changes: 1 addition & 1 deletion docs/zh-CN/getting-started/basic-usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ mysql -h FE_HOST -P9030 -utest -ptest_passwd

> 所有命令都可以使用 'HELP command;' 查看到详细的语法帮助。如:`HELP CREATE DATABASE;`

> 如果不清楚命令的全名,可以使用 "help 命令某一字段" 进行模糊查询。如键入'HELP CREATE',可以匹配到 `CREATE DATABASE`, `CREATE TABLE`, `CREATE USER` 等命令。
> 如果不清楚命令的全名,可以使用 "help 命令某一字段" 进行模糊查询。如键入 'HELP CREATE',可以匹配到 `CREATE DATABASE`, `CREATE TABLE`, `CREATE USER` 等命令。

数据库创建完成之后,可以通过 `SHOW DATABASES;` 查看数据库信息。

Expand Down
4 changes: 2 additions & 2 deletions docs/zh-CN/getting-started/data-model-rollup.md
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ Base 表结构如下:

### ROLLUP 的几点说明

* ROLLUP 最根本的作用是提高某些查询的查询效率(无论是通过聚合来减少数据量,还是修改列顺序以匹配前缀索引)。因此 ROLLUP 的含义已经超出了 “上卷” 的范围。这也是为什么我们在源代码中,将其命名为 Materized Index(物化索引)的原因。
* ROLLUP 最根本的作用是提高某些查询的查询效率(无论是通过聚合来减少数据量,还是修改列顺序以匹配前缀索引)。因此 ROLLUP 的含义已经超出了 “上卷” 的范围。这也是为什么我们在源代码中,将其命名为 Materialized Index(物化索引)的原因。
* ROLLUP 是附属于 Base 表的,可以看做是 Base 表的一种辅助数据结构。用户可以在 Base 表的基础上,创建或删除 ROLLUP,但是不能在查询中显式的指定查询某 ROLLUP。是否命中 ROLLUP 完全由 Doris 系统自动决定。
* ROLLUP 的数据是独立物理存储的。因此,创建的 ROLLUP 越多,占用的磁盘空间也就越大。同时对导入速度也会有影响(导入的ETL阶段会自动产生所有 ROLLUP 的数据),但是不会降低查询效率(只会更好)。
* ROLLUP 的数据更新与 Base 表示完全同步的。用户无需关心这个问题。
Expand Down Expand Up @@ -614,7 +614,7 @@ Base 表结构如下:

因此,当业务上有频繁的 count(\*) 查询时,我们建议用户通过增加一个**值恒为 1 的,聚合类型为 SUM 的列来模拟 count(\*)**。如刚才的例子中的表结构,我们修改如下:

|ColumnName|Type|AggreateType|Comment|
|ColumnName|Type|AggregateType|Comment|
|---|---|---|---|
|user\_id|BIGINT||用户id|
|date|DATE||数据灌入日期|
Expand Down
2 changes: 1 addition & 1 deletion docs/zh-CN/getting-started/hit-the-rollup.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ under the License.
* 索引
* 聚合数据(仅用于聚合模型,即aggregate key)

但是为了命中 Rollup 需要满足一定的条件,并且可以通过执行计划中 ScanNdoe 节点的 PreAggregation 的值来判断是否可以命中 Rollup,以及 Rollup 字段来判断命中的是哪一张 Rollup 表。
但是为了命中 Rollup 需要满足一定的条件,并且可以通过执行计划中 ScanNode 节点的 PreAggregation 的值来判断是否可以命中 Rollup,以及 Rollup 字段来判断命中的是哪一张 Rollup 表。

## 名词解释

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ under the License.

`BITMAP BITMAP_FROM_STRING(VARCHAR input)`

将一个字符串转化为一个BITAMP,字符串是由逗号分隔的一组UINT32数字组成.
将一个字符串转化为一个BITMAP,字符串是由逗号分隔的一组UINT32数字组成.
比如"0, 1, 2"字符串会转化为一个Bitmap,其中的第0, 1, 2位被设置.
当输入字段不合法时,返回NULL

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ under the License.
```

说明:
1. 复制的表结构包括Column Defination、Partitions、Table Properties等
1. 复制的表结构包括Column Definition、Partitions、Table Properties等
2. 用户需要对复制的原表有`SELECT`权限
3. 支持复制MySQL等外表

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ under the License.
PROPERTIES ("storage_type"="column");
```

8. 创建两张支持Colocat Join的表t1 和t2
8. 创建两张支持Colocate Join的表t1 和t2

```
CREATE TABLE `t1` (
Expand Down