You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2021/04/25 10:04:27 UTC
[GitHub] [dolphinscheduler] wen-hemin opened a new pull request #5377: [FixBug][JsonSplit] depend task, the field "process definition id" modify to "process definition code"
wen-hemin opened a new pull request #5377:
URL: https://github.com/apache/dolphinscheduler/pull/5377
## Purpose of the pull request
depend task, the field "process definition id" modify to "process definition code"
#4417
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [dolphinscheduler] wen-hemin commented on a change in pull request #5377: [FixBug][JsonSplit] depend task, the field "process definition id" modify to "process definition code"
Posted by GitBox <gi...@apache.org>.
wen-hemin commented on a change in pull request #5377:
URL: https://github.com/apache/dolphinscheduler/pull/5377#discussion_r619793601
##########
File path: dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
##########
@@ -1164,24 +1163,23 @@ private void importSubProcess(User loginUser, Project targetProject, ArrayNode j
/**
* get task node details based on process definition
*
- * @param defineIdList define id list
+ * @param defineCodeList define code list
* @return task node list
*/
@Override
- public Map<String, Object> getTaskNodeListByDefinitionIdList(String defineIdList) {
+ public Map<String, Object> getTaskNodeListByDefinitionCodeList(String defineCodeList) {
Map<String, Object> result = new HashMap<>();
Map<Integer, List<TaskNode>> taskNodeMap = new HashMap<>();
- String[] idList = defineIdList.split(",");
- List<Integer> idIntList = new ArrayList<>();
- for (String definitionId : idList) {
- idIntList.add(Integer.parseInt(definitionId));
+ String[] codeArr = defineCodeList.split(",");
+ List<Long> codeList = new ArrayList<>();
+ for (String definitionCode : codeArr) {
Review comment:
Here, build the Long list
I don't like the lambda style, haha
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [dolphinscheduler] JinyLeeChina commented on a change in pull request #5377: [FixBug][JsonSplit] depend task, the field "process definition id" modify to "process definition code"
Posted by GitBox <gi...@apache.org>.
JinyLeeChina commented on a change in pull request #5377:
URL: https://github.com/apache/dolphinscheduler/pull/5377#discussion_r619791934
##########
File path: dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
##########
@@ -1164,24 +1163,23 @@ private void importSubProcess(User loginUser, Project targetProject, ArrayNode j
/**
* get task node details based on process definition
*
- * @param defineIdList define id list
+ * @param defineCodeList define code list
* @return task node list
*/
@Override
- public Map<String, Object> getTaskNodeListByDefinitionIdList(String defineIdList) {
+ public Map<String, Object> getTaskNodeListByDefinitionCodeList(String defineCodeList) {
Map<String, Object> result = new HashMap<>();
Map<Integer, List<TaskNode>> taskNodeMap = new HashMap<>();
- String[] idList = defineIdList.split(",");
- List<Integer> idIntList = new ArrayList<>();
- for (String definitionId : idList) {
- idIntList.add(Integer.parseInt(definitionId));
+ String[] codeArr = defineCodeList.split(",");
+ List<Long> codeList = new ArrayList<>();
+ for (String definitionCode : codeArr) {
Review comment:
This can like:
Long[] codeArr = Arrays.stream(defineCodeList.split(Constants.COMMA)).map(Long::parseLong).toArray(Long[]::new);
##########
File path: dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
##########
@@ -1164,24 +1163,23 @@ private void importSubProcess(User loginUser, Project targetProject, ArrayNode j
/**
* get task node details based on process definition
*
- * @param defineIdList define id list
+ * @param defineCodeList define code list
* @return task node list
*/
@Override
- public Map<String, Object> getTaskNodeListByDefinitionIdList(String defineIdList) {
+ public Map<String, Object> getTaskNodeListByDefinitionCodeList(String defineCodeList) {
Map<String, Object> result = new HashMap<>();
Map<Integer, List<TaskNode>> taskNodeMap = new HashMap<>();
- String[] idList = defineIdList.split(",");
- List<Integer> idIntList = new ArrayList<>();
- for (String definitionId : idList) {
- idIntList.add(Integer.parseInt(definitionId));
+ String[] codeArr = defineCodeList.split(",");
+ List<Long> codeList = new ArrayList<>();
+ for (String definitionCode : codeArr) {
Review comment:
OK
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [dolphinscheduler] JinyLeeChina commented on a change in pull request #5377: [FixBug][JsonSplit] depend task, the field "process definition id" modify to "process definition code"
Posted by GitBox <gi...@apache.org>.
JinyLeeChina commented on a change in pull request #5377:
URL: https://github.com/apache/dolphinscheduler/pull/5377#discussion_r619796409
##########
File path: dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
##########
@@ -1164,24 +1163,23 @@ private void importSubProcess(User loginUser, Project targetProject, ArrayNode j
/**
* get task node details based on process definition
*
- * @param defineIdList define id list
+ * @param defineCodeList define code list
* @return task node list
*/
@Override
- public Map<String, Object> getTaskNodeListByDefinitionIdList(String defineIdList) {
+ public Map<String, Object> getTaskNodeListByDefinitionCodeList(String defineCodeList) {
Map<String, Object> result = new HashMap<>();
Map<Integer, List<TaskNode>> taskNodeMap = new HashMap<>();
- String[] idList = defineIdList.split(",");
- List<Integer> idIntList = new ArrayList<>();
- for (String definitionId : idList) {
- idIntList.add(Integer.parseInt(definitionId));
+ String[] codeArr = defineCodeList.split(",");
+ List<Long> codeList = new ArrayList<>();
+ for (String definitionCode : codeArr) {
Review comment:
OK
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [dolphinscheduler] JinyLeeChina commented on a change in pull request #5377: [FixBug][JsonSplit] depend task, the field "process definition id" modify to "process definition code"
Posted by GitBox <gi...@apache.org>.
JinyLeeChina commented on a change in pull request #5377:
URL: https://github.com/apache/dolphinscheduler/pull/5377#discussion_r619791934
##########
File path: dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
##########
@@ -1164,24 +1163,23 @@ private void importSubProcess(User loginUser, Project targetProject, ArrayNode j
/**
* get task node details based on process definition
*
- * @param defineIdList define id list
+ * @param defineCodeList define code list
* @return task node list
*/
@Override
- public Map<String, Object> getTaskNodeListByDefinitionIdList(String defineIdList) {
+ public Map<String, Object> getTaskNodeListByDefinitionCodeList(String defineCodeList) {
Map<String, Object> result = new HashMap<>();
Map<Integer, List<TaskNode>> taskNodeMap = new HashMap<>();
- String[] idList = defineIdList.split(",");
- List<Integer> idIntList = new ArrayList<>();
- for (String definitionId : idList) {
- idIntList.add(Integer.parseInt(definitionId));
+ String[] codeArr = defineCodeList.split(",");
+ List<Long> codeList = new ArrayList<>();
+ for (String definitionCode : codeArr) {
Review comment:
This can like:
Long[] codeArr = Arrays.stream(defineCodeList.split(Constants.COMMA)).map(Long::parseLong).toArray(Long[]::new);
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [dolphinscheduler] wen-hemin merged pull request #5377: [FixBug][JsonSplit] depend task, the field "process definition id" modify to "process definition code"
Posted by GitBox <gi...@apache.org>.
wen-hemin merged pull request #5377:
URL: https://github.com/apache/dolphinscheduler/pull/5377
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [dolphinscheduler] wen-hemin merged pull request #5377: [FixBug][JsonSplit] depend task, the field "process definition id" modify to "process definition code"
Posted by GitBox <gi...@apache.org>.
wen-hemin merged pull request #5377:
URL: https://github.com/apache/dolphinscheduler/pull/5377
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [dolphinscheduler] wen-hemin commented on a change in pull request #5377: [FixBug][JsonSplit] depend task, the field "process definition id" modify to "process definition code"
Posted by GitBox <gi...@apache.org>.
wen-hemin commented on a change in pull request #5377:
URL: https://github.com/apache/dolphinscheduler/pull/5377#discussion_r619793601
##########
File path: dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
##########
@@ -1164,24 +1163,23 @@ private void importSubProcess(User loginUser, Project targetProject, ArrayNode j
/**
* get task node details based on process definition
*
- * @param defineIdList define id list
+ * @param defineCodeList define code list
* @return task node list
*/
@Override
- public Map<String, Object> getTaskNodeListByDefinitionIdList(String defineIdList) {
+ public Map<String, Object> getTaskNodeListByDefinitionCodeList(String defineCodeList) {
Map<String, Object> result = new HashMap<>();
Map<Integer, List<TaskNode>> taskNodeMap = new HashMap<>();
- String[] idList = defineIdList.split(",");
- List<Integer> idIntList = new ArrayList<>();
- for (String definitionId : idList) {
- idIntList.add(Integer.parseInt(definitionId));
+ String[] codeArr = defineCodeList.split(",");
+ List<Long> codeList = new ArrayList<>();
+ for (String definitionCode : codeArr) {
Review comment:
Here, build the Long list
I don't like the lambda style, haha
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org