Skip to content

Commit

Permalink
合并主分支
Browse files Browse the repository at this point in the history
  • Loading branch information
ZQKC authored Sep 22, 2022
2 parents 6549944 + feac0a0 commit 41637dc
Show file tree
Hide file tree
Showing 110 changed files with 2,055 additions and 1,745 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,16 @@
- 无需侵入改造 `Apache Kafka` ,一键便能纳管 `0.10.x` ~ `3.x.x` 众多版本的Kafka,包括 `ZK``Raft` 运行模式的版本,同时在兼容架构上具备良好的扩展性,帮助您提升集群管理水平;

- 🌪️  **零成本、界面化**
- 提炼高频 CLI 能力,设计合理的产品路径,提供清新美观的 GUI 界面,支持 Cluster、Broker、Topic、Group、Message、ACL 等组件 GUI 管理,普通用户5分钟即可上手;
- 提炼高频 CLI 能力,设计合理的产品路径,提供清新美观的 GUI 界面,支持 Cluster、Broker、Zookeeper、Topic、ConsumerGroup、Message、ACL、Connect 等组件 GUI 管理,普通用户5分钟即可上手;

- 👏  **云原生、插件化**
- 基于云原生构建,具备水平扩展能力,只需要增加节点即可获取更强的采集及对外服务能力,提供众多可热插拔的企业级特性,覆盖可观测性生态整合、资源治理、多活容灾等核心场景;

- 🚀  **专业能力**
- 集群管理:支持集群一键纳管,健康分析、核心组件观测 等功能;
- 集群管理:支持一键纳管,健康分析、核心组件观测 等功能;
- 观测提升:多维度指标观测大盘、观测指标最佳实践 等功能;
- 异常巡检:集群多维度健康巡检、集群多维度健康分 等功能;
- 能力增强:Topic扩缩副本、Topic副本迁移 等功能;
- 能力增强:集群负载均衡、Topic扩缩副本、Topic副本迁移 等功能;


 
Expand Down
34 changes: 34 additions & 0 deletions Releases_Notes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,39 @@


## v3.0.0-beta.3

**文档**
- FAQ 补充权限识别失败问题的说明
- 同步更新文档,保持与官网一致


**Bug修复**
- Offset 信息获取时,过滤掉无 Leader 的分区
- 升级 oshi-core 版本至 5.6.1 版本,修复 Windows 系统获取系统指标失败问题
- 修复 JMX 连接被关闭后,未进行重建的问题
- 修复因 DB 中 Broker 信息不存在导致 TotalLogSize 指标获取时抛空指针问题
- 修复 dml-logi.sql 中,SQL 注释错误的问题
- 修复 startup.sh 中,识别操作系统类型错误的问题
- 修复配置管理页面删除配置失败的问题
- 修复系统管理应用文件引用路径
- 修复 Topic Messages 详情提示信息点击跳转 404 的问题
- 修复扩副本时,当前副本数不显示问题


**体验优化**
- Topic-Messages 页面,增加返回数据的排序以及按照Earliest/Latest的获取方式
- 优化 GroupOffsetResetEnum 类名为 OffsetTypeEnum,使得类名含义更准确
- 移动 KafkaZKDAO 类,及 Kafka Znode 实体类的位置,使得 Kafka Zookeeper DAO 更加内聚及便于识别
- 后端补充 Overview 页面指标排序的功能
- 前端 Webpack 配置优化
- Cluster Overview 图表取消放大展示功能
- 列表页增加手动刷新功能
- 接入/编辑集群,优化 JMX-PORT,Version 信息的回显,优化JMX信息的展示
- 提高登录页面图片展示清晰度
- 部分样式和文案优化

---

## v3.0.0-beta.2

**文档**
Expand Down
2 changes: 1 addition & 1 deletion bin/startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ error_exit ()
[ ! -e "$JAVA_HOME/bin/java" ] && unset JAVA_HOME

if [ -z "$JAVA_HOME" ]; then
if $darwin; then
if [ "Darwin" = "$(uname -s)" ]; then

if [ -x '/usr/libexec/java_home' ] ; then
export JAVA_HOME=`/usr/libexec/java_home`
Expand Down
99 changes: 99 additions & 0 deletions docs/install_guide/单机部署手册.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ sh deploy_KnowStreaming-offline.sh

### 2.1.3、容器部署

#### 2.1.3.1、Helm

**环境依赖**

- Kubernetes >= 1.14 ,Helm >= 2.17.0
Expand Down Expand Up @@ -87,6 +89,103 @@ helm pull knowstreaming/knowstreaming-manager

 

