This is an automated email from the ASF dual-hosted git repository.
casion pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-linkis-website.git
The following commit(s) were added to refs/heads/dev by this push:
new 9d159cf074 add release-note-1.1.3.md (#441)
9d159cf074 is described below
commit 9d159cf074e7352d2b7573605d93c9c5474ecd2a
Author: Casion <[email protected]>
AuthorDate: Tue Jul 19 19:51:21 2022 +0800
add release-note-1.1.3.md (#441)
update release-note-1.1.3.md
---
download/release-notes-1.1.2.md | 1 -
.../context_service/content_service_cleanup.md | 178 ++++++++++++++++-----
.../current/release-note-1.1.3.md | 2 +-
3 files changed, 135 insertions(+), 46 deletions(-)
diff --git a/download/release-notes-1.1.2.md b/download/release-notes-1.1.2.md
index 880e6e81b0..164d9c5852 100644
--- a/download/release-notes-1.1.2.md
+++ b/download/release-notes-1.1.2.md
@@ -43,7 +43,6 @@ abbreviation:
*
\[ECP][[Linkis-2074]](https://github.com/apache/incubator-linkis/issues/2074)
Flink engine supports custom configuration
*
\[Deployment][[Linkis-1841]](https://github.com/apache/incubator-linkis/pull/1841)
Support user deployment to disable Spark/Hive/HDFS environment detection
*
\[Deployment][[Linkis-1971]](https://github.com/apache/incubator-linkis/pull/1989)
Fix the problem of automatically getting ip error when deploying on multiple
NIC machines
-
*
\[Entrance][[Linkis-1941]](https://github.com/apache/incubator-linkis/pull/1941)
Entrance supports passing raw jobId to EngineConn and LinkisManager
*
\[Entrance][[Linkis-2045]](https://github.com/apache/incubator-linkis/issues/2045)
Refactor the matching relationship between script type and run type in
EntranceInterceptor implementation class
*
\[RPC][[Linkis-1903]](https://github.com/apache/incubator-linkis/pull/1903/files)
Modify the exception handling logic of the RPC module to transparently
transmit the original error message of the EngineConnPlugin exception
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/architecture/public_enhancement_services/context_service/content_service_cleanup.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/architecture/public_enhancement_services/context_service/content_service_cleanup.md
index fb6e023239..5271daea33 100644
---
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/architecture/public_enhancement_services/context_service/content_service_cleanup.md
+++
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/architecture/public_enhancement_services/context_service/content_service_cleanup.md
@@ -1,35 +1,31 @@
---
-title: CS 清理接口特性
+title: ContextService 清理接口特性
sidebar_position: 7
tags: [Feature]
---
## 1. 功能需求
### 1.1 背景
-1.1.3版本前,ContextService 统一上下文服务缺少清理机制,且缺少创建时间、更新时间字段以及批量清理的接口,
-在长期累积情况下可能出现百万级数据,影响查询效率。
-
+Linkis
ContextService统一上下文服务目前缺少清理机制,且缺少创建时间、更新时间字段以及批量清理的接口,在长期累积情况下可能出现百万级数据影响查询效率。
### 1.2 目标
--
修改1ContextService`底层库表,添加创建时间、修改时间、最后访问时间字段,完成`ContextID`和`ContextMap`相关数据的更新时间入库
-- 添加清理清理的`restful`接口,支持按照时间范围、按照id列表的批零清理接口
-- 添加对应的`cs-client`的`java sdk`接口
+- 修改ContextService底层库表,添加创建时间、修改时间、最后访问时间字段,完成ContextID和ContextMap相关数据的更新时间入库
+- 添加清理清理的restful接口,支持按照时间范围、按照id列表的批零清理接口
+- 添加对应的cs-client的java sdk接口
## 2. 总体设计
-本次需求涉及`ContextService`下的`cs-client`、`cs-persistence`以及`cs-server`模块。
-在`cs-persistence`模块添加已有表的3个字段;在`cs-server`模块添加3个`restful`接口,在`cs-client`模块添加3个`sdk
api`。
+本次需求涉及ContextService下的cs-client、cs-persistence以及cs-server模块。在cs-persistence模块添加已有表的3个字段;在cs-server模块添加3个restful接口,在cs-client模块添加3个sdk
api。
### 2.1 技术架构
-ContextService 整体架构可参考已有文档: [ContextService架构文档](overview.md)
+ContextService整体架构可参考已有文档:
[ContextService架构文档](https://linkis.apache.org/zh-CN/docs/latest/architecture/public_enhancement_services/context_service/overview
"ContextService架构文档")
ContestService各模块访问关系如下图所示
-
+
- 表变更均在`cs-persistence`模块。此次变更涉及5张表`context_id、 context_map
、context_id_listener 、context_key_listener 、
context_history`表,均需要添加`create_time,update_time,access_time` 3个字段。其中`context_id
、context_map` 表已启用,其它3张表未启用。`create_time`
在persistence模块执行insert操作前,添加时间。`update_time` 和 `access_time`
由上游接口主动调用,在update接口中,`update_time` 和 `access_time` 互斥更新,即当`access_time`
存在(不为null)则不更新`update_time`,否则更新update_time。
+ 表变更均在cs-persistence模块。此次变更涉及5张表`context_id、 context_map 、context_id_listener
、context_key_listener 、
context_history`表,均需要添加`create_time,update_time,access_time` 3个字段。其中`context_id
、context_map` 表已启用,其它3张表未启用。`create_time`
在persistence模块执行insert操作前,添加时间。`update_time` 和 `access_time`
由上游接口主动调用,在update接口中,`update_time` 和 `access_time` 互斥更新,即当`access_time`
存在(不为null)则不更新`update_time`,否则更新update_time。
-`update_time`字段更新在cs-cache模块中,检测到从db加载新的`context_id`时的ADD消息,此时同步`access_time`
到db。
-表中仅记录`context_id` 表的`create_time、update_time、access_time`。后续搜索清理,也是从context_id
表进行清理。
+`update_time`字段更新在cs-cache模块中,检测到从db加载新的`context_id`时的ADD消息,此时同步`access_time`
到db。表中仅记录`context_id`
表的`create_time、update_time、access_time`。后续搜索清理,也是从context_id 表进行清理。
增加3个清理相关接口:`searchContextIDByTime、clearAllContextByID、clearAllContextByTime`
- `searchContextIDByTime`按照3个时间起止范围搜索,返回contextID列表
@@ -39,11 +35,11 @@ ContestService各模块访问关系如下图所示
###2.2 业务架构
此次特性是给ContextService服务增加批量查询和清理的相关接口,以及增加底层数据表的更新时间等字段,便于根据访问情况清理过期数据。功能点涉及模块如下表。
-| 一级模块 | 二级模块 | 功能点 |
-| :------------ | :------------ | :------------ |
-| linkis-ps-cs | cs-client | 增加批量清理接口相关java sdk api接口 |
-| Linkis-ps-cs | cs-server | 增加批量清理接口相关restful接口 |
-| linkis-ps-cs | cs-persistence | 增加底层表的3个时间相关字段 |
+| 组件名 | 一级模块 | 二级模块 | 功能点 |
+| :------------ | :------------ | :------------ | :------------ |
+| Linkis | linkis-ps-cs | cs-client | 增加批量清理接口相关java sdk api接口 |
+| Linkis | Linkis-ps-cs | cs-server | 增加批量清理接口相关restful接口 |
+| Linkis | linkis-ps-cs | cs-persistence | 增加底层表的3个时间相关字段 |
##3. 模块设计
@@ -53,9 +49,8 @@ ContestService各模块访问关系如下图所示
- 根据时间查询ContextID。用户查询对应时间范围的ContextID,仅会返回haid字符串列表。此接口有分页,默认仅限5000条数据
- 批量清理ContextID。会批量清理传入的idList对应的所有contextMap数据和contextID数据。传入数组最大5000条
- 查询并清理ContextID,先查询再批量清理
-
上述对应时序图如下:
-
+
其中有两处需要额外注意:
①cs-server服务中restful api,会将请求封装成Job提交到队列并阻塞等待结果。新定义了CLEAR 的操作类型,便于匹配到清理相关接口。
@@ -86,12 +81,28 @@ CREATE TABLE `linkis_ps_cs_context_id` (
##5. 接口设计
###5.1 Restful接口
-1 查询ID接口`searchContextIDByTime`
-①接口名称
-GET `/api/rest_j/v1/contextservice/searchContextIDByTime`
+#### 搜索文本Id执行时间
+
+
+**接口地址**:`/api/rest_j/v1/contextservice/searchContextIDByTime`
+
+
+**请求方式**:`GET`
+
+
+**请求数据类型**:`application/x-www-form-urlencoded`
+
+
+**响应数据类型**:`*/*`
+
+
+**接口描述**:<p>搜索文本Id执行时间</p>
+
+
+
+**请求参数**:
-②输入参数
| 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
| -------- | -------- | ----- | -------- | -------- | ------ |
@@ -105,8 +116,30 @@ GET `/api/rest_j/v1/contextservice/searchContextIDByTime`
|updateTimeStart|更新时间|query|false|string|
-③输出参数实例
-```
+**响应状态**:
+
+
+| 状态码 | 说明 | schema |
+| -------- | -------- | ----- |
+|200|OK|Message|
+|401|Unauthorized|
+|403|Forbidden|
+|404|Not Found|
+
+
+**响应参数**:
+
+
+| 参数名称 | 参数说明 | 类型 | schema |
+| -------- | -------- | ----- |----- |
+|data|数据集|object|
+|message|描述|string|
+|method|请求url|string|
+|status|状态|integer(int32)|integer(int32)|
+
+
+**响应示例**:
+```javascript
{
"method": "/api/contextservice/searchContextIDByTime",
"status": 0,
@@ -125,20 +158,40 @@ GET
`/api/rest_j/v1/contextservice/searchContextIDByTime`
```
-2,清理指定ID接口clearAllContextByID
+#### 清理指定ID
-①接口名 `POST /api/rest_j/v1/contextservice/clearAllContextByID`
-②输入参数示例
-```
-{
- "idList" : [
- "8-8--cs_1_devcs_1_dev2236"
- ]
-}
-```
-③输出参数示例
-```
+**接口地址**:`/api/rest_j/v1/contextservice/clearAllContextByID`
+
+**请求方式**:`POST`
+
+**请求数据类型**:`application/json`
+
+**响应数据类型**:`*/*`
+
+**接口描述**:<p>通过ID清除所以上下文</p>
+
+**请求参数**:
+
+
+| 参数名称 | 参数说明 | 是否必须 | 请求类型 | 数据类型 | schema |
+| -------- | -------- | ----- | -------- | -------- | ------ |
+|idList|上下文id集合|false|String|String|
+
+
+**响应参数**:
+
+
+| 参数名称 | 参数说明 | 类型 | schema |
+| -------- | -------- | ----- |----- |
+|data|数据集|object|
+|message|描述|string|
+|method|请求url|string|
+|status|状态|integer(int32)|integer(int32)|
+
+
+**响应示例**:
+```javascript
{
"method": "/api/contextservice/clearAllContextByID",
"status": 0,
@@ -149,16 +202,53 @@ GET
`/api/rest_j/v1/contextservice/searchContextIDByTime`
}
```
-3,根据时间清理接口`clearAllContextByTime`
-①接口名称
-POST /api/rest_j/v1/contextservice/clearAllContextByTime
-②输入参数示例
+
+## 通过时间清除所以上下文
+
+
+**接口地址**:`/api/rest_j/v1/contextservice/clearAllContextByTime`
+
+**请求方式**:`POST`
+
+**请求数据类型**:`application/json`
+
+**响应数据类型**:`*/*`
+
+**接口描述**:<p>通过时间清除所以上下文</p>
+
+**请求参数**:
+
+
+| 参数名称 | 参数说明 | 是否必须 | 请求类型 | 数据类型 | schema |
+| -------- | -------- | ----- | -------- | -------- | ------ |
+|accessTimeEnd|访问时间结束|false|String|String|
+|accessTimeStart|访问时间开始|false|String|String|
+|createTimeEnd|创建时间结束|false|String|String|
+|createTimeStart|创建时间|false|String|String|
+|updateTimeStart|更新开始时间|false|String|String|
+
+
+**响应参数**:
+
+
+| 参数名称 | 参数说明 | 类型 | schema |
+| -------- | -------- | ----- |----- |
+|data|数据集|object|
+|message|描述|string|
+|method|请求url|string|
+|status|状态|integer(int32)|integer(int32)|
+
+**输入参数示例**
+```javascript
{
"createTimeStart": "2022-06-01 00:00:00",
"createTimeEnd": "2022-06-30 00:00:00"
}
-③输出参数示例
```
+
+
+**响应示例**:
+```javascript
{
"method": "/api/contextservice/clearAllContextByTime",
"status": 0,
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/release-note-1.1.3.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/release-note-1.1.3.md
index 2aec408ee9..34e1ebf8bc 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/release-note-1.1.3.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/release-note-1.1.3.md
@@ -1,6 +1,6 @@
---
title: Release Notes 1.1.3-RC1
-sidebar_position: 6
+sidebar_position: 1
---
Apache Linkis(incubating) 1.1.3 包括所有 [Project
Linkis-1.1.3](https://github.com/apache/incubator-linkis/projects/19)。
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]