From f7e89e4561da0b76bf82a496c2649994664a051c Mon Sep 17 00:00:00 2001 From: songgg <1172417734@qq.com> Date: Mon, 30 Mar 2020 12:09:34 +0800 Subject: [PATCH 1/6] some annotation optimizations (#2333) Co-authored-by: songqh --- .../dolphinscheduler/api/service/ExecutorService.java | 2 +- .../apache/dolphinscheduler/common/enums/ZKNodeType.java | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ExecutorService.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ExecutorService.java index 86b507f0a0..fe43f10b78 100644 --- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ExecutorService.java +++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ExecutorService.java @@ -98,7 +98,7 @@ public class ExecutorService extends BaseService{ String receivers, String receiversCc, RunMode runMode, Priority processInstancePriority, int workerGroupId, Integer timeout) throws ParseException { Map result = new HashMap<>(5); - // timeout is valid + // timeout is invalid if (timeout <= 0 || timeout > MAX_TASK_TIMEOUT) { putMsg(result,Status.TASK_TIMEOUT_PARAMS_ERROR); return result; diff --git a/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/ZKNodeType.java b/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/ZKNodeType.java index 8982c2a838..b4b3c59321 100644 --- a/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/ZKNodeType.java +++ b/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/ZKNodeType.java @@ -22,10 +22,10 @@ package org.apache.dolphinscheduler.common.enums; public enum ZKNodeType { /** - * 0 do not send warning; - * 1 send if process success; - * 2 send if process failed; - * 3 send if process ending; + * 0 master node; + * 1 worker node; + * 2 dead_server node; + * 3 task_queue node; */ MASTER, WORKER, DEAD_SERVER, TASK_QUEUE; } From 4440b35c4e1a56eeadddd4b6881ad70684350726 Mon Sep 17 00:00:00 2001 From: Rubik-W <39549317+Rubik-W@users.noreply.github.com> Date: Mon, 30 Mar 2020 16:22:44 +0800 Subject: [PATCH 2/6] fix #2334 (#2335) Co-authored-by: dailidong --- .../dolphinscheduler/server/worker/task/sql/SqlTask.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/task/sql/SqlTask.java b/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/task/sql/SqlTask.java index 12f4b580e9..7da6bd9115 100644 --- a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/task/sql/SqlTask.java +++ b/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/task/sql/SqlTask.java @@ -299,7 +299,11 @@ public class SqlTask extends AbstractTask { while (resultSet.next()) { JSONObject mapOfColValues = new JSONObject(true); for (int i = 1; i <= num; i++) { - mapOfColValues.put(md.getColumnName(i), resultSet.getObject(i)); + if (StringUtils.isNotEmpty(md.getColumnLabel(i))) { + mapOfColValues.put(md.getColumnLabel(i), resultSet.getObject(i)); + } else { + mapOfColValues.put(md.getColumnName(i), resultSet.getObject(i)); + } } resultJSONArray.add(mapOfColValues); } From b5ff3ad39ed3af6db2a45bdbf154111d1de792b2 Mon Sep 17 00:00:00 2001 From: dailidong Date: Tue, 31 Mar 2020 07:55:17 +0800 Subject: [PATCH 3/6] Delete ReleaseNotes.md (#2338) --- ReleaseNotes.md | 55 ------------------------------------------------- 1 file changed, 55 deletions(-) delete mode 100644 ReleaseNotes.md diff --git a/ReleaseNotes.md b/ReleaseNotes.md deleted file mode 100644 index 8d837c465b..0000000000 --- a/ReleaseNotes.md +++ /dev/null @@ -1,55 +0,0 @@ -## 1.2.0 - -### New Feature -1. Support postgre sql -2. Change all Chinese names to English -3. Add flink and http task support -4. Cross project dependencies -5. Modify mybatis to mybatisplus, support multy databases. -6. Add export and import definition feaure -7. Github actions ci compile check -8. Add method and parameters comments -9. Add java doc for common module - - -### Enhancement -1. Add license and notice files -2. Move batchDelete Process Define/Instance Outside for transactional -3. Remove space before and after login user name -4. Dockerfile optimization -5. Change mysql-connector-java scope to test -6. Owners and administrators can delete schedule -7. DB page rename and background color modification  -8. Add postgre performance monitor -9. Resolve style conflict, recipient cannot tab and value verification -10. Checkbox change background color and env to Chinese -11. Change chinese sql to english -12. Change sqlSessionTemplate singleton and reformat code  -13. The value of loadaverage should be two decimal places -14. Delete alert group need delete the relation of user and alert group -15. Remove check resources when delete tenant -16. Check processInstance state before delete worker group  -17. Add check user and definitions function when delete tenant -18. Delete before check to avoid KeeperException$NoNodeException - -### Bug Fixes -1. Fix #1245, make scanCommand transactional -2. Fix ZKWorkerClient not close PathChildrenCache -3. Data type convert error ,email send error bug fix -4. Catch exception transaction method does not take effect to modify -5. Fix the spring transaction not worker bug -6. Task log print worker log bug fix -7. Fix api server debug mode bug -8. The task is abnormal and task is running bug fix -9. Fix bug: tasks queue length error -10. Fix unsuitable error message -11. Fix bug: phone can be empty -12. Fix email error password -13. Fix CheckUtils.checkUserParams method -14. The process cannot be terminated while tasks in the status submit success -15. Fix too many connection in upgrade or create  -16. Fix the bug when worker execute task using queue. and remove checking -17. Resole verify udf name error and delete udf error  -18. Fix bug: task cannot submit when recovery failover -19. Fix bug: the administrator authorizes the project to ordinary users,but ordinary users cannot see the process definition created by the administrator -20. Fix bug: create dolphinscheduler sql failed \ No newline at end of file From 2114c8d95f0d265e16b3b090cdc95969d1ec5cc8 Mon Sep 17 00:00:00 2001 From: break60 <790061044@qq.com> Date: Tue, 31 Mar 2020 10:51:04 +0800 Subject: [PATCH 4/6] Modify ans-ui version and timing management style (#2339) * Change DOM label * Change name to lowercase * Limit customization file content to no more than 3000 lines * dd branch flow node verification * datax * datax add custom * Change normalize.scss import method and animation.scss license modification * Resource tree code merge * Modify ans-ui version and timing management style --- dolphinscheduler-ui/package.json | 2 +- .../pages/definition/pages/list/_source/timing.vue | 7 +++++++ .../projects/pages/instance/pages/list/_source/list.vue | 8 ++++---- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/dolphinscheduler-ui/package.json b/dolphinscheduler-ui/package.json index 6b139fa880..b23969803b 100644 --- a/dolphinscheduler-ui/package.json +++ b/dolphinscheduler-ui/package.json @@ -12,7 +12,7 @@ }, "dependencies": { "@riophae/vue-treeselect": "^0.4.0", - "ans-ui": "1.1.7", + "ans-ui": "1.1.9", "axios": "^0.16.2", "bootstrap": "3.3.7", "canvg": "1.5.1", diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/_source/timing.vue b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/_source/timing.vue index 16f7020939..ad87c5ae85 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/_source/timing.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/_source/timing.vue @@ -413,4 +413,11 @@ padding: 0; } } + .x-date-packer-panel .x-date-packer-day .lattice label.bg-hover { + background: #00BFFF!important; + margin-top: -4px; + } + .x-date-packer-panel .x-date-packer-day .lattice em:hover { + background: #0098e1!important; + } diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/instance/pages/list/_source/list.vue b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/instance/pages/list/_source/list.vue index 57ae6bd685..c5992de20f 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/instance/pages/list/_source/list.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/instance/pages/list/_source/list.vue @@ -22,13 +22,13 @@ - + {{$t('#')}} - + {{$t('Process Name')}} - + {{$t('Executor')}} @@ -71,7 +71,7 @@ {{item.name}} - {{item.executorName}} + {{item.executorName}} - {{_rtRunningType(item.commandType)}} From 2b17435337a11ee13d10103e9b27ef1f763f5f56 Mon Sep 17 00:00:00 2001 From: break60 <790061044@qq.com> Date: Tue, 31 Mar 2020 11:11:50 +0800 Subject: [PATCH 5/6] Supplemental licenses and repair resources cannot be renamed (#2340) * Change DOM label * Change name to lowercase * Limit customization file content to no more than 3000 lines * dd branch flow node verification * datax * datax add custom * Change normalize.scss import method and animation.scss license modification * Resource tree code merge * Modify ans-ui version and timing management style * Supplemental licenses and repair resources cannot be renamed --- dolphinscheduler-dist/release-docs/LICENSE | 2 ++ .../licenses/ui-licenses/LICENSE-normalize | 8 ++++++++ .../ui-licenses/LICENSE-vue-treeselect | 20 +++++++++++++++++++ .../pages/file/pages/list/_source/list.vue | 3 +-- .../pages/file/pages/list/_source/rename.vue | 7 +++---- .../pages/udf/pages/resource/_source/list.vue | 3 +-- .../udf/pages/resource/_source/rename.vue | 6 +++--- 7 files changed, 38 insertions(+), 11 deletions(-) create mode 100644 dolphinscheduler-dist/release-docs/licenses/ui-licenses/LICENSE-normalize create mode 100644 dolphinscheduler-dist/release-docs/licenses/ui-licenses/LICENSE-vue-treeselect diff --git a/dolphinscheduler-dist/release-docs/LICENSE b/dolphinscheduler-dist/release-docs/LICENSE index 97946d1172..82e641ec72 100644 --- a/dolphinscheduler-dist/release-docs/LICENSE +++ b/dolphinscheduler-dist/release-docs/LICENSE @@ -518,6 +518,8 @@ MIT licenses js-cookie 2.2.1: https://github.com/js-cookie/js-cookie MIT jsplumb 2.8.6: https://github.com/jsplumb/jsplumb MIT and GPLv2 lodash 4.17.11: https://github.com/lodash/lodash MIT + normalize.css 8.0.1: https://github.com/necolas/normalize.css MIT + vue-treeselect 0.4.0: https://github.com/riophae/vue-treeselect MIT vue 2.5.17: https://github.com/vuejs/vue MIT vue-router 2.7.0: https://github.com/vuejs/vue-router MIT vuex 3.0.0: https://github.com/vuejs/vuex MIT diff --git a/dolphinscheduler-dist/release-docs/licenses/ui-licenses/LICENSE-normalize b/dolphinscheduler-dist/release-docs/licenses/ui-licenses/LICENSE-normalize new file mode 100644 index 0000000000..90e0c091a5 --- /dev/null +++ b/dolphinscheduler-dist/release-docs/licenses/ui-licenses/LICENSE-normalize @@ -0,0 +1,8 @@ +The MIT License (MIT) +Copyright © Nicolas Gallagher and Jonathan Neal + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/dolphinscheduler-dist/release-docs/licenses/ui-licenses/LICENSE-vue-treeselect b/dolphinscheduler-dist/release-docs/licenses/ui-licenses/LICENSE-vue-treeselect new file mode 100644 index 0000000000..f7d8cc3ebd --- /dev/null +++ b/dolphinscheduler-dist/release-docs/licenses/ui-licenses/LICENSE-vue-treeselect @@ -0,0 +1,20 @@ +Copyright (c) 2017-present Riophae Lee + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/list/_source/list.vue b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/list/_source/list.vue index 3bc1bfac24..4ccfa2eff3 100755 --- a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/list/_source/list.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/list/_source/list.vue @@ -134,7 +134,6 @@ import { bytesToSize } from '@/module/util/util' import { downloadFile } from '@/module/download' import localStore from '@/module/util/localStorage' - export default { name: 'file-manage-list', data () { @@ -238,4 +237,4 @@ }, components: { } } - + \ No newline at end of file diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/list/_source/rename.vue b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/list/_source/rename.vue index ad33503532..f7639bb959 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/list/_source/rename.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/list/_source/rename.vue @@ -47,9 +47,9 @@ + \ No newline at end of file diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/resource/_source/list.vue b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/resource/_source/list.vue index ddb097ee0f..362a3f6727 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/resource/_source/list.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/resource/_source/list.vue @@ -128,7 +128,6 @@ import { downloadFile } from '@/module/download' import { bytesToSize } from '@/module/util/util' import localStore from '@/module/util/localStorage' - export default { name: 'udf-manage-list', data () { @@ -215,4 +214,4 @@ }, components: { } } - + \ No newline at end of file diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/resource/_source/rename.vue b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/resource/_source/rename.vue index 69acdef4a5..359a16a29f 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/resource/_source/rename.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/resource/_source/rename.vue @@ -48,9 +48,9 @@ + \ No newline at end of file From 718e4b15d2484f7d94d96b8110025a0fa07d86c4 Mon Sep 17 00:00:00 2001 From: "gabry.wu" Date: Tue, 31 Mar 2020 12:13:34 +0800 Subject: [PATCH 6/6] Adapting partial code(file name start with O) to the sonar cloud rule (#2259) * Adapting partial code(file name start with O) to the sonar cloud rule * resolve conflict with dev branch Co-authored-by: dailidong --- .../apache/dolphinscheduler/common/utils/OSUtils.java | 10 ++-------- .../apache/dolphinscheduler/common/os/OSUtilsTest.java | 2 +- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/OSUtils.java b/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/OSUtils.java index a0fea8d33c..4df09d1c15 100644 --- a/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/OSUtils.java +++ b/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/OSUtils.java @@ -352,13 +352,7 @@ public class OSUtils { return sb.toString(); } finally { - if (br != null) { - try { - br.close(); - } catch (Exception e) { - logger.error(e.getMessage(), e); - } - } + IOUtils.closeQuietly(br); } } @@ -408,7 +402,7 @@ public class OSUtils { * whether is windows * @return true if windows */ - public static boolean isWindows() { ; + public static boolean isWindows() { return getOSName().startsWith("Windows"); } diff --git a/dolphinscheduler-common/src/test/java/org/apache/dolphinscheduler/common/os/OSUtilsTest.java b/dolphinscheduler-common/src/test/java/org/apache/dolphinscheduler/common/os/OSUtilsTest.java index 2670eebc20..1815e48f84 100644 --- a/dolphinscheduler-common/src/test/java/org/apache/dolphinscheduler/common/os/OSUtilsTest.java +++ b/dolphinscheduler-common/src/test/java/org/apache/dolphinscheduler/common/os/OSUtilsTest.java @@ -67,7 +67,7 @@ public class OSUtilsTest { @Test public void cpuUsage() throws Exception { logger.info("cpuUsage : {}", OSUtils.cpuUsage()); - Thread.sleep(1000l); + Thread.sleep(1000L); logger.info("cpuUsage : {}", OSUtils.cpuUsage()); double cpuUsage = OSUtils.cpuUsage();