From 61502e7743b934ac6028cfb59193147dfbf43930 Mon Sep 17 00:00:00 2001 From: Tboy Date: Wed, 6 Nov 2019 19:14:37 +0800 Subject: [PATCH] fix api server debug mode bug (#1157) * move updateTaskState into try/catch block in case of exception * fix NPE * using conf.getInt instead of getString * for AbstractZKClient, remove the log, for it will print the same log message in createZNodePath. for AlertDao, correct the spelling. * duplicate * refactor getTaskWorkerGroupId * add friendly log * update hearbeat thread num = 1 * fix the bug when worker execute task using queue. and remove checking Tenant user anymore in TaskScheduleThread * 1. move verifyTaskInstanceIsNull after taskInstance 2. keep verifyTenantIsNull/verifyTaskInstanceIsNull clean and readable * fix the message * delete before check to avoid KeeperException$NoNodeException * fix the message * check processInstance state before delete tenant * check processInstance state before delete worker group * refactor * merge api constants into common constatns * update the resource perm * update the dataSource perm * fix CheckUtils.checkUserParams method * update AlertGroupService, extends from BaseService, remove duplicate methods * refactor * modify method name * add hasProjectAndPerm method * using checkProject instead of getResultStatus * delete checkAuth method, using hasProjectAndPerm instead. * correct spelling * add transactional for deleteWorkerGroupById * add Transactional for deleteProcessInstanceById method * change sqlSessionTemplate singleton * change sqlSessionTemplate singleton and reformat code * fix unsuitable error message * update shutdownhook methods * fix worker log bug * fix api server debug mode bug * upgrade zk version --- dolphinscheduler-api/pom.xml | 48 +++++++++++++++++++ .../api/utils/ZooKeeperState.java | 2 +- dolphinscheduler-common/pom.xml | 20 ++++---- .../dao/mapper/ProcessInstanceMapperTest.java | 1 - dolphinscheduler-server/pom.xml | 4 ++ pom.xml | 26 ++++++++-- 6 files changed, 84 insertions(+), 17 deletions(-) diff --git a/dolphinscheduler-api/pom.xml b/dolphinscheduler-api/pom.xml index b0d6b7392..b128ecd42 100644 --- a/dolphinscheduler-api/pom.xml +++ b/dolphinscheduler-api/pom.xml @@ -8,6 +8,11 @@ dolphinscheduler-api jar + + 5.5.23 + 2.5 + + org.apache.dolphinscheduler @@ -183,6 +188,49 @@ 4.12 test + + + org.apache.curator + curator-framework + + + org.apache.curator + curator-recipes + + + + org.apache.hadoop + hadoop-common + + + org.apache.hadoop + hadoop-client + + + org.apache.hadoop + hadoop-hdfs + + + org.apache.hadoop + hadoop-yarn-common + + + org.apache.hadoop + hadoop-aws + + + + tomcat + jasper-runtime + ${jasper-runtime.version} + + + + javax.servlet + servlet-api + ${servlet-api.version} + + diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/utils/ZooKeeperState.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/utils/ZooKeeperState.java index c7ec39ebf..f741b88e7 100644 --- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/utils/ZooKeeperState.java +++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/utils/ZooKeeperState.java @@ -133,7 +133,7 @@ public class ZooKeeperState { public void run() { try { ret = FourLetterWordMain.send4LetterWord(host, port, cmd); - } catch (IOException e) { + } catch (Exception e) { logger.error(e.getMessage(),e); return; } diff --git a/dolphinscheduler-common/pom.xml b/dolphinscheduler-common/pom.xml index a79d561bf..a5c6700f0 100644 --- a/dolphinscheduler-common/pom.xml +++ b/dolphinscheduler-common/pom.xml @@ -566,16 +566,16 @@ - - org.mortbay.jetty - jsp-2.1 - - - org.mortbay.jetty - servlet-api-2.5 - - - + + + + + + + + + + com.baomidou mybatis-plus-annotation diff --git a/dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/mapper/ProcessInstanceMapperTest.java b/dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/mapper/ProcessInstanceMapperTest.java index c07fd05da..c67f4d581 100644 --- a/dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/mapper/ProcessInstanceMapperTest.java +++ b/dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/mapper/ProcessInstanceMapperTest.java @@ -26,7 +26,6 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import org.junit.Assert; import org.junit.Test; import org.junit.runner.RunWith; -import org.mortbay.jetty.servlet.AbstractSessionIdManager; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; diff --git a/dolphinscheduler-server/pom.xml b/dolphinscheduler-server/pom.xml index 8aaffc6c1..260498d9d 100644 --- a/dolphinscheduler-server/pom.xml +++ b/dolphinscheduler-server/pom.xml @@ -69,6 +69,10 @@ org.apache.curator curator-recipes + + org.apache.zookeeper + zookeeper + org.apache.httpcomponents diff --git a/pom.xml b/pom.xml index e72753d8f..85aff682c 100644 --- a/pom.xml +++ b/pom.xml @@ -61,6 +61,7 @@ 6.1.14 3.1.12 0.13 + 3.5.6 @@ -190,6 +191,21 @@ curator-recipes ${curator.version} + + org.apache.zookeeper + zookeeper + + + org.slf4j + slf4j-log4j12 + + + netty + io.netty + + + ${zookeeper.version} + commons-codec @@ -406,11 +422,11 @@ ${mssql.jdbc.version} - - org.mortbay.jetty - jsp-2.1 - ${jsp.version} - + + + + + net.jcip -- GitLab