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: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ dependency-reduced-pom.xml
fe_plugins/**/.classpath
fe_plugins/**/.factorypath
samples/**/.classpath
fe/fe-core/src/main/resources/static/
nohup.out


#ignore eclipse project file & idea project file
Expand Down
44 changes: 44 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ Usage: $0 <options>
Optional options:
--be build Backend
--fe build Frontend and Spark Dpp application
--ui build Frontend web ui with npm
--spark-dpp build Spark DPP application
--clean clean and build target

Expand All @@ -59,6 +60,7 @@ Usage: $0 <options>
$0 --fe --clean clean and build Frontend and Spark Dpp application
$0 --fe --be --clean clean and build Frontend, Spark Dpp application and Backend
$0 --spark-dpp build Spark DPP application alone
$0 --fe --ui build Frontend web ui with npm
"
exit 1
}
Expand All @@ -69,6 +71,7 @@ OPTS=$(getopt \
-o 'h' \
-l 'be' \
-l 'fe' \
-l 'ui' \
-l 'spark-dpp' \
-l 'clean' \
-l 'help' \
Expand All @@ -82,6 +85,7 @@ eval set -- "$OPTS"

BUILD_BE=
BUILD_FE=
BUILD_UI=
BUILD_SPARK_DPP=
CLEAN=
RUN_UT=
Expand All @@ -90,19 +94,22 @@ if [ $# == 1 ] ; then
# default
BUILD_BE=1
BUILD_FE=1
BUILD_UI=1
BUILD_SPARK_DPP=1
CLEAN=0
RUN_UT=0
else
BUILD_BE=0
BUILD_FE=0
BUILD_UI=0
BUILD_SPARK_DPP=0
CLEAN=0
RUN_UT=0
while true; do
case "$1" in
--be) BUILD_BE=1 ; shift ;;
--fe) BUILD_FE=1 ; shift ;;
--ui) BUILD_UI=1 ; shift ;;
--spark-dpp) BUILD_SPARK_DPP=1 ; shift ;;
--clean) CLEAN=1 ; shift ;;
--ut) RUN_UT=1 ; shift ;;
Expand Down Expand Up @@ -134,6 +141,7 @@ fi
echo "Get params:
BUILD_BE -- $BUILD_BE
BUILD_FE -- $BUILD_FE
BUILD_UI -- $BUILD_UI
BUILD_SPARK_DPP -- $BUILD_SPARK_DPP
CLEAN -- $CLEAN
RUN_UT -- $RUN_UT
Expand Down Expand Up @@ -186,6 +194,42 @@ if [ ${BUILD_FE} -eq 1 -o ${BUILD_SPARK_DPP} -eq 1 ]; then
fi
fi