#### 2.1.3.2、Docker Compose
```yml
version: "3"

services:

knowstreaming-manager:
image: knowstreaming/knowstreaming-manager:0.2.0-test
container_name: knowstreaming-manager
privileged: true
restart: always
depends_on:
- elasticsearch-single
- knowstreaming-mysql
expose:
- 80
command:
- /bin/sh
- /ks-start.sh
environment:
TZ: Asia/Shanghai

SERVER_MYSQL_ADDRESS: knowstreaming-mysql:3306
SERVER_MYSQL_DB: know_streaming
SERVER_MYSQL_USER: root
SERVER_MYSQL_PASSWORD: admin2022_

SERVER_ES_ADDRESS: elasticsearch-single:9200

JAVA_OPTS: -Xmx1g -Xms1g

# extra_hosts:
# - "hostname:x.x.x.x"
# volumes:
# - /ks/manage/log:/logs
knowstreaming-ui:
image: knowstreaming/knowstreaming-ui:0.2.0-test1
container_name: knowstreaming-ui
restart: always
ports:
- '18092:80'
environment:
TZ: Asia/Shanghai
depends_on:
- knowstreaming-manager
# extra_hosts:
# - "hostname:x.x.x.x"

elasticsearch-single:
image: docker.io/library/elasticsearch:7.6.2
container_name: elasticsearch-single
restart: always
expose:
- 9200
- 9300
# ports:
# - '9200:9200'
# - '9300:9300'
environment:
TZ: Asia/Shanghai
ES_JAVA_OPTS: -Xms512m -Xmx512m
discovery.type: single-node
# volumes:
# - /ks/es/data:/usr/share/elasticsearch/data

knowstreaming-init:
image: knowstreaming/knowstreaming-manager:0.2.0-test
container_name: knowstreaming_init
depends_on:
- elasticsearch-single
command:
- /bin/bash
- /es_template_create.sh
environment:
TZ: Asia/Shanghai
SERVER_ES_ADDRESS: elasticsearch-single:9200


knowstreaming-mysql:
image: knowstreaming/knowstreaming-mysql:0.2.0-test
container_name: knowstreaming-mysql
restart: always
environment:
TZ: Asia/Shanghai
MYSQL_ROOT_PASSWORD: admin2022_
MYSQL_DATABASE: know_streaming
MYSQL_ROOT_HOST: '%'
expose:
- 3306
# ports:
# - '3306:3306'
# volumes:
# - /ks/mysql/data:/data/mysql
```

 

### 2.1.4、手动部署

**部署流程**
Expand Down
25 changes: 11 additions & 14 deletions docs/install_guide/版本升级手册.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ thread-pool:

```


**SQL变更**
**SQL 变更**

```sql
-- 多集群管理权限2022-09-06新增
Expand Down Expand Up @@ -80,12 +79,11 @@ ALTER TABLE `logi_security_oplog`

### 6.2.2、升级至 `v3.0.0-beta.1`版本


**SQL变更**
**SQL 变更**

1、在`ks_km_broker`表增加了一个监听信息字段。
2、为`logi_security_oplog`表operation_methods字段设置默认值''。
因此需要执行下面的sql对数据库表进行更新
2、为`logi_security_oplog`表 operation_methods 字段设置默认值''。
因此需要执行下面的 sql 对数据库表进行更新

```sql
ALTER TABLE `ks_km_broker`
Expand All @@ -98,7 +96,6 @@ ALTER COLUMN `operation_methods` set default '';

---


### 6.2.3、`2.x`版本 升级至 `v3.0.0-beta.0`版本

**升级步骤:**
Expand All @@ -123,14 +120,14 @@ ALTER COLUMN `operation_methods` set default '';
UPDATE ks_km_topic
INNER JOIN
(SELECT
topic.cluster_id AS cluster_id,
topic.topic_name AS topic_name,
topic.description AS description
topic.cluster_id AS cluster_id,
topic.topic_name AS topic_name,
topic.description AS description
FROM topic WHERE description != ''
) AS t

ON ks_km_topic.cluster_phy_id = t.cluster_id
AND ks_km_topic.topic_name = t.topic_name
AND ks_km_topic.id > 0
SET ks_km_topic.description = t.description;
ON ks_km_topic.cluster_phy_id = t.cluster_id
AND ks_km_topic.topic_name = t.topic_name
AND ks_km_topic.id > 0
SET ks_km_topic.description = t.description;
```
16 changes: 16 additions & 0 deletions docs/user_guide/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,3 +166,19 @@ Node 版本: v12.22.12
需要到具体的应用中执行 `npm run start`,例如 `cd packages/layout-clusters-fe` 后,执行 `npm run start`

应用启动后需要到基座应用中查看(需要启动基座应用,即 layout-clusters-fe)。


## 8.12、权限识别失败问题
1、使用admin账号登陆KnowStreaming时,点击系统管理-用户管理-角色管理-新增角色,查看页面是否正常。

<img src="http://img-ys011.didistatic.com/static/dc2img/do1_gwGfjN9N92UxzHU8dfzr" width = "400" >

