Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DiDi
kafka-manager
提交
61f0b67a
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,发现更多精彩内容 >>
未验证
提交
61f0b67a
编写于
7月 30, 2020
作者:
Z
ZQKC
提交者:
GitHub
7月 30, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #47 from ZQKC/master
修复扩分区工单
上级
a9697956
4b679be3
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
9 addition
and
6 deletion
+9
-6
service/src/main/java/com/xiaojukeji/kafka/manager/service/service/OrderService.java
...iaojukeji/kafka/manager/service/service/OrderService.java
+1
-1
service/src/main/java/com/xiaojukeji/kafka/manager/service/service/impl/JmxServiceImpl.java
...ji/kafka/manager/service/service/impl/JmxServiceImpl.java
+3
-0
service/src/main/java/com/xiaojukeji/kafka/manager/service/service/impl/OrderServiceImpl.java
.../kafka/manager/service/service/impl/OrderServiceImpl.java
+3
-3
web/src/main/java/com/xiaojukeji/kafka/manager/web/api/versionone/OrderController.java
...eji/kafka/manager/web/api/versionone/OrderController.java
+2
-2
未找到文件。
service/src/main/java/com/xiaojukeji/kafka/manager/service/service/OrderService.java
浏览文件 @
61f0b67a
...
@@ -45,7 +45,7 @@ public interface OrderService {
...
@@ -45,7 +45,7 @@ public interface OrderService {
* @date 19/6/23
* @date 19/6/23
* @return Result
* @return Result
*/
*/
Result
modifyOrderPartition
(
OrderPartitionDO
orderPartitionDO
,
String
operator
);
Result
modifyOrderPartition
(
OrderPartitionDO
orderPartitionDO
,
String
operator
,
boolean
admin
);
/**
/**
* 查询Topic工单
* 查询Topic工单
...
...
service/src/main/java/com/xiaojukeji/kafka/manager/service/service/impl/JmxServiceImpl.java
浏览文件 @
61f0b67a
...
@@ -72,6 +72,9 @@ public class JmxServiceImpl implements JmxService {
...
@@ -72,6 +72,9 @@ public class JmxServiceImpl implements JmxService {
List
<
Attribute
>
attributeValueList
=
null
;
List
<
Attribute
>
attributeValueList
=
null
;
try
{
try
{
attributeValueList
=
connection
.
getAttributes
(
new
ObjectName
(
mbean
.
getObjectName
()),
properties
).
asList
();
attributeValueList
=
connection
.
getAttributes
(
new
ObjectName
(
mbean
.
getObjectName
()),
properties
).
asList
();
}
catch
(
InstanceNotFoundException
e
)
{
logger
.
warn
(
"getSpecifiedBrokerMetricsFromJmx@JmxServiceImpl, get metrics fail, objectName:{}."
,
mbean
.
getObjectName
(),
e
);
continue
;
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
logger
.
error
(
"getSpecifiedBrokerMetricsFromJmx@JmxServiceImpl, get metrics fail, objectName:{}."
,
mbean
.
getObjectName
(),
e
);
logger
.
error
(
"getSpecifiedBrokerMetricsFromJmx@JmxServiceImpl, get metrics fail, objectName:{}."
,
mbean
.
getObjectName
(),
e
);
continue
;
continue
;
...
...
service/src/main/java/com/xiaojukeji/kafka/manager/service/service/impl/OrderServiceImpl.java
浏览文件 @
61f0b67a
...
@@ -51,7 +51,7 @@ public class OrderServiceImpl implements OrderService {
...
@@ -51,7 +51,7 @@ public class OrderServiceImpl implements OrderService {
if
(
orderPartitionDO
!=
null
)
{
if
(
orderPartitionDO
!=
null
)
{
orderPartitionDO
.
setOrderStatus
(
OrderStatusEnum
.
CANCELLED
.
getCode
());
orderPartitionDO
.
setOrderStatus
(
OrderStatusEnum
.
CANCELLED
.
getCode
());
}
}
return
modifyOrderPartition
(
orderPartitionDO
,
operator
);
return
modifyOrderPartition
(
orderPartitionDO
,
operator
,
false
);
}
}
return
new
Result
(
StatusCode
.
PARAM_ERROR
,
"order type illegal"
);
return
new
Result
(
StatusCode
.
PARAM_ERROR
,
"order type illegal"
);
}
}
...
@@ -74,10 +74,10 @@ public class OrderServiceImpl implements OrderService {
...
@@ -74,10 +74,10 @@ public class OrderServiceImpl implements OrderService {
}
}
@Override
@Override
public
Result
modifyOrderPartition
(
OrderPartitionDO
newOrderPartitionDO
,
String
operator
)
{
public
Result
modifyOrderPartition
(
OrderPartitionDO
newOrderPartitionDO
,
String
operator
,
boolean
admin
)
{
if
(
newOrderPartitionDO
==
null
)
{
if
(
newOrderPartitionDO
==
null
)
{
return
new
Result
(
StatusCode
.
PARAM_ERROR
,
"param illegal, order not exist"
);
return
new
Result
(
StatusCode
.
PARAM_ERROR
,
"param illegal, order not exist"
);
}
else
if
(!
newOrderPartitionDO
.
getApplicant
().
equals
(
operator
))
{
}
else
if
(!
admin
&&
!
newOrderPartitionDO
.
getApplicant
().
equals
(
operator
))
{
return
new
Result
(
StatusCode
.
PARAM_ERROR
,
"without authority to cancel the order"
);
return
new
Result
(
StatusCode
.
PARAM_ERROR
,
"without authority to cancel the order"
);
}
}
OrderPartitionDO
oldOrderPartitionDO
=
orderPartitionDao
.
getById
(
newOrderPartitionDO
.
getId
());
OrderPartitionDO
oldOrderPartitionDO
=
orderPartitionDao
.
getById
(
newOrderPartitionDO
.
getId
());
...
...
web/src/main/java/com/xiaojukeji/kafka/manager/web/api/versionone/OrderController.java
浏览文件 @
61f0b67a
...
@@ -325,9 +325,9 @@ public class OrderController {
...
@@ -325,9 +325,9 @@ public class OrderController {
orderPartitionDO
.
setApprover
(
username
);
orderPartitionDO
.
setApprover
(
username
);
orderPartitionDO
.
setOpinion
(
reqObj
.
getApprovalOpinions
());
orderPartitionDO
.
setOpinion
(
reqObj
.
getApprovalOpinions
());
orderPartitionDO
.
setOrderStatus
(
reqObj
.
getOrderStatus
());
orderPartitionDO
.
setOrderStatus
(
reqObj
.
getOrderStatus
());
result
=
orderService
.
modifyOrderPartition
(
orderPartitionDO
,
username
);
result
=
orderService
.
modifyOrderPartition
(
orderPartitionDO
,
username
,
true
);
if
(!
StatusCode
.
SUCCESS
.
equals
(
result
.
getCode
()))
{
if
(!
StatusCode
.
SUCCESS
.
equals
(
result
.
getCode
()))
{
return
new
Result
(
StatusCode
.
OPERATION_ERROR
,
"
create
topic success, but update order status failed, err:"
+
result
.
getMessage
());
return
new
Result
(
StatusCode
.
OPERATION_ERROR
,
"
expand
topic success, but update order status failed, err:"
+
result
.
getMessage
());
}
}
return
new
Result
();
return
new
Result
();
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录