Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DiDi
kafka-manager
提交
34b7c674
K
kafka-manager
项目概览
DiDi
/
kafka-manager
10 个月 前同步成功
通知
58
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,体验更适合开发者的 AI 搜索 >>
提交
34b7c674
编写于
10月 08, 2022
作者:
Z
zengqiao
提交者:
EricZeng
10月 21, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ZK-增加配置的默认值
上级
20d5b27b
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
47 addition
and
6 deletion
+47
-6
km-common/src/main/java/com/xiaojukeji/know/streaming/km/common/bean/entity/config/ZKConfig.java
...know/streaming/km/common/bean/entity/config/ZKConfig.java
+43
-4
km-common/src/main/java/com/xiaojukeji/know/streaming/km/common/constant/Constant.java
...iaojukeji/know/streaming/km/common/constant/Constant.java
+4
-2
未找到文件。
km-common/src/main/java/com/xiaojukeji/know/streaming/km/common/bean/entity/config/ZKConfig.java
浏览文件 @
34b7c674
package
com.xiaojukeji.know.streaming.km.common.bean.entity.config
;
import
com.xiaojukeji.know.streaming.km.common.constant.Constant
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.Properties
;
...
...
@@ -11,7 +11,6 @@ import java.util.Properties;
* @author zengqiao
* @date 22/02/24
*/
@Data
@ApiModel
(
description
=
"ZK配置"
)
public
class
ZKConfig
implements
Serializable
{
@ApiModelProperty
(
value
=
"ZK的jmx配置"
)
...
...
@@ -21,11 +20,51 @@ public class ZKConfig implements Serializable {
private
Boolean
openSecure
=
false
;
@ApiModelProperty
(
value
=
"ZK的Session超时时间"
,
example
=
"15000"
)
private
Long
sessionTimeoutUnitMs
=
15000L
;
private
Integer
sessionTimeoutUnitMs
=
15000
;
@ApiModelProperty
(
value
=
"ZK的Request超时时间"
,
example
=
"5000"
)
private
Long
requestTimeoutUnitMs
=
5000L
;
private
Integer
requestTimeoutUnitMs
=
5000
;
@ApiModelProperty
(
value
=
"ZK的Request超时时间"
)
private
Properties
otherProps
=
new
Properties
();
public
JmxConfig
getJmxConfig
()
{
return
jmxConfig
==
null
?
new
JmxConfig
():
jmxConfig
;
}
public
void
setJmxConfig
(
JmxConfig
jmxConfig
)
{
this
.
jmxConfig
=
jmxConfig
;
}
public
Boolean
getOpenSecure
()
{
return
openSecure
!=
null
&&
openSecure
;
}
public
void
setOpenSecure
(
Boolean
openSecure
)
{
this
.
openSecure
=
openSecure
;
}
public
Integer
getSessionTimeoutUnitMs
()
{
return
sessionTimeoutUnitMs
==
null
?
Constant
.
DEFAULT_SESSION_TIMEOUT_UNIT_MS
:
sessionTimeoutUnitMs
;
}
public
void
setSessionTimeoutUnitMs
(
Integer
sessionTimeoutUnitMs
)
{
this
.
sessionTimeoutUnitMs
=
sessionTimeoutUnitMs
;
}
public
Integer
getRequestTimeoutUnitMs
()
{
return
requestTimeoutUnitMs
==
null
?
Constant
.
DEFAULT_REQUEST_TIMEOUT_UNIT_MS
:
requestTimeoutUnitMs
;
}
public
void
setRequestTimeoutUnitMs
(
Integer
requestTimeoutUnitMs
)
{
this
.
requestTimeoutUnitMs
=
requestTimeoutUnitMs
;
}
public
Properties
getOtherProps
()
{
return
otherProps
==
null
?
new
Properties
()
:
otherProps
;
}
public
void
setOtherProps
(
Properties
otherProps
)
{
this
.
otherProps
=
otherProps
;
}
}
km-common/src/main/java/com/xiaojukeji/know/streaming/km/common/constant/Constant.java
浏览文件 @
34b7c674
...
...
@@ -23,8 +23,8 @@ public class Constant {
public
static
final
Integer
YES
=
1
;
public
static
final
Integer
NO
=
0
;
public
static
final
Integer
ALIVE
=
1
;
public
static
final
Integer
DOWN
=
0
;
public
static
final
Integer
ALIVE
=
1
;
public
static
final
Integer
DOWN
=
0
;
public
static
final
Integer
ONE_HUNDRED
=
100
;
...
...
@@ -33,6 +33,7 @@ public class Constant {
public
static
final
Long
B_TO_MB
=
1024L
*
1024L
;
public
static
final
Integer
DEFAULT_SESSION_TIMEOUT_UNIT_MS
=
15000
;
public
static
final
Integer
DEFAULT_REQUEST_TIMEOUT_UNIT_MS
=
5000
;
public
static
final
Float
MIN_HEALTH_SCORE
=
10
f
;
...
...
@@ -66,4 +67,5 @@ public class Constant {
public
static
final
Integer
DEFAULT_RETRY_TIME
=
3
;
public
static
final
Integer
ZK_ALIVE_BUT_4_LETTER_FORBIDDEN
=
11
;
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录