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 2020/01/05 09:03:56 UTC

[GitHub] [incubator-dolphinscheduler] Yeleights opened a new pull request #1719: fix bug sonar: add null check in daghelper && add hashcode method in processData

Yeleights opened a new pull request #1719: fix bug sonar: add null check in daghelper && add hashcode method in processData
URL: https://github.com/apache/incubator-dolphinscheduler/pull/1719
 
 
   ## What is the purpose of the pull request
   *fix bug sonar: add null check in daghelper && add hashcode method in processData*
   ## Brief change log
     - *Edit dao/entity/ProcessData*
     - *Edit dao/utils/DagHelper*
   ## Verify this pull request
   This pull request is code cleanup without any test coverage.

----------------------------------------------------------------
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


With regards,
Apache Git Services

[GitHub] [incubator-dolphinscheduler] codecov-io commented on issue #1719: fix bug sonar: add null check in daghelper && add hashcode method in processData

Posted by GitBox <gi...@apache.org>.
codecov-io commented on issue #1719: fix bug sonar: add null check in daghelper && add hashcode method in processData
URL: https://github.com/apache/incubator-dolphinscheduler/pull/1719#issuecomment-570891899
 
 
   # [Codecov](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/1719?src=pr&el=h1) Report
   > Merging [#1719](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/1719?src=pr&el=desc) into [dev](https://codecov.io/gh/apache/incubator-dolphinscheduler/commit/1f7db8f7975d2d01048eaaeae98d4425417abbae?src=pr&el=desc) will **decrease** coverage by `0.01%`.
   > The diff coverage is `0%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/1719/graphs/tree.svg?width=650&token=bv9iXXRLi9&height=150&src=pr)](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/1719?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##              dev    #1719      +/-   ##
   ==========================================
   - Coverage   17.48%   17.47%   -0.02%     
   ==========================================
     Files         285      285              
     Lines       13912    13922      +10     
     Branches     2274     2278       +4     
   ==========================================
     Hits         2433     2433              
   - Misses      11206    11216      +10     
     Partials      273      273
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/1719?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [...g/apache/dolphinscheduler/dao/utils/DagHelper.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/1719/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1kYW8vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvZGFvL3V0aWxzL0RhZ0hlbHBlci5qYXZh) | `0% <0%> (ø)` | :arrow_up: |
   | [...pache/dolphinscheduler/dao/entity/ProcessData.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/1719/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1kYW8vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvZGFvL2VudGl0eS9Qcm9jZXNzRGF0YS5qYXZh) | `0% <0%> (ø)` | :arrow_up: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/1719?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/1719?src=pr&el=footer). Last update [1f7db8f...671ec3c](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/1719?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   

----------------------------------------------------------------
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


With regards,
Apache Git Services

[GitHub] [incubator-dolphinscheduler] Technoboy- commented on a change in pull request #1719: fix bug sonar: add null check in daghelper

Posted by GitBox <gi...@apache.org>.
Technoboy- commented on a change in pull request #1719: fix bug sonar: add null check in daghelper
URL: https://github.com/apache/incubator-dolphinscheduler/pull/1719#discussion_r363137704
 
 

 ##########
 File path: dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/utils/DagHelper.java
 ##########
 @@ -149,9 +147,12 @@
 
         List<TaskNode> resultList = new ArrayList<>();
 
-        List<String> depList = startNode.getDepList();
-        resultList.add(startNode);
-        if (depList == null || depList.size() == 0) {
+        List<String> depList = new ArrayList<>();
+        if (null != startNode) {
+            depList = startNode.getDepList();
+            resultList.add(startNode);
+        }
+        if (depList == null || depList.isEmpty()) {
 
 Review comment:
   Use CollectionUtils.isEmpty()

----------------------------------------------------------------
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


With regards,
Apache Git Services

[GitHub] [incubator-dolphinscheduler] Technoboy- commented on a change in pull request #1719: fix bug sonar: add null check in daghelper

Posted by GitBox <gi...@apache.org>.
Technoboy- commented on a change in pull request #1719: fix bug sonar: add null check in daghelper
URL: https://github.com/apache/incubator-dolphinscheduler/pull/1719#discussion_r363137887
 
 

 ##########
 File path: dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/utils/DagHelper.java
 ##########
 @@ -78,17 +78,17 @@
         List<String> startNodeList = startNodeNameList;
 
         if(taskDependType != TaskDependType.TASK_POST
-                && startNodeList.size() == 0){
+                && startNodeList.isEmpty()){
             logger.error("start node list is empty! cannot continue run the process ");
             return destFlowNodeList;
         }
         List<TaskNode> destTaskNodeList = new ArrayList<>();
         List<TaskNode> tmpTaskNodeList = new ArrayList<>();
         if (taskDependType == TaskDependType.TASK_POST
-                && recoveryNodeNameList.size() > 0) {
+                && !recoveryNodeNameList.isEmpty()) {
 
 Review comment:
   the same as upstairs

----------------------------------------------------------------
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


With regards,
Apache Git Services

[GitHub] [incubator-dolphinscheduler] Technoboy- commented on issue #1719: fix bug sonar: add null check in daghelper

Posted by GitBox <gi...@apache.org>.
Technoboy- commented on issue #1719: fix bug sonar: add null check in daghelper
URL: https://github.com/apache/incubator-dolphinscheduler/pull/1719#issuecomment-570988077
 
 
   @qiaozhanwei 

----------------------------------------------------------------
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


With regards,
Apache Git Services

[GitHub] [incubator-dolphinscheduler] qiaozhanwei merged pull request #1719: fix bug sonar: add null check in daghelper

Posted by GitBox <gi...@apache.org>.
qiaozhanwei merged pull request #1719: fix bug sonar: add null check in daghelper
URL: https://github.com/apache/incubator-dolphinscheduler/pull/1719
 
 
   

----------------------------------------------------------------
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


With regards,
Apache Git Services

[GitHub] [incubator-dolphinscheduler] Technoboy- commented on a change in pull request #1719: fix bug sonar: add null check in daghelper

Posted by GitBox <gi...@apache.org>.
Technoboy- commented on a change in pull request #1719: fix bug sonar: add null check in daghelper
URL: https://github.com/apache/incubator-dolphinscheduler/pull/1719#discussion_r363137780
 
 

 ##########
 File path: dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/utils/DagHelper.java
 ##########
 @@ -78,17 +78,17 @@
         List<String> startNodeList = startNodeNameList;
 
         if(taskDependType != TaskDependType.TASK_POST
-                && startNodeList.size() == 0){
+                && startNodeList.isEmpty()){
 
 Review comment:
   CollectionUtils.isEmpty()

----------------------------------------------------------------
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


With regards,
Apache Git Services

[GitHub] [incubator-dolphinscheduler] Technoboy- commented on a change in pull request #1719: fix bug sonar: add null check in daghelper

Posted by GitBox <gi...@apache.org>.
Technoboy- commented on a change in pull request #1719: fix bug sonar: add null check in daghelper
URL: https://github.com/apache/incubator-dolphinscheduler/pull/1719#discussion_r363137909
 
 

 ##########
 File path: dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/utils/DagHelper.java
 ##########
 @@ -78,17 +78,17 @@
         List<String> startNodeList = startNodeNameList;
 
         if(taskDependType != TaskDependType.TASK_POST
-                && startNodeList.size() == 0){
+                && startNodeList.isEmpty()){
             logger.error("start node list is empty! cannot continue run the process ");
             return destFlowNodeList;
         }
         List<TaskNode> destTaskNodeList = new ArrayList<>();
         List<TaskNode> tmpTaskNodeList = new ArrayList<>();
         if (taskDependType == TaskDependType.TASK_POST
-                && recoveryNodeNameList.size() > 0) {
+                && !recoveryNodeNameList.isEmpty()) {
             startNodeList = recoveryNodeNameList;
         }
-        if (startNodeList == null || startNodeList.size() == 0) {
+        if (startNodeList == null || startNodeList.isEmpty()) {
 
 Review comment:
   the same as upstairs

----------------------------------------------------------------
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


With regards,
Apache Git Services

[GitHub] [incubator-dolphinscheduler] codecov-io edited a comment on issue #1719: fix bug sonar: add null check in daghelper

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on issue #1719: fix bug sonar: add null check in daghelper
URL: https://github.com/apache/incubator-dolphinscheduler/pull/1719#issuecomment-570891899
 
 
   # [Codecov](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/1719?src=pr&el=h1) Report
   > Merging [#1719](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/1719?src=pr&el=desc) into [dev](https://codecov.io/gh/apache/incubator-dolphinscheduler/commit/1f7db8f7975d2d01048eaaeae98d4425417abbae?src=pr&el=desc) will **decrease** coverage by `<.01%`.
   > The diff coverage is `0%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/1719/graphs/tree.svg?width=650&token=bv9iXXRLi9&height=150&src=pr)](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/1719?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##              dev    #1719      +/-   ##
   ==========================================
   - Coverage   17.48%   17.48%   -0.01%     
   ==========================================
     Files         285      285              
     Lines       13912    13917       +5     
     Branches     2274     2276       +2     
   ==========================================
     Hits         2433     2433              
   - Misses      11206    11211       +5     
     Partials      273      273
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/1719?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [...g/apache/dolphinscheduler/dao/utils/DagHelper.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/1719/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1kYW8vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvZGFvL3V0aWxzL0RhZ0hlbHBlci5qYXZh) | `0% <0%> (ø)` | :arrow_up: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/1719?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/1719?src=pr&el=footer). Last update [1f7db8f...cf17de6](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/1719?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   

----------------------------------------------------------------
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


With regards,
Apache Git Services

[GitHub] [incubator-dolphinscheduler] codecov-io edited a comment on issue #1719: fix bug sonar: add null check in daghelper

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on issue #1719: fix bug sonar: add null check in daghelper
URL: https://github.com/apache/incubator-dolphinscheduler/pull/1719#issuecomment-570891899
 
 
   # [Codecov](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/1719?src=pr&el=h1) Report
   > Merging [#1719](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/1719?src=pr&el=desc) into [dev](https://codecov.io/gh/apache/incubator-dolphinscheduler/commit/1f7db8f7975d2d01048eaaeae98d4425417abbae?src=pr&el=desc) will **decrease** coverage by `<.01%`.
   > The diff coverage is `0%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/1719/graphs/tree.svg?width=650&token=bv9iXXRLi9&height=150&src=pr)](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/1719?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##              dev    #1719      +/-   ##
   ==========================================
   - Coverage   17.48%   17.48%   -0.01%     
   ==========================================
     Files         285      285              
     Lines       13912    13917       +5     
     Branches     2274     2276       +2     
   ==========================================
     Hits         2433     2433              
   - Misses      11206    11211       +5     
     Partials      273      273
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/1719?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [...g/apache/dolphinscheduler/dao/utils/DagHelper.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/1719/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1kYW8vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvZGFvL3V0aWxzL0RhZ0hlbHBlci5qYXZh) | `0% <0%> (ø)` | :arrow_up: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/1719?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/1719?src=pr&el=footer). Last update [1f7db8f...b56a533](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/1719?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   

----------------------------------------------------------------
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


With regards,
Apache Git Services