Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DiDi
kafka-manager
提交
553fe306
K
kafka-manager
项目概览
DiDi
/
kafka-manager
大约 1 年 前同步成功
通知
60
Star
6372
Fork
1229
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
kafka-manager
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
553fe306
编写于
6月 05, 2020
作者:
Z
ZQKC
提交者:
GitHub
6月 05, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #29 from ZQKC/master
fix underReplicatedPartitionCount and add cluster
上级
13a90fdd
b6138afe
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
20 addition
and
1 deletion
+20
-1
service/src/main/java/com/xiaojukeji/kafka/manager/service/service/impl/ClusterServiceImpl.java
...afka/manager/service/service/impl/ClusterServiceImpl.java
+5
-0
web/src/main/java/com/xiaojukeji/kafka/manager/web/converters/BrokerModelConverter.java
...ji/kafka/manager/web/converters/BrokerModelConverter.java
+1
-0
web/src/main/java/com/xiaojukeji/kafka/manager/web/vo/broker/BrokerOverallVO.java
...aojukeji/kafka/manager/web/vo/broker/BrokerOverallVO.java
+14
-1
未找到文件。
service/src/main/java/com/xiaojukeji/kafka/manager/service/service/impl/ClusterServiceImpl.java
浏览文件 @
553fe306
...
...
@@ -10,6 +10,7 @@ import com.xiaojukeji.kafka.manager.dao.ClusterDao;
import
com.xiaojukeji.kafka.manager.dao.ClusterMetricsDao
;
import
com.xiaojukeji.kafka.manager.dao.ControllerDao
;
import
com.xiaojukeji.kafka.manager.service.cache.ClusterMetadataManager
;
import
com.xiaojukeji.kafka.manager.service.schedule.ScheduleCollectDataManager
;
import
com.xiaojukeji.kafka.manager.service.service.ClusterService
;
import
org.apache.zookeeper.ZooKeeper
;
import
org.slf4j.Logger
;
...
...
@@ -37,6 +38,9 @@ public class ClusterServiceImpl implements ClusterService {
@Autowired
private
ClusterMetadataManager
clusterMetadataManager
;
@Autowired
private
ScheduleCollectDataManager
scheduleCollectDataManager
;
@Autowired
private
ControllerDao
controllerDao
;
...
...
@@ -57,6 +61,7 @@ public class ClusterServiceImpl implements ClusterService {
if
(!
status
)
{
return
new
Result
(
StatusCode
.
OPERATION_ERROR
,
"add zookeeper watch failed"
);
}
scheduleCollectDataManager
.
start
(
clusterDO
);
if
(
clusterDO
.
getAlarmFlag
()
==
null
||
clusterDO
.
getAlarmFlag
()
<=
0
)
{
return
new
Result
();
...
...
web/src/main/java/com/xiaojukeji/kafka/manager/web/converters/BrokerModelConverter.java
浏览文件 @
553fe306
...
...
@@ -78,6 +78,7 @@ public class BrokerModelConverter {
Double
bytesInPerSec
=
brokerOverallDTO
.
getBytesInPerSec
()
/
1024.0
/
1024.0
;
brokerOverviewVO
.
setBytesInPerSec
(
Math
.
round
(
bytesInPerSec
*
100
)
/
100.0
);
}
brokerOverviewVO
.
setUnderReplicatedPartitionCount
(
brokerOverallDTO
.
getUnderReplicatedPartitions
());
brokerOverviewVO
.
setLeaderCount
(
brokerOverallDTO
.
getLeaderCount
());
if
(
brokerOverallDTO
.
getPartitionCount
()
!=
null
&&
brokerOverallDTO
.
getUnderReplicatedPartitions
()
!=
null
)
{
brokerOverviewVO
.
setNotUnderReplicatedPartitionCount
(
brokerOverallDTO
.
getPartitionCount
()
-
brokerOverallDTO
.
getUnderReplicatedPartitions
());
...
...
web/src/main/java/com/xiaojukeji/kafka/manager/web/vo/broker/BrokerOverallVO.java
浏览文件 @
553fe306
...
...
@@ -30,9 +30,13 @@ public class BrokerOverallVO {
@ApiModelProperty
(
value
=
"分区数"
)
private
Integer
partitionCount
;
@ApiModelProperty
(
value
=
"未同步分区数"
)
@Deprecated
@ApiModelProperty
(
value
=
"同步分区数"
)
private
Integer
notUnderReplicatedPartitionCount
;
@ApiModelProperty
(
value
=
"未同步分区数"
)
private
Integer
underReplicatedPartitionCount
;
@ApiModelProperty
(
value
=
"leader数"
)
private
Integer
leaderCount
;
...
...
@@ -103,6 +107,14 @@ public class BrokerOverallVO {
this
.
notUnderReplicatedPartitionCount
=
notUnderReplicatedPartitionCount
;
}
public
Integer
getUnderReplicatedPartitionCount
()
{
return
underReplicatedPartitionCount
;
}
public
void
setUnderReplicatedPartitionCount
(
Integer
underReplicatedPartitionCount
)
{
this
.
underReplicatedPartitionCount
=
underReplicatedPartitionCount
;
}
public
Integer
getLeaderCount
()
{
return
leaderCount
;
}
...
...
@@ -130,6 +142,7 @@ public class BrokerOverallVO {
", bytesInPerSec="
+
bytesInPerSec
+
", partitionCount="
+
partitionCount
+
", notUnderReplicatedPartitionCount="
+
notUnderReplicatedPartitionCount
+
", underReplicatedPartitionCount="
+
underReplicatedPartitionCount
+
", leaderCount="
+
leaderCount
+
", regionName='"
+
regionName
+
'\''
+
'}'
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录