2、查看'/logi-security/api/v1/permission/tree'接口返回值,出现如下图所示乱码现象。
![接口返回值](http://img-ys011.didistatic.com/static/dc2img/do1_jTxBkwNGU9vZuYQQbdNw)

3、查看logi_security_permission表,看看是否出现了中文乱码现象。

根据以上几点,我们可以确定是由于数据库乱码造成的权限识别失败问题。

+ 原因:由于数据库编码和我们提供的脚本不一致,数据库里的数据发生了乱码,因此出现权限识别失败问题。
+ 解决方案:清空数据库数据,将数据库字符集调整为utf8,最后重新执行[dml-logi.sql](https://github.com/didi/KnowStreaming/blob/master/km-dist/init/sql/dml-logi.sql)脚本导入数据即可。
2 changes: 1 addition & 1 deletion docs/user_guide/用户使用手册.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

下面是用户第一次使用我们产品的典型体验路径:

![text](http://img-ys011.didistatic.com/static/dc2img/do1_YehqxqmsVaqU5gf3XphI)
![text](http://img-ys011.didistatic.com/static/dc2img/do1_qgqPsAY46sZeBaPUCwXY)

## 5.3、常用功能

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import com.xiaojukeji.know.streaming.km.common.bean.vo.group.GroupTopicOverviewVO;
import com.xiaojukeji.know.streaming.km.common.constant.MsgConstant;
import com.xiaojukeji.know.streaming.km.common.enums.AggTypeEnum;
import com.xiaojukeji.know.streaming.km.common.enums.GroupOffsetResetEnum;
import com.xiaojukeji.know.streaming.km.common.enums.OffsetTypeEnum;
import com.xiaojukeji.know.streaming.km.common.enums.group.GroupStateEnum;
import com.xiaojukeji.know.streaming.km.common.exception.AdminOperateException;
import com.xiaojukeji.know.streaming.km.common.exception.NotExistException;
Expand Down Expand Up @@ -199,12 +199,12 @@ private Result<Void> checkFieldLegal(GroupOffsetResetDTO dto) {
return Result.buildFromRSAndMsg(ResultStatus.NOT_EXIST, MsgConstant.getTopicNotExist(dto.getClusterId(), dto.getTopicName()));
}

if (GroupOffsetResetEnum.PRECISE_OFFSET.getResetType() == dto.getResetType()
if (OffsetTypeEnum.PRECISE_OFFSET.getResetType() == dto.getResetType()
&& ValidateUtils.isEmptyList(dto.getOffsetList())) {
return Result.buildFromRSAndMsg(ResultStatus.PARAM_ILLEGAL, "参数错误,指定offset重置需传offset信息");
}

if (GroupOffsetResetEnum.PRECISE_TIMESTAMP.getResetType() == dto.getResetType()
if (OffsetTypeEnum.PRECISE_TIMESTAMP.getResetType() == dto.getResetType()
&& ValidateUtils.isNull(dto.getTimestamp())) {
return Result.buildFromRSAndMsg(ResultStatus.PARAM_ILLEGAL, "参数错误,指定时间重置需传时间信息");
}
Expand All @@ -213,7 +213,7 @@ private Result<Void> checkFieldLegal(GroupOffsetResetDTO dto) {
}

private Result<Map<TopicPartition, Long>> getPartitionOffset(GroupOffsetResetDTO dto) {
if (GroupOffsetResetEnum.PRECISE_OFFSET.getResetType() == dto.getResetType()) {
if (OffsetTypeEnum.PRECISE_OFFSET.getResetType() == dto.getResetType()) {
return Result.buildSuc(dto.getOffsetList().stream().collect(Collectors.toMap(
elem -> new TopicPartition(dto.getTopicName(), elem.getPartitionId()),
PartitionOffsetDTO::getOffset,
Expand All @@ -222,9 +222,9 @@ private Result<Map<TopicPartition, Long>> getPartitionOffset(GroupOffsetResetDTO
}

OffsetSpec offsetSpec = null;
if (GroupOffsetResetEnum.PRECISE_TIMESTAMP.getResetType() == dto.getResetType()) {
if (OffsetTypeEnum.PRECISE_TIMESTAMP.getResetType() == dto.getResetType()) {
offsetSpec = OffsetSpec.forTimestamp(dto.getTimestamp());
} else if (GroupOffsetResetEnum.EARLIEST.getResetType() == dto.getResetType()) {
} else if (OffsetTypeEnum.EARLIEST.getResetType() == dto.getResetType()) {
offsetSpec = OffsetSpec.earliest();
} else {
offsetSpec = OffsetSpec.latest();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.xiaojukeji.know.streaming.km.biz.topic;

import com.xiaojukeji.know.streaming.km.common.bean.dto.pagination.PaginationSortDTO;
import com.xiaojukeji.know.streaming.km.common.bean.dto.topic.TopicRecordDTO;
import com.xiaojukeji.know.streaming.km.common.bean.entity.result.Result;
import com.xiaojukeji.know.streaming.km.common.bean.vo.topic.TopicBrokersPartitionsSummaryVO;
Expand Down
Loading

0 comments on commit 41637dc

Please sign in to comment.