Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
apache
DolphinScheduler
提交
eafd6401
DolphinScheduler
项目概览
apache
/
DolphinScheduler
上一次同步 1 年多
通知
706
Star
9572
Fork
3514
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
DolphinScheduler
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
eafd6401
编写于
5月 06, 2020
作者:
T
tlhhup
提交者:
gaojun2048
6月 29, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Zookeeper management interface in monitoring center displays abnormal #2547 (#2595)
Co-authored-by:
N
dailidong
<
dailidong66@gmail.com
>
上级
e11fda8a
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
20 addition
and
19 deletion
+20
-19
docker/docker-compose.yml
docker/docker-compose.yml
+1
-0
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/utils/ZooKeeperState.java
...org/apache/dolphinscheduler/api/utils/ZooKeeperState.java
+7
-7
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/utils/ZookeeperMonitor.java
...g/apache/dolphinscheduler/api/utils/ZookeeperMonitor.java
+3
-3
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/ZookeeperRecord.java
...g/apache/dolphinscheduler/dao/entity/ZookeeperRecord.java
+9
-9
未找到文件。
docker/docker-compose.yml
浏览文件 @
eafd6401
...
...
@@ -23,6 +23,7 @@ services:
-
"
2181:2181"
environment
:
ZOO_MY_ID
:
1
ZOO_4LW_COMMANDS_WHITELIST
:
srvr,ruok,wchs,cons
db
:
image
:
postgres
container_name
:
postgres
...
...
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/utils/ZooKeeperState.java
浏览文件 @
eafd6401
...
...
@@ -33,7 +33,7 @@ public class ZooKeeperState {
private
final
String
host
;
private
final
int
port
;
private
in
t
minLatency
=
-
1
,
avgLatency
=
-
1
,
maxLatency
=
-
1
;
private
floa
t
minLatency
=
-
1
,
avgLatency
=
-
1
,
maxLatency
=
-
1
;
private
long
received
=
-
1
;
private
long
sent
=
-
1
;
private
int
outStanding
=
-
1
;
...
...
@@ -60,9 +60,9 @@ public class ZooKeeperState {
String
line
=
scannerForStat
.
nextLine
();
if
(
line
.
startsWith
(
"Latency min/avg/max:"
))
{
String
[]
latencys
=
getStringValueFromLine
(
line
).
split
(
"/"
);
minLatency
=
Integer
.
parseIn
t
(
latencys
[
0
]);
avgLatency
=
Integer
.
parseIn
t
(
latencys
[
1
]);
maxLatency
=
Integer
.
parseIn
t
(
latencys
[
2
]);
minLatency
=
Float
.
parseFloa
t
(
latencys
[
0
]);
avgLatency
=
Float
.
parseFloa
t
(
latencys
[
1
]);
maxLatency
=
Float
.
parseFloa
t
(
latencys
[
2
]);
}
else
if
(
line
.
startsWith
(
"Received:"
))
{
received
=
Long
.
parseLong
(
getStringValueFromLine
(
line
));
}
else
if
(
line
.
startsWith
(
"Sent:"
))
{
...
...
@@ -165,15 +165,15 @@ public class ZooKeeperState {
return
port
;
}
public
in
t
getMinLatency
()
{
public
floa
t
getMinLatency
()
{
return
minLatency
;
}
public
in
t
getAvgLatency
()
{
public
floa
t
getAvgLatency
()
{
return
avgLatency
;
}
public
in
t
getMaxLatency
()
{
public
floa
t
getMaxLatency
()
{
return
maxLatency
;
}
...
...
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/utils/ZookeeperMonitor.java
浏览文件 @
eafd6401
...
...
@@ -88,9 +88,9 @@ public class ZookeeperMonitor extends AbstractZKClient {
long
sent
=
state
.
getSent
();
long
received
=
state
.
getReceived
();
String
mode
=
state
.
getMode
();
in
t
minLatency
=
state
.
getMinLatency
();
in
t
avgLatency
=
state
.
getAvgLatency
();
in
t
maxLatency
=
state
.
getMaxLatency
();
floa
t
minLatency
=
state
.
getMinLatency
();
floa
t
avgLatency
=
state
.
getAvgLatency
();
floa
t
maxLatency
=
state
.
getMaxLatency
();
int
nodeCount
=
state
.
getNodeCount
();
int
status
=
ok
?
1
:
0
;
Date
date
=
new
Date
();
...
...
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/ZookeeperRecord.java
浏览文件 @
eafd6401
...
...
@@ -56,17 +56,17 @@ public class ZookeeperRecord {
/**
* min Latency
*/
private
in
t
minLatency
;
private
floa
t
minLatency
;
/**
* avg Latency
*/
private
in
t
avgLatency
;
private
floa
t
avgLatency
;
/**
* max Latency
*/
private
in
t
maxLatency
;
private
floa
t
maxLatency
;
/**
* node count
...
...
@@ -85,7 +85,7 @@ public class ZookeeperRecord {
private
int
state
;
public
ZookeeperRecord
(
String
hostname
,
int
connections
,
int
watches
,
long
sent
,
long
received
,
String
mode
,
int
minLatency
,
int
avgLatency
,
in
t
maxLatency
,
int
nodeCount
,
int
state
,
Date
date
)
{
public
ZookeeperRecord
(
String
hostname
,
int
connections
,
int
watches
,
long
sent
,
long
received
,
String
mode
,
float
minLatency
,
float
avgLatency
,
floa
t
maxLatency
,
int
nodeCount
,
int
state
,
Date
date
)
{
this
.
hostname
=
hostname
;
this
.
connections
=
connections
;
this
.
watches
=
watches
;
...
...
@@ -149,23 +149,23 @@ public class ZookeeperRecord {
this
.
mode
=
mode
;
}
public
in
t
getMinLatency
()
{
public
floa
t
getMinLatency
()
{
return
minLatency
;
}
public
void
setMinLatency
(
in
t
minLatency
)
{
public
void
setMinLatency
(
floa
t
minLatency
)
{
this
.
minLatency
=
minLatency
;
}
public
in
t
getAvgLatency
()
{
public
floa
t
getAvgLatency
()
{
return
avgLatency
;
}
public
void
setAvgLatency
(
in
t
avgLatency
)
{
public
void
setAvgLatency
(
floa
t
avgLatency
)
{
this
.
avgLatency
=
avgLatency
;
}
public
in
t
getMaxLatency
()
{
public
floa
t
getMaxLatency
()
{
return
maxLatency
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录