function build_ui() {
# check NPM env here, not in env.sh.
# Because UI should be considered a non-essential component at runtime.
# Only when the compilation is required, check the relevant compilation environment.
NPM=npm
if ! ${NPM} --version; then
echo "Error: npm is not found"
exit 1
fi
if [[ ! -z ${CUSTOM_NPM_REGISTRY} ]]; then
${NPM} config set registry ${CUSTOM_NPM_REGISTRY}
npm_reg=`${NPM} get registry`
echo "NPM registry: $npm_reg"
fi

echo "Build Frontend UI"
ui_dist=${DORIS_HOME}/ui/dist/
if [[ ! -z ${CUSTOM_UI_DIST} ]]; then
ui_dist=${CUSTOM_UI_DIST}
else
cd ${DORIS_HOME}/ui
${NPM} install
${NPM} run build
fi
echo "ui dist: ${ui_dist}"
rm -rf ${DORIS_HOME}/fe/fe-core/src/main/resources/static/
mkdir -p ${DORIS_HOME}/fe/fe-core/src/main/resources/static
cp -r ${ui_dist}/* ${DORIS_HOME}/fe/fe-core/src/main/resources/static
}

# FE UI must be built before building FE
if [ ${BUILD_UI} -eq 1 ] ; then
build_ui
fi

# Clean and build Frontend
if [ ${FE_MODULES}x != ""x ]; then
echo "Build Frontend Modules: $FE_MODULES"
Expand Down
67 changes: 14 additions & 53 deletions docs/en/administrator-guide/colocation-join.md
Original file line number Diff line number Diff line change
Expand Up @@ -357,60 +357,21 @@ The API is implemented on the FE side and accessed using `fe_host: fe_http_port`
GET /api/colocate

Return the internal Colocation info in JSON format:

{
"colocate_meta": {
"groupName2Id": {
"g1": {
"dbId": 10005,
"grpId": 10008
}
},
"group2Tables": {},
"table2Group": {
"10007": {
"dbId": 10005,
"grpId": 10008
},
"10040": {
"dbId": 10005,
"grpId": 10008
}
},
"group2Schema": {
"10005.10008": {
"groupId": {
"dbId": 10005,
"grpId": 10008
},
"distributionColTypes": [{
"type": "INT",
"len": -1,
"isAssignedStrLenInColDefinition": false,
"precision": 0,
"scale": 0
}],
"bucketsNum": 10,
"replicationNum": 2
}
},
"group2BackendsPerBucketSeq": {
"10005.10008": [
[10004, 10002],
[10003, 10002],
[10002, 10004],
[10003, 10002],
[10002, 10004],
[10003, 10002],
[10003, 10004],
[10003, 10004],
[10003, 10004],
[10002, 10004]
]
},
"unstableGroups": []
"msg": "success",
"code": 0,
"data": {
"infos": [
["10003.12002", "10003_group1", "10037, 10043", "1", "1", "int(11)", "true"]
],
"unstableGroupIds": [],
"allGroupIds": [{
"dbId": 10003,
"grpId": 12002
}]
},
"status": "OK"
"count": 0
}
```
2. Mark Group as Stable or Unstable
Expand All @@ -436,7 +397,7 @@ The API is implemented on the FE side and accessed using `fe_host: fe_http_port`
The interface can force the number distribution of a group.

```
POST /api/colocate/bucketseq?db_id=10005&group_id= 10008
POST /api/colocate/bucketseq?db_id=10005&group_id=10008

Body:
[[10004,10002],[10003,10002],[10002,10004],[10003,10002],[10002,10004],[10003,10002],[10003,10004],[10003,10004],[10003,10004],[10002,10004]]
Expand Down
19 changes: 17 additions & 2 deletions docs/en/administrator-guide/config/fe_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,22 @@ The function is still in the experimental stage, so the default value is false.
Used to set default database data quota size, default is 1T.


### 'default_max_filter_ratio'
### `default_max_filter_ratio`

Used to set default max filter ratio of load Job. It will be overridden by 'max_filter_ratio' of the load job properties,default value is 0, value range 0-1.
Used to set default max filter ratio of load Job. It will be overridden by `max_filter_ratio` of the load job properties,default value is 0, value range 0-1.

### `enable_http_server_v2`

Whether to enable the V2 version of the HTTP Server implementation. The new HTTP Server is implemented using SpringBoot. And realize the separation of front and back ends.
Only when it is turned on, can you use the new UI interface under the `ui/` directory.

Default is false.

### `http_api_extra_base_path`

In some deployment environments, user need to specify an additional base path as the unified prefix of the HTTP API. This parameter is used by the user to specify additional prefixes.
After setting, user can get the parameter value through the `GET /api/basepath` interface.
And the new UI will also try to get this base path first to assemble the URL.
Only valid when `enable_http_server_v2` is true.

The default is empty, that is, not set.
Original file line number Diff line number Diff line change
Expand Up @@ -63,37 +63,39 @@ None

```
{
"msg": "success",
"code": 0,
"data": {
"type": "result_set",
"data": [
[1],
[2]
],
"meta": [{
"name": "k1",
"type": "INT"
}],
"status": {}
},
"count": 0
"msg": "success",
"code": 0,
"data": {
"type": "result_set",
"data": [
[1],
[2]
],
"meta": [{
"name": "k1",
"type": "INT"
}],
"status": {},
"time": 10
},
"count": 0
}
```

* The type field is `result_set`, which means the result set is returned. The results need to be obtained and displayed based on the meta and data fields. The meta field describes the column information returned. The data field returns the result row. The column type in each row needs to be judged by the content of the meta field. The status field returns some information of MySQL, such as the number of alarm rows, status code, etc.
* The type field is `result_set`, which means the result set is returned. The results need to be obtained and displayed based on the meta and data fields. The meta field describes the column information returned. The data field returns the result row. The column type in each row needs to be judged by the content of the meta field. The status field returns some information of MySQL, such as the number of alarm rows, status code, etc. The time field return the execution time, unit is millisecond.

* Return execution result

```
{
"msg": "success",
"code": 0,
"data": {
"type": "exec_status",
"status": {}
},
"count": 0
"msg": "success",
"code": 0,
"data": {
"type": "exec_status",
"status": {}
},
"count": 0,
"time": 10
}
```

Expand Down
67 changes: 14 additions & 53 deletions docs/zh-CN/administrator-guide/colocation-join.md
Original file line number Diff line number Diff line change
Expand Up @@ -358,58 +358,19 @@ Doris 提供了几个和 Colocation Join 有关的 HTTP Restful API,用于查
返回以 Json 格式表示内部 Colocation 信息。

{
"colocate_meta": {
"groupName2Id": {
"g1": {
"dbId": 10005,
"grpId": 10008
}
},
"group2Tables": {},
"table2Group": {
"10007": {
"dbId": 10005,
"grpId": 10008
},
"10040": {
"dbId": 10005,
"grpId": 10008
}
},
"group2Schema": {
"10005.10008": {
"groupId": {
"dbId": 10005,
"grpId": 10008
},
"distributionColTypes": [{
"type": "INT",
"len": -1,
"isAssignedStrLenInColDefinition": false,
"precision": 0,
"scale": 0
}],
"bucketsNum": 10,
"replicationNum": 2
}
},
"group2BackendsPerBucketSeq": {
"10005.10008": [
[10004, 10002],
[10003, 10002],
[10002, 10004],
[10003, 10002],
[10002, 10004],
[10003, 10002],
[10003, 10004],
[10003, 10004],
[10003, 10004],
[10002, 10004]
]
},
"unstableGroups": []
"msg": "success",
"code": 0,
"data": {
"infos": [
["10003.12002", "10003_group1", "10037, 10043", "1", "1", "int(11)", "true"]
],
"unstableGroupIds": [],
"allGroupIds": [{
"dbId": 10003,
"grpId": 12002
}]
},
"status": "OK"
"count": 0
}
```

Expand All @@ -436,7 +397,7 @@ Doris 提供了几个和 Colocation Join 有关的 HTTP Restful API,用于查
该接口可以强制设置某一 Group 的数分布。

```
POST /api/colocate/bucketseq?db_id=10005&group_id= 10008
POST /api/colocate/bucketseq?db_id=10005&group_id=10008

Body:
[[10004,10002],[10003,10002],[10002,10004],[10003,10002],[10002,10004],[10003,10002],[10003,10004],[10003,10004],[10003,10004],[10002,10004]]
Expand All @@ -445,4 +406,4 @@ Doris 提供了几个和 Colocation Join 有关的 HTTP Restful API,用于查
```
其中 Body 是以嵌套数组表示的 BucketsSequence 以及每个 Bucket 中分片分布所在 BE 的 id。

注意,使用该命令,可能需要将 FE 的配置 `disable_colocate_relocate` 和 `disable_colocate_balance` 设为 true。即关闭系统自动的 Colocation 副本修复和均衡。否则可能在修改后,会被系统自动重置。
注意,使用该命令,可能需要将 FE 的配置 `disable_colocate_relocate` 和 `disable_colocate_balance` 设为 true。即关闭系统自动的 Colocation 副本修复和均衡。否则可能在修改后,会被系统自动重置。
16 changes: 15 additions & 1 deletion docs/zh-CN/administrator-guide/config/fe_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -700,8 +700,22 @@ thrift_client_timeout_ms 的值被设置为大于0来避免线程卡在java.net.

用于设置database data的默认quota值,单位为 bytes,默认1T.

### 'default_max_filter_ratio'
### `default_max_filter_ratio`

默认的最大容忍可过滤(数据不规范等原因)的数据比例。它将被Load Job 中设置的"max_filter_ratio"覆盖,默认0,取值范围0-1.

### `enable_http_server_v2`

是否启用的 V2 版本的 HTTP Server 实现。新的 HTTP Server 采用 SpringBoot 实现。并且实现了前后端分离。
只有当开启后,才能使用 `ui/` 目录下的新版 UI 界面。

默认为 false。

### `http_api_extra_base_path`

一些部署环境下,需要指定额外的 base path 作为 HTTP API 的统一前缀。这个参数用于用户指定额外的前缀。
设置后,可以通过 `GET /api/basepath` 接口获取这个参数值。
新版本的UI也会先尝试获取这个base path来拼接URL。
仅在 `enable_http_server_v2` 为 true 的情况下才有效。

默认为空,即不设置。
Loading