Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
apache
DolphinScheduler
提交
dfe4945b
DolphinScheduler
项目概览
apache
/
DolphinScheduler
上一次同步 1 年多
通知
707
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,发现更多精彩内容 >>
未验证
提交
dfe4945b
编写于
11月 12, 2021
作者:
J
JinYong Li
提交者:
GitHub
11月 12, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
remove processDefinition resourceIds (#6813)
上级
e36d18b5
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
0 addition
and
40 deletion
+0
-40
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
...eduler/api/service/impl/ProcessDefinitionServiceImpl.java
+0
-14
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TaskDefinitionServiceImpl.java
...scheduler/api/service/impl/TaskDefinitionServiceImpl.java
+0
-6
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionServiceTest.java
...inscheduler/api/service/ProcessDefinitionServiceTest.java
+0
-2
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/ProcessDefinition.java
...apache/dolphinscheduler/dao/entity/ProcessDefinition.java
+0
-15
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/ProcessDefinitionLog.java
...che/dolphinscheduler/dao/entity/ProcessDefinitionLog.java
+0
-1
dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/mapper/ProcessDefinitionMapperTest.java
...phinscheduler/dao/mapper/ProcessDefinitionMapperTest.java
+0
-2
未找到文件。
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
浏览文件 @
dfe4945b
...
...
@@ -724,20 +724,6 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
switch
(
releaseState
)
{
case
ONLINE:
// To check resources whether they are already cancel authorized or deleted
String
resourceIds
=
processDefinition
.
getResourceIds
();
if
(
org
.
apache
.
commons
.
lang
.
StringUtils
.
isNotBlank
(
resourceIds
))
{
Integer
[]
resourceIdArray
=
Arrays
.
stream
(
resourceIds
.
split
(
Constants
.
COMMA
)).
map
(
Integer:
:
parseInt
).
toArray
(
Integer
[]::
new
);
PermissionCheck
<
Integer
>
permissionCheck
=
new
PermissionCheck
<>(
AuthorizationType
.
RESOURCE_FILE_ID
,
processService
,
resourceIdArray
,
loginUser
.
getId
(),
logger
);
try
{
permissionCheck
.
checkPermission
();
}
catch
(
Exception
e
)
{
logger
.
error
(
e
.
getMessage
(),
e
);
putMsg
(
result
,
Status
.
RESOURCE_NOT_EXIST_OR_NO_PERMISSION
,
RELEASESTATE
);
return
result
;
}
}
processDefinition
.
setReleaseState
(
releaseState
);
processDefinitionMapper
.
updateById
(
processDefinition
);
break
;
...
...
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TaskDefinitionServiceImpl.java
浏览文件 @
dfe4945b
...
...
@@ -119,12 +119,6 @@ public class TaskDefinitionServiceImpl extends BaseServiceImpl implements TaskDe
putMsg
(
result
,
Status
.
PROCESS_NODE_S_PARAMETER_INVALID
,
taskDefinitionLog
.
getName
());
return
result
;
}
TaskDefinition
taskDefinition
=
taskDefinitionMapper
.
queryByName
(
projectCode
,
taskDefinitionLog
.
getName
());
if
(
taskDefinition
!=
null
)
{
logger
.
error
(
"task definition name {} already exists"
,
taskDefinitionLog
.
getName
());
putMsg
(
result
,
Status
.
TASK_DEFINITION_NAME_EXISTED
,
taskDefinitionLog
.
getName
());
return
result
;
}
}
int
saveTaskResult
=
processService
.
saveTaskDefine
(
loginUser
,
projectCode
,
taskDefinitionLogs
);
if
(
saveTaskResult
==
Constants
.
DEFINITION_FAILURE
)
{
...
...
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionServiceTest.java
浏览文件 @
dfe4945b
...
...
@@ -436,8 +436,6 @@ public class ProcessDefinitionServiceTest {
Assert
.
assertEquals
(
Status
.
SUCCESS
,
onlineRes
.
get
(
Constants
.
STATUS
));
// project check auth success, processs definition online
ProcessDefinition
processDefinition1
=
getProcessDefinition
();
processDefinition1
.
setResourceIds
(
"1,2"
);
Map
<
String
,
Object
>
onlineWithResourceRes
=
processDefinitionService
.
releaseProcessDefinition
(
loginUser
,
projectCode
,
46
,
ReleaseState
.
ONLINE
);
Assert
.
assertEquals
(
Status
.
SUCCESS
,
onlineWithResourceRes
.
get
(
Constants
.
STATUS
));
...
...
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/ProcessDefinition.java
浏览文件 @
dfe4945b
...
...
@@ -163,12 +163,6 @@ public class ProcessDefinition {
@TableField
(
exist
=
false
)
private
String
modifyBy
;
/**
* resource ids
*/
@TableField
(
exist
=
false
)
private
String
resourceIds
;
/**
* warningGroupId
*/
...
...
@@ -345,14 +339,6 @@ public class ProcessDefinition {
this
.
scheduleReleaseState
=
scheduleReleaseState
;
}
public
String
getResourceIds
()
{
return
resourceIds
;
}
public
void
setResourceIds
(
String
resourceIds
)
{
this
.
resourceIds
=
resourceIds
;
}
public
int
getTimeout
()
{
return
timeout
;
}
...
...
@@ -472,7 +458,6 @@ public class ProcessDefinition {
+
", tenantId="
+
tenantId
+
", tenantCode='"
+
tenantCode
+
'\''
+
", modifyBy='"
+
modifyBy
+
'\''
+
", resourceIds='"
+
resourceIds
+
'\''
+
", warningGroupId="
+
warningGroupId
+
'}'
;
}
...
...
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/ProcessDefinitionLog.java
浏览文件 @
dfe4945b
...
...
@@ -65,7 +65,6 @@ public class ProcessDefinitionLog extends ProcessDefinition {
this
.
setTimeout
(
processDefinition
.
getTimeout
());
this
.
setTenantId
(
processDefinition
.
getTenantId
());
this
.
setModifyBy
(
processDefinition
.
getModifyBy
());
this
.
setResourceIds
(
processDefinition
.
getResourceIds
());
this
.
setWarningGroupId
(
processDefinition
.
getWarningGroupId
());
this
.
setExecutionType
(
processDefinition
.
getExecutionType
());
}
...
...
dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/mapper/ProcessDefinitionMapperTest.java
浏览文件 @
dfe4945b
...
...
@@ -329,7 +329,6 @@ public class ProcessDefinitionMapperTest extends BaseDaoTest {
@Test
public
void
listResourcesTest
()
{
ProcessDefinition
processDefinition
=
insertOne
(
"def 1"
);
processDefinition
.
setResourceIds
(
"3,5"
);
processDefinition
.
setReleaseState
(
ReleaseState
.
ONLINE
);
List
<
Map
<
String
,
Object
>>
maps
=
processDefinitionMapper
.
listResources
();
Assert
.
assertNotNull
(
maps
);
...
...
@@ -338,7 +337,6 @@ public class ProcessDefinitionMapperTest extends BaseDaoTest {
@Test
public
void
listResourcesByUserTest
()
{
ProcessDefinition
processDefinition
=
insertOne
(
"def 1"
);
processDefinition
.
setResourceIds
(
"3,5"
);
processDefinition
.
setReleaseState
(
ReleaseState
.
ONLINE
);
List
<
Map
<
String
,
Object
>>
maps
=
processDefinitionMapper
.
listResourcesByUser
(
processDefinition
.
getUserId
());
Assert
.
assertNotNull
(
maps
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录