You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by ke...@apache.org on 2022/09/03 14:01:51 UTC

[dolphinscheduler] branch cve created (now e43c683c14)

This is an automated email from the ASF dual-hosted git repository.

kezhenxu94 pushed a change to branch cve
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git


      at e43c683c14 Bump up dependencies to fix cves

This branch includes the following new commits:

     new e43c683c14 Bump up dependencies to fix cves

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[dolphinscheduler] 01/01: Bump up dependencies to fix cves

Posted by ke...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

kezhenxu94 pushed a commit to branch cve
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git

commit e43c683c148cc37f21ed4c2eb81f5e4eecb2f6c3
Author: kezhenxu94 <ke...@apache.org>
AuthorDate: Sat Sep 3 22:01:25 2022 +0800

    Bump up dependencies to fix cves
---
 .licenserc.yaml                                    |   4 +
 .../api/controller/LoginController.java            |   2 +-
 .../dolphinscheduler/api/dto/ClusterDto.java       |   2 +-
 .../dolphinscheduler/api/dto/EnvironmentDto.java   |   2 +-
 .../api/dto/resources/ResourceComponent.java       |  22 ++--
 .../api/dto/treeview/Instance.java                 |   9 +-
 .../api/interceptor/LoginHandlerInterceptor.java   |  10 +-
 .../api/service/impl/ClusterServiceImpl.java       |  14 +--
 .../api/service/impl/EnvironmentServiceImpl.java   |  94 +++++++++-------
 .../api/service/impl/TaskGroupServiceImpl.java     |  64 ++++++-----
 .../api/vo/AlertPluginInstanceVO.java              |   2 +-
 .../apache/dolphinscheduler/api/vo/ScheduleVo.java |  45 ++++----
 .../api/service/ClusterServiceTest.java            |  64 ++++++-----
 .../api/service/EnvironmentServiceTest.java        |  67 ++++++-----
 .../api/service/K8SNamespaceServiceTest.java       |  28 +++--
 .../api/service/UsersServiceTest.java              | 123 +++++++++++----------
 dolphinscheduler-bom/pom.xml                       |  33 ++++--
 .../common/model/WorkerServerModel.java            |   2 +-
 .../org/apache/dolphinscheduler/dao/PluginDao.java |   6 +-
 .../dao/datasource/SpringConnectionFactory.java    |  47 ++++++--
 .../dolphinscheduler/dao/entity/AccessToken.java   |   5 +-
 .../dolphinscheduler/dao/entity/AlertGroup.java    |  25 +++--
 .../dao/entity/AlertPluginInstance.java            |   5 +-
 .../dao/entity/AlertSendStatus.java                |  19 ++--
 .../dolphinscheduler/dao/entity/AuditLog.java      |   2 +-
 .../dolphinscheduler/dao/entity/Cluster.java       |   4 +-
 .../dolphinscheduler/dao/entity/Command.java       |  39 ++++---
 .../dolphinscheduler/dao/entity/DataSource.java    |   5 +-
 .../dao/entity/DatasourceUser.java                 |   4 +-
 .../dao/entity/DqComparisonType.java               |   5 +-
 .../dao/entity/DqExecuteResult.java                |   9 +-
 .../apache/dolphinscheduler/dao/entity/DqRule.java |   5 +-
 .../dao/entity/DqRuleExecuteSql.java               |   7 +-
 .../dao/entity/DqRuleInputEntry.java               |   7 +-
 .../dao/entity/DqTaskStatisticsValue.java          |   7 +-
 .../dolphinscheduler/dao/entity/Environment.java   |   4 +-
 .../dao/entity/EnvironmentWorkerGroupRelation.java |   4 +-
 .../dolphinscheduler/dao/entity/ErrorCommand.java  |   5 +-
 .../apache/dolphinscheduler/dao/entity/K8s.java    |   5 +-
 .../dao/entity/K8sNamespaceUser.java               |  23 ++--
 .../dolphinscheduler/dao/entity/PluginDefine.java  |   5 +-
 .../dao/entity/ProcessDefinition.java              |  75 ++++++-------
 .../dao/entity/ProcessInstance.java                |   8 +-
 .../dao/entity/ProcessInstanceMap.java             |   4 +-
 .../dao/entity/ProcessTaskRelation.java            |  49 ++++----
 .../dolphinscheduler/dao/entity/Project.java       |   5 +-
 .../dolphinscheduler/dao/entity/ProjectUser.java   |  25 +++--
 .../apache/dolphinscheduler/dao/entity/Queue.java  |  10 +-
 .../dolphinscheduler/dao/entity/Resource.java      |  40 +++----
 .../dolphinscheduler/dao/entity/Schedule.java      |   5 +-
 .../dao/entity/TaskDefinition.java                 |  51 ++++-----
 .../dolphinscheduler/dao/entity/TaskGroup.java     |   5 +-
 .../dao/entity/TaskGroupQueue.java                 |  28 ++---
 .../dolphinscheduler/dao/entity/TaskInstance.java  |   7 +-
 .../apache/dolphinscheduler/dao/entity/Tenant.java |  12 +-
 .../dolphinscheduler/dao/entity/UdfFunc.java       |  19 ++--
 .../apache/dolphinscheduler/dao/entity/User.java   |  16 +--
 .../dolphinscheduler/dao/entity/WorkerGroup.java   |   5 +-
 .../dolphinscheduler/dao/entity/WorkerServer.java  |   3 +-
 .../dao/mapper/CommandMapperTest.java              |  44 ++++----
 .../dao/mapper/DataSourceMapperTest.java           |  58 +++++-----
 .../dao/mapper/ProcessDefinitionLogMapperTest.java |  10 +-
 .../dao/mapper/ResourceMapperTest.java             |  61 +++++-----
 .../dao/mapper/TaskDefinitionLogMapperTest.java    |   2 +-
 .../dao/mapper/TaskDefinitionMapperTest.java       |  18 +--
 .../dao/mapper/UdfFuncMapperTest.java              |  65 +++++------
 .../master/runner/WorkflowExecuteRunnable.java     |  49 ++++----
 .../dolphinscheduler-registry-zookeeper/pom.xml    |  16 ++-
 .../service/process/ProcessServiceTest.java        |  93 +++++++++-------
 .../plugin/task/api/model/ResourceInfo.java        |   3 +-
 .../plugin/task/api/parameters/SqlParameters.java  |  17 +--
 .../api/parameters/resource/UdfFuncParameters.java |   6 +-
 .../task/api/parameters/SqlParametersTest.java     |   4 +-
 .../task/dq/rule/entity/DqRuleExecuteSql.java      |   5 +-
 .../task/dq/rule/entity/DqRuleInputEntry.java      |   5 +-
 pom.xml                                            |   1 +
 76 files changed, 905 insertions(+), 753 deletions(-)

diff --git a/.licenserc.yaml b/.licenserc.yaml
index 7793c21a73..1fdc43a4e7 100644
--- a/.licenserc.yaml
+++ b/.licenserc.yaml
@@ -48,3 +48,7 @@ header:
     - '**/.gitkeep'
 
   comment: on-failure
+
+dependency:
+  files:
+    - pom.xml
diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/LoginController.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/LoginController.java
index e4a9b9e625..097493a4f5 100644
--- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/LoginController.java
+++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/LoginController.java
@@ -32,8 +32,8 @@ import org.apache.dolphinscheduler.dao.entity.User;
 
 import springfox.documentation.annotations.ApiIgnore;
 
-import org.apache.commons.httpclient.HttpStatus;
 import org.apache.commons.lang3.StringUtils;
+import org.apache.http.HttpStatus;
 
 import java.util.Map;
 
diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/dto/ClusterDto.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/dto/ClusterDto.java
index 0dd0dcd23f..f818c70ca2 100644
--- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/dto/ClusterDto.java
+++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/dto/ClusterDto.java
@@ -55,7 +55,7 @@ public class ClusterDto {
 
     private Date updateTime;
 
-    public int getId() {
+    public Integer getId() {
         return id;
     }
 
diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/dto/EnvironmentDto.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/dto/EnvironmentDto.java
index a89d34fe4a..99157a814a 100644
--- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/dto/EnvironmentDto.java
+++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/dto/EnvironmentDto.java
@@ -55,7 +55,7 @@ public class EnvironmentDto {
 
     private Date updateTime;
 
-    public int getId() {
+    public Integer getId() {
         return id;
     }
 
diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/dto/resources/ResourceComponent.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/dto/resources/ResourceComponent.java
index c66172c2ec..e2ba8c0724 100644
--- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/dto/resources/ResourceComponent.java
+++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/dto/resources/ResourceComponent.java
@@ -27,8 +27,9 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
 /**
  * resource component
  */
-@JsonPropertyOrder({"id","pid","name","fullName","description","isDirctory","children","type"})
+@JsonPropertyOrder({"id", "pid", "name", "fullName", "description", "isDirctory", "children", "type"})
 public abstract class ResourceComponent {
+
     public ResourceComponent() {
     }
 
@@ -39,11 +40,10 @@ public abstract class ResourceComponent {
         this.fullName = fullName;
         this.description = description;
         this.isDirctory = isDirctory;
-        int directoryFlag = isDirctory ? 1:0;
-        this.idValue = String.format("%s_%s",id,directoryFlag);
+        int directoryFlag = isDirctory ? 1 : 0;
+        this.idValue = String.format("%s_%s", id, directoryFlag);
     }
 
-
     /**
      * id
      */
@@ -89,19 +89,19 @@ public abstract class ResourceComponent {
      * add resource component
      * @param resourceComponent resource component
      */
-    public void add(ResourceComponent resourceComponent){
+    public void add(ResourceComponent resourceComponent) {
         children.add(resourceComponent);
     }
 
-    public String getName(){
+    public String getName() {
         return this.name;
     }
 
-    public String getDescription(){
+    public String getDescription() {
         return this.description;
     }
 
-    public int getId() {
+    public Integer getId() {
         return id;
     }
 
@@ -145,9 +145,9 @@ public abstract class ResourceComponent {
         return idValue;
     }
 
-    public void setIdValue(int id,boolean isDirctory) {
-        int directoryFlag = isDirctory ? 1:0;
-        this.idValue = String.format("%s_%s",id,directoryFlag);
+    public void setIdValue(int id, boolean isDirctory) {
+        int directoryFlag = isDirctory ? 1 : 0;
+        this.idValue = String.format("%s_%s", id, directoryFlag);
     }
 
     public ResourceType getType() {
diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/dto/treeview/Instance.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/dto/treeview/Instance.java
index d714fd291e..fb1b52c6d8 100644
--- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/dto/treeview/Instance.java
+++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/dto/treeview/Instance.java
@@ -56,7 +56,6 @@ public class Instance {
      */
     private Date endTime;
 
-
     /**
      * node running on which host
      */
@@ -79,7 +78,8 @@ public class Instance {
         this.type = type;
     }
 
-    public Instance(int id, String name, long code, String type, String state, Date startTime, Date endTime, String host, String duration, long subflowCode) {
+    public Instance(int id, String name, long code, String type, String state, Date startTime, Date endTime,
+                    String host, String duration, long subflowCode) {
         this.id = id;
         this.name = name;
         this.code = code;
@@ -92,11 +92,12 @@ public class Instance {
         this.subflowCode = subflowCode;
     }
 
-    public Instance(int id, String name, long code, String type, String state, Date startTime, Date endTime, String host, String duration) {
+    public Instance(int id, String name, long code, String type, String state, Date startTime, Date endTime,
+                    String host, String duration) {
         this(id, name, code, type, state, startTime, endTime, host, duration, 0);
     }
 
-    public int getId() {
+    public Integer getId() {
         return id;
     }
 
diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/interceptor/LoginHandlerInterceptor.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/interceptor/LoginHandlerInterceptor.java
index aa14d07519..ce0db99473 100644
--- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/interceptor/LoginHandlerInterceptor.java
+++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/interceptor/LoginHandlerInterceptor.java
@@ -25,8 +25,10 @@ import org.apache.dolphinscheduler.common.thread.ThreadLocalContext;
 import org.apache.dolphinscheduler.dao.entity.User;
 import org.apache.dolphinscheduler.dao.mapper.UserMapper;
 
-import org.apache.commons.httpclient.HttpStatus;
 import org.apache.commons.lang3.StringUtils;
+import org.apache.http.HttpStatus;
+
+import java.util.Date;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
@@ -37,12 +39,11 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.servlet.HandlerInterceptor;
 import org.springframework.web.servlet.ModelAndView;
 
-import java.util.Date;
-
 /**
  * login interceptor, must log in first
  */
 public class LoginHandlerInterceptor implements HandlerInterceptor {
+
     private static final Logger logger = LoggerFactory.getLogger(LoginHandlerInterceptor.class);
 
     @Autowired
@@ -93,7 +94,8 @@ public class LoginHandlerInterceptor implements HandlerInterceptor {
     }
 
     @Override
-    public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) throws Exception {
+    public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,
+                           ModelAndView modelAndView) throws Exception {
         ThreadLocalContext.getTimezoneThreadLocal().remove();
     }
 }
diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ClusterServiceImpl.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ClusterServiceImpl.java
index 0fb9a53b1c..3e2cd92cca 100644
--- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ClusterServiceImpl.java
+++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ClusterServiceImpl.java
@@ -248,8 +248,8 @@ public class ClusterServiceImpl extends BaseServiceImpl implements ClusterServic
             return result;
         }
 
-        Integer relatedNamespaceNumber = k8sNamespaceMapper
-            .selectCount(new QueryWrapper<K8sNamespace>().lambda().eq(K8sNamespace::getClusterCode, code));
+        Long relatedNamespaceNumber = k8sNamespaceMapper
+                .selectCount(new QueryWrapper<K8sNamespace>().lambda().eq(K8sNamespace::getClusterCode, code));
 
         if (relatedNamespaceNumber > 0) {
             putMsg(result, Status.DELETE_CLUSTER_RELATED_NAMESPACE_EXISTS);
@@ -265,7 +265,6 @@ public class ClusterServiceImpl extends BaseServiceImpl implements ClusterServic
         return result;
     }
 
-
     /**
      * update cluster
      *
@@ -283,7 +282,7 @@ public class ClusterServiceImpl extends BaseServiceImpl implements ClusterServic
             return result;
         }
 
-        if(checkDescriptionLength(desc)){
+        if (checkDescriptionLength(desc)) {
             putMsg(result, Status.DESCRIPTION_TOO_LONG_ERROR);
             return result;
         }
@@ -306,7 +305,7 @@ public class ClusterServiceImpl extends BaseServiceImpl implements ClusterServic
         }
 
         if (!Constants.K8S_LOCAL_TEST_CLUSTER_CODE.equals(clusterExist.getCode())
-            && !config.equals(ClusterConfUtils.getK8sConfig(clusterExist.getConfig()))) {
+                && !config.equals(ClusterConfUtils.getK8sConfig(clusterExist.getConfig()))) {
             try {
                 k8sManager.getAndUpdateK8sClient(code, true);
             } catch (RemotingException e) {
@@ -315,12 +314,12 @@ public class ClusterServiceImpl extends BaseServiceImpl implements ClusterServic
             }
         }
 
-        //update cluster
+        // update cluster
         clusterExist.setConfig(config);
         clusterExist.setName(name);
         clusterExist.setDescription(desc);
         clusterMapper.updateById(clusterExist);
-        //need not update relation
+        // need not update relation
 
         putMsg(result, Status.SUCCESS);
         return result;
@@ -366,4 +365,3 @@ public class ClusterServiceImpl extends BaseServiceImpl implements ClusterServic
     }
 
 }
-
diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/EnvironmentServiceImpl.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/EnvironmentServiceImpl.java
index c3f2e970bf..8e64113718 100644
--- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/EnvironmentServiceImpl.java
+++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/EnvironmentServiceImpl.java
@@ -17,6 +17,8 @@
 
 package org.apache.dolphinscheduler.api.service.impl;
 
+import static org.apache.dolphinscheduler.api.constants.ApiFuncIdentificationConstant.*;
+
 import org.apache.dolphinscheduler.api.dto.EnvironmentDto;
 import org.apache.dolphinscheduler.api.enums.Status;
 import org.apache.dolphinscheduler.api.service.EnvironmentService;
@@ -64,8 +66,6 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.fasterxml.jackson.core.type.TypeReference;
 
-import static org.apache.dolphinscheduler.api.constants.ApiFuncIdentificationConstant.*;
-
 /**
  * task definition service impl
  */
@@ -94,17 +94,18 @@ public class EnvironmentServiceImpl extends BaseServiceImpl implements Environme
      */
     @Override
     @Transactional
-    public Map<String, Object> createEnvironment(User loginUser, String name, String config, String desc, String workerGroups) {
+    public Map<String, Object> createEnvironment(User loginUser, String name, String config, String desc,
+                                                 String workerGroups) {
         Map<String, Object> result = new HashMap<>();
         if (!canOperatorPermissions(loginUser, null, AuthorizationType.ENVIRONMENT, ENVIRONMENT_CREATE)) {
             putMsg(result, Status.USER_NO_OPERATION_PERM);
             return result;
         }
-        if(checkDescriptionLength(desc)){
+        if (checkDescriptionLength(desc)) {
             putMsg(result, Status.DESCRIPTION_TOO_LONG_ERROR);
             return result;
         }
-        Map<String, Object> checkResult = checkParams(name,config,workerGroups);
+        Map<String, Object> checkResult = checkParams(name, config, workerGroups);
         if (checkResult.get(Constants.STATUS) != Status.SUCCESS) {
             return checkResult;
         }
@@ -136,7 +137,8 @@ public class EnvironmentServiceImpl extends BaseServiceImpl implements Environme
 
         if (environmentMapper.insert(env) > 0) {
             if (!StringUtils.isEmpty(workerGroups)) {
-                List<String> workerGroupList = JSONUtils.parseObject(workerGroups, new TypeReference<List<String>>(){});
+                List<String> workerGroupList = JSONUtils.parseObject(workerGroups, new TypeReference<List<String>>() {
+                });
                 if (CollectionUtils.isNotEmpty(workerGroupList)) {
                     workerGroupList.stream().forEach(workerGroup -> {
                         if (!StringUtils.isEmpty(workerGroup)) {
@@ -153,7 +155,8 @@ public class EnvironmentServiceImpl extends BaseServiceImpl implements Environme
             }
             result.put(Constants.DATA_LIST, env.getCode());
             putMsg(result, Status.SUCCESS);
-            permissionPostHandle(AuthorizationType.ENVIRONMENT, loginUser.getId(), Collections.singletonList(env.getId()), logger);
+            permissionPostHandle(AuthorizationType.ENVIRONMENT, loginUser.getId(),
+                    Collections.singletonList(env.getId()), logger);
         } else {
             putMsg(result, Status.CREATE_ENVIRONMENT_ERROR);
         }
@@ -178,7 +181,8 @@ public class EnvironmentServiceImpl extends BaseServiceImpl implements Environme
         if (loginUser.getUserType().equals(UserType.ADMIN_USER)) {
             environmentIPage = environmentMapper.queryEnvironmentListPaging(page, searchVal);
         } else {
-            Set<Integer> ids = resourcePermissionCheckService.userOwnedResourceIdsAcquisition(AuthorizationType.ENVIRONMENT, loginUser.getId(), logger);
+            Set<Integer> ids = resourcePermissionCheckService
+                    .userOwnedResourceIdsAcquisition(AuthorizationType.ENVIRONMENT, loginUser.getId(), logger);
             if (ids.isEmpty()) {
                 result.setData(pageInfo);
                 putMsg(result, Status.SUCCESS);
@@ -191,12 +195,13 @@ public class EnvironmentServiceImpl extends BaseServiceImpl implements Environme
 
         if (CollectionUtils.isNotEmpty(environmentIPage.getRecords())) {
             Map<Long, List<String>> relationMap = relationMapper.selectList(null).stream()
-                    .collect(Collectors.groupingBy(EnvironmentWorkerGroupRelation::getEnvironmentCode,Collectors.mapping(EnvironmentWorkerGroupRelation::getWorkerGroup,Collectors.toList())));
+                    .collect(Collectors.groupingBy(EnvironmentWorkerGroupRelation::getEnvironmentCode,
+                            Collectors.mapping(EnvironmentWorkerGroupRelation::getWorkerGroup, Collectors.toList())));
 
             List<EnvironmentDto> dtoList = environmentIPage.getRecords().stream().map(environment -> {
                 EnvironmentDto dto = new EnvironmentDto();
-                BeanUtils.copyProperties(environment,dto);
-                List<String> workerGroups = relationMap.getOrDefault(environment.getCode(),new ArrayList<String>());
+                BeanUtils.copyProperties(environment, dto);
+                List<String> workerGroups = relationMap.getOrDefault(environment.getCode(), new ArrayList<String>());
                 dto.setWorkerGroups(workerGroups);
                 return dto;
             }).collect(Collectors.toList());
@@ -219,31 +224,33 @@ public class EnvironmentServiceImpl extends BaseServiceImpl implements Environme
      */
     @Override
     public Map<String, Object> queryAllEnvironmentList(User loginUser) {
-        Map<String,Object> result = new HashMap<>();
-        Set<Integer> ids = resourcePermissionCheckService.userOwnedResourceIdsAcquisition(AuthorizationType.ENVIRONMENT, loginUser.getId(), logger);
+        Map<String, Object> result = new HashMap<>();
+        Set<Integer> ids = resourcePermissionCheckService.userOwnedResourceIdsAcquisition(AuthorizationType.ENVIRONMENT,
+                loginUser.getId(), logger);
         if (ids.isEmpty()) {
             result.put(Constants.DATA_LIST, Collections.emptyList());
-            putMsg(result,Status.SUCCESS);
+            putMsg(result, Status.SUCCESS);
             return result;
         }
         List<Environment> environmentList = environmentMapper.selectBatchIds(ids);
         if (CollectionUtils.isNotEmpty(environmentList)) {
             Map<Long, List<String>> relationMap = relationMapper.selectList(null).stream()
-                    .collect(Collectors.groupingBy(EnvironmentWorkerGroupRelation::getEnvironmentCode,Collectors.mapping(EnvironmentWorkerGroupRelation::getWorkerGroup,Collectors.toList())));
+                    .collect(Collectors.groupingBy(EnvironmentWorkerGroupRelation::getEnvironmentCode,
+                            Collectors.mapping(EnvironmentWorkerGroupRelation::getWorkerGroup, Collectors.toList())));
 
             List<EnvironmentDto> dtoList = environmentList.stream().map(environment -> {
                 EnvironmentDto dto = new EnvironmentDto();
-                BeanUtils.copyProperties(environment,dto);
-                List<String> workerGroups = relationMap.getOrDefault(environment.getCode(),new ArrayList<String>());
+                BeanUtils.copyProperties(environment, dto);
+                List<String> workerGroups = relationMap.getOrDefault(environment.getCode(), new ArrayList<String>());
                 dto.setWorkerGroups(workerGroups);
                 return dto;
             }).collect(Collectors.toList());
-            result.put(Constants.DATA_LIST,dtoList);
+            result.put(Constants.DATA_LIST, dtoList);
         } else {
             result.put(Constants.DATA_LIST, new ArrayList<>());
         }
 
-        putMsg(result,Status.SUCCESS);
+        putMsg(result, Status.SUCCESS);
         return result;
     }
 
@@ -266,7 +273,7 @@ public class EnvironmentServiceImpl extends BaseServiceImpl implements Environme
                     .collect(Collectors.toList());
 
             EnvironmentDto dto = new EnvironmentDto();
-            BeanUtils.copyProperties(env,dto);
+            BeanUtils.copyProperties(env, dto);
             dto.setWorkerGroups(workerGroups);
             result.put(Constants.DATA_LIST, dto);
             putMsg(result, Status.SUCCESS);
@@ -292,7 +299,7 @@ public class EnvironmentServiceImpl extends BaseServiceImpl implements Environme
                     .collect(Collectors.toList());
 
             EnvironmentDto dto = new EnvironmentDto();
-            BeanUtils.copyProperties(env,dto);
+            BeanUtils.copyProperties(env, dto);
             dto.setWorkerGroups(workerGroups);
             result.put(Constants.DATA_LIST, dto);
             putMsg(result, Status.SUCCESS);
@@ -310,13 +317,13 @@ public class EnvironmentServiceImpl extends BaseServiceImpl implements Environme
     @Override
     public Map<String, Object> deleteEnvironmentByCode(User loginUser, Long code) {
         Map<String, Object> result = new HashMap<>();
-        if (!canOperatorPermissions(loginUser,null, AuthorizationType.ENVIRONMENT,ENVIRONMENT_DELETE)) {
+        if (!canOperatorPermissions(loginUser, null, AuthorizationType.ENVIRONMENT, ENVIRONMENT_DELETE)) {
             putMsg(result, Status.USER_NO_OPERATION_PERM);
             return result;
         }
 
-        Integer relatedTaskNumber = taskDefinitionMapper
-                .selectCount(new QueryWrapper<TaskDefinition>().lambda().eq(TaskDefinition::getEnvironmentCode,code));
+        Long relatedTaskNumber = taskDefinitionMapper
+                .selectCount(new QueryWrapper<TaskDefinition>().lambda().eq(TaskDefinition::getEnvironmentCode, code));
 
         if (relatedTaskNumber > 0) {
             putMsg(result, Status.DELETE_ENVIRONMENT_RELATED_TASK_EXISTS);
@@ -327,7 +334,7 @@ public class EnvironmentServiceImpl extends BaseServiceImpl implements Environme
         if (delete > 0) {
             relationMapper.delete(new QueryWrapper<EnvironmentWorkerGroupRelation>()
                     .lambda()
-                    .eq(EnvironmentWorkerGroupRelation::getEnvironmentCode,code));
+                    .eq(EnvironmentWorkerGroupRelation::getEnvironmentCode, code));
             putMsg(result, Status.SUCCESS);
         } else {
             putMsg(result, Status.DELETE_ENVIRONMENT_ERROR);
@@ -347,18 +354,19 @@ public class EnvironmentServiceImpl extends BaseServiceImpl implements Environme
      */
     @Transactional
     @Override
-    public Map<String, Object> updateEnvironmentByCode(User loginUser, Long code, String name, String config, String desc, String workerGroups) {
+    public Map<String, Object> updateEnvironmentByCode(User loginUser, Long code, String name, String config,
+                                                       String desc, String workerGroups) {
         Map<String, Object> result = new HashMap<>();
-        if (!canOperatorPermissions(loginUser,null, AuthorizationType.ENVIRONMENT,ENVIRONMENT_UPDATE)) {
+        if (!canOperatorPermissions(loginUser, null, AuthorizationType.ENVIRONMENT, ENVIRONMENT_UPDATE)) {
             putMsg(result, Status.USER_NO_OPERATION_PERM);
             return result;
         }
 
-        Map<String, Object> checkResult = checkParams(name,config,workerGroups);
+        Map<String, Object> checkResult = checkParams(name, config, workerGroups);
         if (checkResult.get(Constants.STATUS) != Status.SUCCESS) {
             return checkResult;
         }
-        if(checkDescriptionLength(desc)){
+        if (checkDescriptionLength(desc)) {
             putMsg(result, Status.DESCRIPTION_TOO_LONG_ERROR);
             return result;
         }
@@ -371,7 +379,8 @@ public class EnvironmentServiceImpl extends BaseServiceImpl implements Environme
 
         Set<String> workerGroupSet;
         if (!StringUtils.isEmpty(workerGroups)) {
-            workerGroupSet = JSONUtils.parseObject(workerGroups, new TypeReference<Set<String>>() {});
+            workerGroupSet = JSONUtils.parseObject(workerGroups, new TypeReference<Set<String>>() {
+            });
         } else {
             workerGroupSet = new TreeSet<>();
         }
@@ -382,8 +391,8 @@ public class EnvironmentServiceImpl extends BaseServiceImpl implements Environme
                 .map(item -> item.getWorkerGroup())
                 .collect(Collectors.toSet());
 
-        Set<String> deleteWorkerGroupSet = SetUtils.difference(existWorkerGroupSet,workerGroupSet).toSet();
-        Set<String> addWorkerGroupSet = SetUtils.difference(workerGroupSet,existWorkerGroupSet).toSet();
+        Set<String> deleteWorkerGroupSet = SetUtils.difference(existWorkerGroupSet, workerGroupSet).toSet();
+        Set<String> addWorkerGroupSet = SetUtils.difference(workerGroupSet, existWorkerGroupSet).toSet();
 
         // verify whether the relation of this environment and worker groups can be adjusted
         checkResult = checkUsedEnvironmentWorkerGroupRelation(deleteWorkerGroupSet, name, code);
@@ -399,7 +408,8 @@ public class EnvironmentServiceImpl extends BaseServiceImpl implements Environme
         env.setOperator(loginUser.getId());
         env.setUpdateTime(new Date());
 
-        int update = environmentMapper.update(env, new UpdateWrapper<Environment>().lambda().eq(Environment::getCode, code));
+        int update =
+                environmentMapper.update(env, new UpdateWrapper<Environment>().lambda().eq(Environment::getCode, code));
         if (update > 0) {
             deleteWorkerGroupSet.stream().forEach(key -> {
                 if (StringUtils.isNotEmpty(key)) {
@@ -427,8 +437,6 @@ public class EnvironmentServiceImpl extends BaseServiceImpl implements Environme
         return result;
     }
 
-
-
     /**
      * verify environment name
      *
@@ -454,17 +462,20 @@ public class EnvironmentServiceImpl extends BaseServiceImpl implements Environme
         return result;
     }
 
-    private Map<String, Object> checkUsedEnvironmentWorkerGroupRelation(Set<String> deleteKeySet,String environmentName, Long environmentCode) {
+    private Map<String, Object> checkUsedEnvironmentWorkerGroupRelation(Set<String> deleteKeySet,
+                                                                        String environmentName, Long environmentCode) {
         Map<String, Object> result = new HashMap<>();
         for (String workerGroup : deleteKeySet) {
             List<TaskDefinition> taskDefinitionList = taskDefinitionMapper
                     .selectList(new QueryWrapper<TaskDefinition>().lambda()
-                            .eq(TaskDefinition::getEnvironmentCode,environmentCode)
-                            .eq(TaskDefinition::getWorkerGroup,workerGroup));
+                            .eq(TaskDefinition::getEnvironmentCode, environmentCode)
+                            .eq(TaskDefinition::getWorkerGroup, workerGroup));
 
             if (Objects.nonNull(taskDefinitionList) && taskDefinitionList.size() != 0) {
-                Set<String> collect = taskDefinitionList.stream().map(TaskDefinition::getName).collect(Collectors.toSet());
-                putMsg(result, Status.UPDATE_ENVIRONMENT_WORKER_GROUP_RELATION_ERROR,workerGroup,environmentName, collect);
+                Set<String> collect =
+                        taskDefinitionList.stream().map(TaskDefinition::getName).collect(Collectors.toSet());
+                putMsg(result, Status.UPDATE_ENVIRONMENT_WORKER_GROUP_RELATION_ERROR, workerGroup, environmentName,
+                        collect);
                 return result;
             }
         }
@@ -483,7 +494,8 @@ public class EnvironmentServiceImpl extends BaseServiceImpl implements Environme
             return result;
         }
         if (!StringUtils.isEmpty(workerGroups)) {
-            List<String> workerGroupList = JSONUtils.parseObject(workerGroups, new TypeReference<List<String>>(){});
+            List<String> workerGroupList = JSONUtils.parseObject(workerGroups, new TypeReference<List<String>>() {
+            });
             if (Objects.isNull(workerGroupList)) {
                 putMsg(result, Status.ENVIRONMENT_WORKER_GROUPS_IS_INVALID);
                 return result;
diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TaskGroupServiceImpl.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TaskGroupServiceImpl.java
index 90118baa84..7040706290 100644
--- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TaskGroupServiceImpl.java
+++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TaskGroupServiceImpl.java
@@ -26,7 +26,6 @@ import org.apache.dolphinscheduler.api.utils.PageInfo;
 import org.apache.dolphinscheduler.common.Constants;
 import org.apache.dolphinscheduler.common.enums.AuthorizationType;
 import org.apache.dolphinscheduler.common.enums.Flag;
-import org.apache.dolphinscheduler.common.enums.UserType;
 import org.apache.dolphinscheduler.dao.entity.TaskGroup;
 import org.apache.dolphinscheduler.dao.entity.User;
 import org.apache.dolphinscheduler.dao.mapper.TaskGroupMapper;
@@ -82,14 +81,16 @@ public class TaskGroupServiceImpl extends BaseServiceImpl implements TaskGroupSe
      */
     @Override
     @Transactional
-    public Map<String, Object> createTaskGroup(User loginUser, Long projectCode, String name, String description, int groupSize) {
+    public Map<String, Object> createTaskGroup(User loginUser, Long projectCode, String name, String description,
+                                               int groupSize) {
         Map<String, Object> result = new HashMap<>();
-        boolean canOperatorPermissions = canOperatorPermissions(loginUser, null, AuthorizationType.TASK_GROUP, ApiFuncIdentificationConstant.TASK_GROUP_CREATE);
-        if (!canOperatorPermissions){
+        boolean canOperatorPermissions = canOperatorPermissions(loginUser, null, AuthorizationType.TASK_GROUP,
+                ApiFuncIdentificationConstant.TASK_GROUP_CREATE);
+        if (!canOperatorPermissions) {
             putMsg(result, Status.NO_CURRENT_OPERATING_PERMISSION);
             return result;
         }
-        if(checkDescriptionLength(description)){
+        if (checkDescriptionLength(description)) {
             putMsg(result, Status.DESCRIPTION_TOO_LONG_ERROR);
             return result;
         }
@@ -112,7 +113,8 @@ public class TaskGroupServiceImpl extends BaseServiceImpl implements TaskGroupSe
         taskGroup.setCreateTime(new Date());
         taskGroup.setUpdateTime(new Date());
         if (taskGroupMapper.insert(taskGroup) > 0) {
-            permissionPostHandle(AuthorizationType.TASK_GROUP, loginUser.getId(), Collections.singletonList(taskGroup.getId()),logger);
+            permissionPostHandle(AuthorizationType.TASK_GROUP, loginUser.getId(),
+                    Collections.singletonList(taskGroup.getId()), logger);
             putMsg(result, Status.SUCCESS);
         } else {
             putMsg(result, Status.CREATE_TASK_GROUP_ERROR);
@@ -134,12 +136,13 @@ public class TaskGroupServiceImpl extends BaseServiceImpl implements TaskGroupSe
     @Override
     public Map<String, Object> updateTaskGroup(User loginUser, int id, String name, String description, int groupSize) {
         Map<String, Object> result = new HashMap<>();
-        boolean canOperatorPermissions = canOperatorPermissions(loginUser, null, AuthorizationType.TASK_GROUP, ApiFuncIdentificationConstant.TASK_GROUP_EDIT);
-        if (!canOperatorPermissions){
+        boolean canOperatorPermissions = canOperatorPermissions(loginUser, null, AuthorizationType.TASK_GROUP,
+                ApiFuncIdentificationConstant.TASK_GROUP_EDIT);
+        if (!canOperatorPermissions) {
             putMsg(result, Status.NO_CURRENT_OPERATING_PERMISSION);
             return result;
         }
-        if(checkDescriptionLength(description)){
+        if (checkDescriptionLength(description)) {
             putMsg(result, Status.DESCRIPTION_TOO_LONG_ERROR);
             return result;
         }
@@ -151,7 +154,7 @@ public class TaskGroupServiceImpl extends BaseServiceImpl implements TaskGroupSe
             putMsg(result, Status.TASK_GROUP_SIZE_ERROR);
             return result;
         }
-        Integer exists = taskGroupMapper.selectCount(new QueryWrapper<TaskGroup>().lambda()
+        Long exists = taskGroupMapper.selectCount(new QueryWrapper<TaskGroup>().lambda()
                 .eq(TaskGroup::getName, name)
                 .eq(TaskGroup::getUserId, loginUser.getId())
                 .ne(TaskGroup::getId, id));
@@ -197,7 +200,8 @@ public class TaskGroupServiceImpl extends BaseServiceImpl implements TaskGroupSe
      * @return the result code and msg
      */
     @Override
-    public Map<String, Object> queryAllTaskGroup(User loginUser, String name, Integer status, int pageNo, int pageSize) {
+    public Map<String, Object> queryAllTaskGroup(User loginUser, String name, Integer status, int pageNo,
+                                                 int pageSize) {
         return this.doQuery(loginUser, pageNo, pageSize, loginUser.getId(), name, status);
     }
 
@@ -229,18 +233,21 @@ public class TaskGroupServiceImpl extends BaseServiceImpl implements TaskGroupSe
         Map<String, Object> result = new HashMap<>();
         Page<TaskGroup> page = new Page<>(pageNo, pageSize);
         PageInfo<TaskGroup> emptyPageInfo = new PageInfo<>(pageNo, pageSize);
-        Set<Integer> ids = resourcePermissionCheckService.userOwnedResourceIdsAcquisition(AuthorizationType.TASK_GROUP, loginUser.getId(), logger);
+        Set<Integer> ids = resourcePermissionCheckService.userOwnedResourceIdsAcquisition(AuthorizationType.TASK_GROUP,
+                loginUser.getId(), logger);
         if (ids.isEmpty()) {
             result.put(Constants.DATA_LIST, emptyPageInfo);
             putMsg(result, Status.SUCCESS);
             return result;
         }
-        IPage<TaskGroup> taskGroupPaging = taskGroupMapper.queryTaskGroupPagingByProjectCode(page, new ArrayList<>(ids), projectCode);
+        IPage<TaskGroup> taskGroupPaging =
+                taskGroupMapper.queryTaskGroupPagingByProjectCode(page, new ArrayList<>(ids), projectCode);
 
         return getStringObjectMap(pageNo, pageSize, result, taskGroupPaging);
     }
 
-    private Map<String, Object> getStringObjectMap(int pageNo, int pageSize, Map<String, Object> result, IPage<TaskGroup> taskGroupPaging) {
+    private Map<String, Object> getStringObjectMap(int pageNo, int pageSize, Map<String, Object> result,
+                                                   IPage<TaskGroup> taskGroupPaging) {
         PageInfo<TaskGroup> pageInfo = new PageInfo<>(pageNo, pageSize);
         int total = taskGroupPaging == null ? 0 : (int) taskGroupPaging.getTotal();
         List<TaskGroup> list = taskGroupPaging == null ? new ArrayList<TaskGroup>() : taskGroupPaging.getRecords();
@@ -279,17 +286,20 @@ public class TaskGroupServiceImpl extends BaseServiceImpl implements TaskGroupSe
      * @return the result code and msg
      */
     @Override
-    public Map<String, Object> doQuery(User loginUser, int pageNo, int pageSize, int userId, String name, Integer status) {
+    public Map<String, Object> doQuery(User loginUser, int pageNo, int pageSize, int userId, String name,
+                                       Integer status) {
         Map<String, Object> result = new HashMap<>();
         Page<TaskGroup> page = new Page<>(pageNo, pageSize);
         PageInfo<TaskGroup> pageInfo = new PageInfo<>(pageNo, pageSize);
-        Set<Integer> ids = resourcePermissionCheckService.userOwnedResourceIdsAcquisition(AuthorizationType.TASK_GROUP, userId, logger);
+        Set<Integer> ids = resourcePermissionCheckService.userOwnedResourceIdsAcquisition(AuthorizationType.TASK_GROUP,
+                userId, logger);
         if (ids.isEmpty()) {
             result.put(Constants.DATA_LIST, pageInfo);
             putMsg(result, Status.SUCCESS);
             return result;
         }
-        IPage<TaskGroup> taskGroupPaging = taskGroupMapper.queryTaskGroupPaging(page, new ArrayList<>(ids), name, status);
+        IPage<TaskGroup> taskGroupPaging =
+                taskGroupMapper.queryTaskGroupPaging(page, new ArrayList<>(ids), name, status);
 
         return getStringObjectMap(pageNo, pageSize, result, taskGroupPaging);
     }
@@ -305,8 +315,9 @@ public class TaskGroupServiceImpl extends BaseServiceImpl implements TaskGroupSe
     public Map<String, Object> closeTaskGroup(User loginUser, int id) {
         Map<String, Object> result = new HashMap<>();
 
-        boolean canOperatorPermissions = canOperatorPermissions(loginUser, null, AuthorizationType.TASK_GROUP, ApiFuncIdentificationConstant.TASK_GROUP_CLOSE);
-        if (!canOperatorPermissions){
+        boolean canOperatorPermissions = canOperatorPermissions(loginUser, null, AuthorizationType.TASK_GROUP,
+                ApiFuncIdentificationConstant.TASK_GROUP_CLOSE);
+        if (!canOperatorPermissions) {
             putMsg(result, Status.NO_CURRENT_OPERATING_PERMISSION);
             return result;
         }
@@ -332,8 +343,9 @@ public class TaskGroupServiceImpl extends BaseServiceImpl implements TaskGroupSe
     public Map<String, Object> startTaskGroup(User loginUser, int id) {
         Map<String, Object> result = new HashMap<>();
 
-        boolean canOperatorPermissions = canOperatorPermissions(loginUser, null, AuthorizationType.TASK_GROUP, ApiFuncIdentificationConstant.TASK_GROUP_CLOSE);
-        if (!canOperatorPermissions){
+        boolean canOperatorPermissions = canOperatorPermissions(loginUser, null, AuthorizationType.TASK_GROUP,
+                ApiFuncIdentificationConstant.TASK_GROUP_CLOSE);
+        if (!canOperatorPermissions) {
             putMsg(result, Status.NO_CURRENT_OPERATING_PERMISSION);
             return result;
         }
@@ -359,8 +371,9 @@ public class TaskGroupServiceImpl extends BaseServiceImpl implements TaskGroupSe
     @Override
     public Map<String, Object> forceStartTask(User loginUser, int queueId) {
         Map<String, Object> result = new HashMap<>();
-        boolean canOperatorPermissions = canOperatorPermissions(loginUser, null, AuthorizationType.TASK_GROUP, ApiFuncIdentificationConstant.TASK_GROUP_QUEUE_START);
-        if (!canOperatorPermissions){
+        boolean canOperatorPermissions = canOperatorPermissions(loginUser, null, AuthorizationType.TASK_GROUP,
+                ApiFuncIdentificationConstant.TASK_GROUP_QUEUE_START);
+        if (!canOperatorPermissions) {
             putMsg(result, Status.NO_CURRENT_OPERATING_PERMISSION);
             return result;
         }
@@ -371,8 +384,9 @@ public class TaskGroupServiceImpl extends BaseServiceImpl implements TaskGroupSe
     public Map<String, Object> modifyPriority(User loginUser, Integer queueId, Integer priority) {
         Map<String, Object> result = new HashMap<>();
 
-        boolean canOperatorPermissions = canOperatorPermissions(loginUser, null, AuthorizationType.TASK_GROUP, ApiFuncIdentificationConstant.TASK_GROUP_QUEUE_PRIORITY);
-        if (!canOperatorPermissions){
+        boolean canOperatorPermissions = canOperatorPermissions(loginUser, null, AuthorizationType.TASK_GROUP,
+                ApiFuncIdentificationConstant.TASK_GROUP_QUEUE_PRIORITY);
+        if (!canOperatorPermissions) {
             putMsg(result, Status.NO_CURRENT_OPERATING_PERMISSION);
             return result;
         }
diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/vo/AlertPluginInstanceVO.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/vo/AlertPluginInstanceVO.java
index d8b76f633d..d7c47185a4 100644
--- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/vo/AlertPluginInstanceVO.java
+++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/vo/AlertPluginInstanceVO.java
@@ -59,7 +59,7 @@ public class AlertPluginInstanceVO {
      */
     private String alertPluginName;
 
-    public int getId() {
+    public Integer getId() {
         return id;
     }
 
diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/vo/ScheduleVo.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/vo/ScheduleVo.java
index 708eaa1082..873ad12ffd 100644
--- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/vo/ScheduleVo.java
+++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/vo/ScheduleVo.java
@@ -112,7 +112,6 @@ public class ScheduleVo {
      */
     private int warningGroupId;
 
-
     /**
      * process instance priority
      */
@@ -270,7 +269,7 @@ public class ScheduleVo {
         this.userName = userName;
     }
 
-    public int getId() {
+    public Integer getId() {
         return id;
     }
 
@@ -305,27 +304,27 @@ public class ScheduleVo {
     @Override
     public String toString() {
         return "Schedule{"
-            + "id=" + id
-            + ", processDefinitionCode=" + processDefinitionCode
-            + ", processDefinitionName='" + processDefinitionName + '\''
-            + ", projectName='" + projectName + '\''
-            + ", description='" + definitionDescription + '\''
-            + ", startTime=" + startTime
-            + ", endTime=" + endTime
-            + ", timezoneId='" + timezoneId + +'\''
-            + ", crontab='" + crontab + '\''
-            + ", failureStrategy=" + failureStrategy
-            + ", warningType=" + warningType
-            + ", createTime=" + createTime
-            + ", updateTime=" + updateTime
-            + ", userId=" + userId
-            + ", userName='" + userName + '\''
-            + ", releaseState=" + releaseState
-            + ", warningGroupId=" + warningGroupId
-            + ", processInstancePriority=" + processInstancePriority
-            + ", workerGroup='" + workerGroup + '\''
-            + ", environmentCode='" + environmentCode + '\''
-            + '}';
+                + "id=" + id
+                + ", processDefinitionCode=" + processDefinitionCode
+                + ", processDefinitionName='" + processDefinitionName + '\''
+                + ", projectName='" + projectName + '\''
+                + ", description='" + definitionDescription + '\''
+                + ", startTime=" + startTime
+                + ", endTime=" + endTime
+                + ", timezoneId='" + timezoneId + +'\''
+                + ", crontab='" + crontab + '\''
+                + ", failureStrategy=" + failureStrategy
+                + ", warningType=" + warningType
+                + ", createTime=" + createTime
+                + ", updateTime=" + updateTime
+                + ", userId=" + userId
+                + ", userName='" + userName + '\''
+                + ", releaseState=" + releaseState
+                + ", warningGroupId=" + warningGroupId
+                + ", processInstancePriority=" + processInstancePriority
+                + ", workerGroup='" + workerGroup + '\''
+                + ", environmentCode='" + environmentCode + '\''
+                + '}';
     }
 
     public String getDefinitionDescription() {
diff --git a/dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ClusterServiceTest.java b/dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ClusterServiceTest.java
index ac2e261ce9..3659fbc937 100644
--- a/dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ClusterServiceTest.java
+++ b/dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ClusterServiceTest.java
@@ -48,10 +48,7 @@ import org.mockito.Mockito;
 import org.mockito.junit.MockitoJUnitRunner;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.springframework.boot.configurationprocessor.json.JSONException;
-import org.springframework.boot.configurationprocessor.json.JSONObject;
 
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 
@@ -75,85 +72,85 @@ public class ClusterServiceTest {
     @Mock
     private K8sManager k8sManager;
 
-
     public static final String testUserName = "clusterServerTest";
 
     public static final String clusterName = "Env1";
 
     @Before
-    public void setUp(){
+    public void setUp() {
     }
 
     @After
-    public void after(){
+    public void after() {
     }
 
     @Test
     public void testCreateCluster() {
         User loginUser = getGeneralUser();
-        Map<String, Object> result = clusterService.createCluster(loginUser,clusterName,getConfig(),getDesc());
+        Map<String, Object> result = clusterService.createCluster(loginUser, clusterName, getConfig(), getDesc());
         logger.info(result.toString());
         Assert.assertEquals(Status.USER_NO_OPERATION_PERM, result.get(Constants.STATUS));
 
         loginUser = getAdminUser();
-        result = clusterService.createCluster(loginUser,clusterName,"",getDesc());
+        result = clusterService.createCluster(loginUser, clusterName, "", getDesc());
         logger.info(result.toString());
         Assert.assertEquals(Status.CLUSTER_CONFIG_IS_NULL, result.get(Constants.STATUS));
 
-        result = clusterService.createCluster(loginUser,"",getConfig(),getDesc());
+        result = clusterService.createCluster(loginUser, "", getConfig(), getDesc());
         logger.info(result.toString());
         Assert.assertEquals(Status.CLUSTER_NAME_IS_NULL, result.get(Constants.STATUS));
 
         Mockito.when(clusterMapper.queryByClusterName(clusterName)).thenReturn(getCluster());
-        result = clusterService.createCluster(loginUser,clusterName,getConfig(),getDesc());
+        result = clusterService.createCluster(loginUser, clusterName, getConfig(), getDesc());
         logger.info(result.toString());
         Assert.assertEquals(Status.CLUSTER_NAME_EXISTS, result.get(Constants.STATUS));
 
         Mockito.when(clusterMapper.insert(Mockito.any(Cluster.class))).thenReturn(1);
-        result = clusterService.createCluster(loginUser,"testName","testConfig","testDesc");
+        result = clusterService.createCluster(loginUser, "testName", "testConfig", "testDesc");
         logger.info(result.toString());
         Assert.assertEquals(Status.SUCCESS, result.get(Constants.STATUS));
     }
 
     @Test
     public void testCheckParams() {
-        Map<String, Object> result = clusterService.checkParams(clusterName,getConfig());
+        Map<String, Object> result = clusterService.checkParams(clusterName, getConfig());
         Assert.assertEquals(Status.SUCCESS, result.get(Constants.STATUS));
-        result = clusterService.checkParams("",getConfig());
+        result = clusterService.checkParams("", getConfig());
         Assert.assertEquals(Status.CLUSTER_NAME_IS_NULL, result.get(Constants.STATUS));
-        result = clusterService.checkParams(clusterName,"");
+        result = clusterService.checkParams(clusterName, "");
         Assert.assertEquals(Status.CLUSTER_CONFIG_IS_NULL, result.get(Constants.STATUS));
     }
 
     @Test
     public void testUpdateClusterByCode() throws RemotingException {
         User loginUser = getGeneralUser();
-        Map<String, Object> result = clusterService.updateClusterByCode(loginUser,1L,clusterName,getConfig(),getDesc());
+        Map<String, Object> result =
+                clusterService.updateClusterByCode(loginUser, 1L, clusterName, getConfig(), getDesc());
         logger.info(result.toString());
         Assert.assertEquals(Status.USER_NO_OPERATION_PERM, result.get(Constants.STATUS));
 
         loginUser = getAdminUser();
-        result = clusterService.updateClusterByCode(loginUser,1L,clusterName,"",getDesc());
+        result = clusterService.updateClusterByCode(loginUser, 1L, clusterName, "", getDesc());
         logger.info(result.toString());
         Assert.assertEquals(Status.CLUSTER_CONFIG_IS_NULL, result.get(Constants.STATUS));
 
-        result = clusterService.updateClusterByCode(loginUser,1L,"",getConfig(),getDesc());
+        result = clusterService.updateClusterByCode(loginUser, 1L, "", getConfig(), getDesc());
         logger.info(result.toString());
         Assert.assertEquals(Status.CLUSTER_NAME_IS_NULL, result.get(Constants.STATUS));
 
-        result = clusterService.updateClusterByCode(loginUser,2L,clusterName,getConfig(),getDesc());
+        result = clusterService.updateClusterByCode(loginUser, 2L, clusterName, getConfig(), getDesc());
         logger.info(result.toString());
         Assert.assertEquals(Status.CLUSTER_NOT_EXISTS, result.get(Constants.STATUS));
 
         Mockito.when(clusterMapper.queryByClusterName(clusterName)).thenReturn(getCluster());
-        result = clusterService.updateClusterByCode(loginUser,2L,clusterName,getConfig(),getDesc());
+        result = clusterService.updateClusterByCode(loginUser, 2L, clusterName, getConfig(), getDesc());
         logger.info(result.toString());
         Assert.assertEquals(Status.CLUSTER_NAME_EXISTS, result.get(Constants.STATUS));
 
         Mockito.when(clusterMapper.updateById(Mockito.any(Cluster.class))).thenReturn(1);
         Mockito.when(clusterMapper.queryByClusterCode(1L)).thenReturn(getCluster());
 
-        result = clusterService.updateClusterByCode(loginUser,1L,"testName",getConfig(),"test");
+        result = clusterService.updateClusterByCode(loginUser, 1L, "testName", getConfig(), "test");
         logger.info(result.toString());
         Assert.assertEquals(Status.SUCCESS, result.get(Constants.STATUS));
 
@@ -162,12 +159,12 @@ public class ClusterServiceTest {
     @Test
     public void testQueryAllClusterList() {
         Mockito.when(clusterMapper.queryAllClusterList()).thenReturn(Lists.newArrayList(getCluster()));
-        Map<String, Object> result  = clusterService.queryAllClusterList();
+        Map<String, Object> result = clusterService.queryAllClusterList();
         logger.info(result.toString());
-        Assert.assertEquals(Status.SUCCESS,result.get(Constants.STATUS));
+        Assert.assertEquals(Status.SUCCESS, result.get(Constants.STATUS));
 
-        List<Cluster> list = (List<Cluster>)(result.get(Constants.DATA_LIST));
-        Assert.assertEquals(1,list.size());
+        List<Cluster> list = (List<Cluster>) (result.get(Constants.DATA_LIST));
+        Assert.assertEquals(1, list.size());
     }
 
     @Test
@@ -175,7 +172,8 @@ public class ClusterServiceTest {
         IPage<Cluster> page = new Page<>(1, 10);
         page.setRecords(getList());
         page.setTotal(1L);
-        Mockito.when(clusterMapper.queryClusterListPaging(Mockito.any(Page.class), Mockito.eq(clusterName))).thenReturn(page);
+        Mockito.when(clusterMapper.queryClusterListPaging(Mockito.any(Page.class), Mockito.eq(clusterName)))
+                .thenReturn(page);
 
         Result result = clusterService.queryClusterListPaging(1, 10, clusterName);
         logger.info(result.toString());
@@ -188,12 +186,12 @@ public class ClusterServiceTest {
         Mockito.when(clusterMapper.queryByClusterName(clusterName)).thenReturn(null);
         Map<String, Object> result = clusterService.queryClusterByName(clusterName);
         logger.info(result.toString());
-        Assert.assertEquals(Status.QUERY_CLUSTER_BY_NAME_ERROR,result.get(Constants.STATUS));
+        Assert.assertEquals(Status.QUERY_CLUSTER_BY_NAME_ERROR, result.get(Constants.STATUS));
 
         Mockito.when(clusterMapper.queryByClusterName(clusterName)).thenReturn(getCluster());
         result = clusterService.queryClusterByName(clusterName);
         logger.info(result.toString());
-        Assert.assertEquals(Status.SUCCESS,result.get(Constants.STATUS));
+        Assert.assertEquals(Status.SUCCESS, result.get(Constants.STATUS));
     }
 
     @Test
@@ -201,29 +199,29 @@ public class ClusterServiceTest {
         Mockito.when(clusterMapper.queryByClusterCode(1L)).thenReturn(null);
         Map<String, Object> result = clusterService.queryClusterByCode(1L);
         logger.info(result.toString());
-        Assert.assertEquals(Status.QUERY_CLUSTER_BY_CODE_ERROR,result.get(Constants.STATUS));
+        Assert.assertEquals(Status.QUERY_CLUSTER_BY_CODE_ERROR, result.get(Constants.STATUS));
 
         Mockito.when(clusterMapper.queryByClusterCode(1L)).thenReturn(getCluster());
         result = clusterService.queryClusterByCode(1L);
         logger.info(result.toString());
-        Assert.assertEquals(Status.SUCCESS,result.get(Constants.STATUS));
+        Assert.assertEquals(Status.SUCCESS, result.get(Constants.STATUS));
     }
 
     @Test
     public void testDeleteClusterByCode() {
         User loginUser = getGeneralUser();
-        Map<String, Object> result = clusterService.deleteClusterByCode(loginUser,1L);
+        Map<String, Object> result = clusterService.deleteClusterByCode(loginUser, 1L);
         logger.info(result.toString());
         Assert.assertEquals(Status.USER_NO_OPERATION_PERM, result.get(Constants.STATUS));
 
         loginUser = getAdminUser();
         Mockito.when(clusterMapper.deleteByCode(1L)).thenReturn(1);
-        result = clusterService.deleteClusterByCode(loginUser,1L);
+        result = clusterService.deleteClusterByCode(loginUser, 1L);
         logger.info(result.toString());
         Assert.assertEquals(Status.SUCCESS, result.get(Constants.STATUS));
 
-        Mockito.when(k8sNamespaceMapper.selectCount(Mockito.any())).thenReturn(1);
-        result = clusterService.deleteClusterByCode(loginUser,1L);
+        Mockito.when(k8sNamespaceMapper.selectCount(Mockito.any())).thenReturn(1L);
+        result = clusterService.deleteClusterByCode(loginUser, 1L);
         logger.info(result.toString());
         Assert.assertEquals(Status.DELETE_CLUSTER_RELATED_NAMESPACE_EXISTS, result.get(Constants.STATUS));
     }
diff --git a/dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/EnvironmentServiceTest.java b/dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/EnvironmentServiceTest.java
index 3befde4c36..ebb47e788d 100644
--- a/dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/EnvironmentServiceTest.java
+++ b/dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/EnvironmentServiceTest.java
@@ -96,34 +96,35 @@ public class EnvironmentServiceTest {
     public void testCreateEnvironment() {
         User loginUser = getGeneralUser();
         Mockito.when(resourcePermissionCheckService.operationPermissionCheck(AuthorizationType.ENVIRONMENT, null,
-                loginUser.getId(),ENVIRONMENT_CREATE, baseServiceLogger)).thenReturn(true);
+                loginUser.getId(), ENVIRONMENT_CREATE, baseServiceLogger)).thenReturn(true);
         Mockito.when(resourcePermissionCheckService.resourcePermissionCheck(AuthorizationType.ENVIRONMENT, null,
                 0, baseServiceLogger)).thenReturn(true);
-        Map<String, Object> result = environmentService.createEnvironment(loginUser,environmentName,getConfig(),getDesc(),workerGroups);
+        Map<String, Object> result =
+                environmentService.createEnvironment(loginUser, environmentName, getConfig(), getDesc(), workerGroups);
         logger.info(result.toString());
         Assert.assertEquals(Status.USER_NO_OPERATION_PERM, result.get(Constants.STATUS));
 
         loginUser = getAdminUser();
-        result = environmentService.createEnvironment(loginUser,environmentName,"",getDesc(),workerGroups);
+        result = environmentService.createEnvironment(loginUser, environmentName, "", getDesc(), workerGroups);
         logger.info(result.toString());
         Assert.assertEquals(Status.ENVIRONMENT_CONFIG_IS_NULL, result.get(Constants.STATUS));
 
-        result = environmentService.createEnvironment(loginUser,"",getConfig(),getDesc(),workerGroups);
+        result = environmentService.createEnvironment(loginUser, "", getConfig(), getDesc(), workerGroups);
         logger.info(result.toString());
         Assert.assertEquals(Status.ENVIRONMENT_NAME_IS_NULL, result.get(Constants.STATUS));
 
-        result = environmentService.createEnvironment(loginUser,environmentName,getConfig(),getDesc(),"test");
+        result = environmentService.createEnvironment(loginUser, environmentName, getConfig(), getDesc(), "test");
         logger.info(result.toString());
         Assert.assertEquals(Status.ENVIRONMENT_WORKER_GROUPS_IS_INVALID, result.get(Constants.STATUS));
 
         Mockito.when(environmentMapper.queryByEnvironmentName(environmentName)).thenReturn(getEnvironment());
-        result = environmentService.createEnvironment(loginUser,environmentName,getConfig(),getDesc(),workerGroups);
+        result = environmentService.createEnvironment(loginUser, environmentName, getConfig(), getDesc(), workerGroups);
         logger.info(result.toString());
         Assert.assertEquals(Status.ENVIRONMENT_NAME_EXISTS, result.get(Constants.STATUS));
 
         Mockito.when(environmentMapper.insert(Mockito.any(Environment.class))).thenReturn(1);
         Mockito.when(relationMapper.insert(Mockito.any(EnvironmentWorkerGroupRelation.class))).thenReturn(1);
-        result = environmentService.createEnvironment(loginUser,"testName","test","test",workerGroups);
+        result = environmentService.createEnvironment(loginUser, "testName", "test", "test", workerGroups);
         logger.info(result.toString());
         Assert.assertEquals(Status.SUCCESS, result.get(Constants.STATUS));
 
@@ -131,7 +132,7 @@ public class EnvironmentServiceTest {
 
     @Test
     public void testCheckParams() {
-        Map<String, Object> result = environmentService.checkParams(environmentName,getConfig(),"test");
+        Map<String, Object> result = environmentService.checkParams(environmentName, getConfig(), "test");
         Assert.assertEquals(Status.ENVIRONMENT_WORKER_GROUPS_IS_INVALID, result.get(Constants.STATUS));
     }
 
@@ -139,33 +140,38 @@ public class EnvironmentServiceTest {
     public void testUpdateEnvironmentByCode() {
         User loginUser = getGeneralUser();
         Mockito.when(resourcePermissionCheckService.operationPermissionCheck(AuthorizationType.ENVIRONMENT, null,
-                loginUser.getId(),ENVIRONMENT_UPDATE, baseServiceLogger)).thenReturn(true);
+                loginUser.getId(), ENVIRONMENT_UPDATE, baseServiceLogger)).thenReturn(true);
         Mockito.when(resourcePermissionCheckService.resourcePermissionCheck(AuthorizationType.ENVIRONMENT, null,
                 0, baseServiceLogger)).thenReturn(true);
-        Map<String, Object> result = environmentService.updateEnvironmentByCode(loginUser,1L,environmentName,getConfig(),getDesc(),workerGroups);
+        Map<String, Object> result = environmentService.updateEnvironmentByCode(loginUser, 1L, environmentName,
+                getConfig(), getDesc(), workerGroups);
         logger.info(result.toString());
         Assert.assertEquals(Status.USER_NO_OPERATION_PERM, result.get(Constants.STATUS));
 
         loginUser = getAdminUser();
-        result = environmentService.updateEnvironmentByCode(loginUser,1L,environmentName,"",getDesc(),workerGroups);
+        result = environmentService.updateEnvironmentByCode(loginUser, 1L, environmentName, "", getDesc(),
+                workerGroups);
         logger.info(result.toString());
         Assert.assertEquals(Status.ENVIRONMENT_CONFIG_IS_NULL, result.get(Constants.STATUS));
 
-        result = environmentService.updateEnvironmentByCode(loginUser,1L,"",getConfig(),getDesc(),workerGroups);
+        result = environmentService.updateEnvironmentByCode(loginUser, 1L, "", getConfig(), getDesc(), workerGroups);
         logger.info(result.toString());
         Assert.assertEquals(Status.ENVIRONMENT_NAME_IS_NULL, result.get(Constants.STATUS));
 
-        result = environmentService.updateEnvironmentByCode(loginUser,1L,environmentName,getConfig(),getDesc(),"test");
+        result = environmentService.updateEnvironmentByCode(loginUser, 1L, environmentName, getConfig(), getDesc(),
+                "test");
         logger.info(result.toString());
         Assert.assertEquals(Status.ENVIRONMENT_WORKER_GROUPS_IS_INVALID, result.get(Constants.STATUS));
 
         Mockito.when(environmentMapper.queryByEnvironmentName(environmentName)).thenReturn(getEnvironment());
-        result = environmentService.updateEnvironmentByCode(loginUser,2L,environmentName,getConfig(),getDesc(),workerGroups);
+        result = environmentService.updateEnvironmentByCode(loginUser, 2L, environmentName, getConfig(), getDesc(),
+                workerGroups);
         logger.info(result.toString());
         Assert.assertEquals(Status.ENVIRONMENT_NAME_EXISTS, result.get(Constants.STATUS));
 
-        Mockito.when(environmentMapper.update(Mockito.any(Environment.class),Mockito.any(Wrapper.class))).thenReturn(1);
-        result = environmentService.updateEnvironmentByCode(loginUser,1L,"testName","test","test",workerGroups);
+        Mockito.when(environmentMapper.update(Mockito.any(Environment.class), Mockito.any(Wrapper.class)))
+                .thenReturn(1);
+        result = environmentService.updateEnvironmentByCode(loginUser, 1L, "testName", "test", "test", workerGroups);
         logger.info(result.toString());
         Assert.assertEquals(Status.SUCCESS, result.get(Constants.STATUS));
     }
@@ -178,12 +184,12 @@ public class EnvironmentServiceTest {
                 1, environmentServiceLogger)).thenReturn(ids);
         Mockito.when(environmentMapper.selectBatchIds(ids)).thenReturn(Lists.newArrayList(getEnvironment()));
 
-        Map<String, Object> result  = environmentService.queryAllEnvironmentList(getAdminUser());
+        Map<String, Object> result = environmentService.queryAllEnvironmentList(getAdminUser());
         logger.info(result.toString());
-        Assert.assertEquals(Status.SUCCESS,result.get(Constants.STATUS));
+        Assert.assertEquals(Status.SUCCESS, result.get(Constants.STATUS));
 
-        List<Environment> list = (List<Environment>)(result.get(Constants.DATA_LIST));
-        Assert.assertEquals(1,list.size());
+        List<Environment> list = (List<Environment>) (result.get(Constants.DATA_LIST));
+        Assert.assertEquals(1, list.size());
     }
 
     @Test
@@ -191,7 +197,8 @@ public class EnvironmentServiceTest {
         IPage<Environment> page = new Page<>(1, 10);
         page.setRecords(getList());
         page.setTotal(1L);
-        Mockito.when(environmentMapper.queryEnvironmentListPaging(Mockito.any(Page.class), Mockito.eq(environmentName))).thenReturn(page);
+        Mockito.when(environmentMapper.queryEnvironmentListPaging(Mockito.any(Page.class), Mockito.eq(environmentName)))
+                .thenReturn(page);
 
         Result result = environmentService.queryEnvironmentListPaging(getAdminUser(), 1, 10, environmentName);
         logger.info(result.toString());
@@ -204,12 +211,12 @@ public class EnvironmentServiceTest {
         Mockito.when(environmentMapper.queryByEnvironmentName(environmentName)).thenReturn(null);
         Map<String, Object> result = environmentService.queryEnvironmentByName(environmentName);
         logger.info(result.toString());
-        Assert.assertEquals(Status.QUERY_ENVIRONMENT_BY_NAME_ERROR,result.get(Constants.STATUS));
+        Assert.assertEquals(Status.QUERY_ENVIRONMENT_BY_NAME_ERROR, result.get(Constants.STATUS));
 
         Mockito.when(environmentMapper.queryByEnvironmentName(environmentName)).thenReturn(getEnvironment());
         result = environmentService.queryEnvironmentByName(environmentName);
         logger.info(result.toString());
-        Assert.assertEquals(Status.SUCCESS,result.get(Constants.STATUS));
+        Assert.assertEquals(Status.SUCCESS, result.get(Constants.STATUS));
     }
 
     @Test
@@ -217,12 +224,12 @@ public class EnvironmentServiceTest {
         Mockito.when(environmentMapper.queryByEnvironmentCode(1L)).thenReturn(null);
         Map<String, Object> result = environmentService.queryEnvironmentByCode(1L);
         logger.info(result.toString());
-        Assert.assertEquals(Status.QUERY_ENVIRONMENT_BY_CODE_ERROR,result.get(Constants.STATUS));
+        Assert.assertEquals(Status.QUERY_ENVIRONMENT_BY_CODE_ERROR, result.get(Constants.STATUS));
 
         Mockito.when(environmentMapper.queryByEnvironmentCode(1L)).thenReturn(getEnvironment());
         result = environmentService.queryEnvironmentByCode(1L);
         logger.info(result.toString());
-        Assert.assertEquals(Status.SUCCESS,result.get(Constants.STATUS));
+        Assert.assertEquals(Status.SUCCESS, result.get(Constants.STATUS));
     }
 
     @Test
@@ -232,19 +239,19 @@ public class EnvironmentServiceTest {
                 loginUser.getId(), ENVIRONMENT_DELETE, baseServiceLogger)).thenReturn(true);
         Mockito.when(resourcePermissionCheckService.resourcePermissionCheck(AuthorizationType.ENVIRONMENT, null,
                 0, baseServiceLogger)).thenReturn(true);
-        Map<String, Object> result = environmentService.deleteEnvironmentByCode(loginUser,1L);
+        Map<String, Object> result = environmentService.deleteEnvironmentByCode(loginUser, 1L);
         logger.info(result.toString());
         Assert.assertEquals(Status.USER_NO_OPERATION_PERM, result.get(Constants.STATUS));
 
         loginUser = getAdminUser();
-        Mockito.when(taskDefinitionMapper.selectCount(Mockito.any(LambdaQueryWrapper.class))).thenReturn(1);
-        result = environmentService.deleteEnvironmentByCode(loginUser,1L);
+        Mockito.when(taskDefinitionMapper.selectCount(Mockito.any(LambdaQueryWrapper.class))).thenReturn(1L);
+        result = environmentService.deleteEnvironmentByCode(loginUser, 1L);
         logger.info(result.toString());
         Assert.assertEquals(Status.DELETE_ENVIRONMENT_RELATED_TASK_EXISTS, result.get(Constants.STATUS));
 
-        Mockito.when(taskDefinitionMapper.selectCount(Mockito.any(LambdaQueryWrapper.class))).thenReturn(0);
+        Mockito.when(taskDefinitionMapper.selectCount(Mockito.any(LambdaQueryWrapper.class))).thenReturn(0L);
         Mockito.when(environmentMapper.deleteByCode(1L)).thenReturn(1);
-        result = environmentService.deleteEnvironmentByCode(loginUser,1L);
+        result = environmentService.deleteEnvironmentByCode(loginUser, 1L);
         logger.info(result.toString());
         Assert.assertEquals(Status.SUCCESS, result.get(Constants.STATUS));
     }
diff --git a/dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/K8SNamespaceServiceTest.java b/dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/K8SNamespaceServiceTest.java
index 8732a59658..ed684ea914 100644
--- a/dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/K8SNamespaceServiceTest.java
+++ b/dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/K8SNamespaceServiceTest.java
@@ -18,6 +18,7 @@
 package org.apache.dolphinscheduler.api.service;
 
 import org.apache.dolphinscheduler.api.enums.Status;
+import org.apache.dolphinscheduler.api.k8s.K8sClientService;
 import org.apache.dolphinscheduler.api.service.impl.K8SNamespaceServiceImpl;
 import org.apache.dolphinscheduler.api.utils.PageInfo;
 import org.apache.dolphinscheduler.api.utils.Result;
@@ -29,10 +30,10 @@ import org.apache.dolphinscheduler.dao.entity.User;
 import org.apache.dolphinscheduler.dao.mapper.ClusterMapper;
 import org.apache.dolphinscheduler.dao.mapper.K8sNamespaceMapper;
 import org.apache.dolphinscheduler.dao.mapper.UserMapper;
-import org.apache.dolphinscheduler.api.k8s.K8sClientService;
 
 import org.apache.commons.collections.CollectionUtils;
 
+import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
@@ -77,7 +78,9 @@ public class K8SNamespaceServiceTest {
 
     @Before
     public void setUp() throws Exception {
-        Mockito.when(k8sClientService.upsertNamespaceAndResourceToK8s(Mockito.any(K8sNamespace.class), Mockito.anyString())).thenReturn(null);
+        Mockito.when(
+                k8sClientService.upsertNamespaceAndResourceToK8s(Mockito.any(K8sNamespace.class), Mockito.anyString()))
+                .thenReturn(null);
         Mockito.when(k8sClientService.deleteNamespaceToK8s(Mockito.anyString(), Mockito.anyLong())).thenReturn(null);
     }
 
@@ -90,7 +93,8 @@ public class K8SNamespaceServiceTest {
         IPage<K8sNamespace> page = new Page<>(1, 10);
         page.setTotal(1L);
         page.setRecords(getNamespaceList());
-        Mockito.when(k8sNamespaceMapper.queryK8sNamespacePaging(Mockito.any(Page.class), Mockito.eq(namespace))).thenReturn(page);
+        Mockito.when(k8sNamespaceMapper.queryK8sNamespacePaging(Mockito.any(Page.class), Mockito.eq(namespace)))
+                .thenReturn(page);
         Result result = k8sNamespaceService.queryListPaging(getLoginUser(), namespace, 1, 10);
         logger.info(result.toString());
         PageInfo<K8sNamespace> pageInfo = (PageInfo<K8sNamespace>) result.getData();
@@ -100,7 +104,8 @@ public class K8SNamespaceServiceTest {
     @Test
     public void createK8sNamespace() {
         // namespace is null
-        Map<String, Object> result = k8sNamespaceService.createK8sNamespace(getLoginUser(), null, clusterCode, 10.0, 100);
+        Map<String, Object> result =
+                k8sNamespaceService.createK8sNamespace(getLoginUser(), null, clusterCode, 10.0, 100);
         logger.info(result.toString());
         Assert.assertEquals(Status.REQUEST_PARAMS_NOT_VALID_ERROR, result.get(Constants.STATUS));
         // k8s is null
@@ -112,7 +117,7 @@ public class K8SNamespaceServiceTest {
         result = k8sNamespaceService.createK8sNamespace(getLoginUser(), namespace, clusterCode, 10.0, 100);
         logger.info(result.toString());
         Assert.assertEquals(Status.SUCCESS, result.get(Constants.STATUS));
-        //null limit cpu and mem
+        // null limit cpu and mem
         result = k8sNamespaceService.createK8sNamespace(getLoginUser(), namespace, clusterCode, null, null);
         logger.info(result.toString());
         Assert.assertEquals(Status.SUCCESS, result.get(Constants.STATUS));
@@ -140,22 +145,22 @@ public class K8SNamespaceServiceTest {
 
         Mockito.when(k8sNamespaceMapper.existNamespace(namespace, clusterCode)).thenReturn(true);
 
-        //namespace null
+        // namespace null
         Result result = k8sNamespaceService.verifyNamespaceK8s(null, clusterCode);
         logger.info(result.toString());
         Assert.assertEquals(result.getCode().intValue(), Status.REQUEST_PARAMS_NOT_VALID_ERROR.getCode());
 
-        //k8s null
+        // k8s null
         result = k8sNamespaceService.verifyNamespaceK8s(namespace, null);
         logger.info(result.toString());
         Assert.assertEquals(result.getCode().intValue(), Status.REQUEST_PARAMS_NOT_VALID_ERROR.getCode());
 
-        //exist
+        // exist
         result = k8sNamespaceService.verifyNamespaceK8s(namespace, clusterCode);
         logger.info(result.toString());
         Assert.assertEquals(result.getCode().intValue(), Status.K8S_NAMESPACE_EXIST.getCode());
 
-        //not exist
+        // not exist
         result = k8sNamespaceService.verifyNamespaceK8s(namespace, 9999L);
         logger.info(result.toString());
         Assert.assertEquals(result.getCode().intValue(), Status.SUCCESS.getCode());
@@ -163,7 +168,7 @@ public class K8SNamespaceServiceTest {
 
     @Test
     public void deleteNamespaceById() {
-        Mockito.when(k8sNamespaceMapper.deleteById(Mockito.any())).thenReturn(1);
+        Mockito.when(k8sNamespaceMapper.deleteById(Mockito.<Serializable>any())).thenReturn(1);
         Mockito.when(k8sNamespaceMapper.selectById(1)).thenReturn(getNamespace());
 
         Map<String, Object> result = k8sNamespaceService.deleteNamespaceById(getLoginUser(), 1);
@@ -216,7 +221,6 @@ public class K8SNamespaceServiceTest {
         Assert.assertTrue(CollectionUtils.isEmpty(namespaces));
     }
 
-
     private User getLoginUser() {
 
         User loginUser = new User();
@@ -248,4 +252,4 @@ public class K8SNamespaceServiceTest {
         cluster.setOperator(1);
         return cluster;
     }
-}
\ No newline at end of file
+}
diff --git a/dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/UsersServiceTest.java b/dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/UsersServiceTest.java
index 1fc13c2198..cc32c621bb 100644
--- a/dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/UsersServiceTest.java
+++ b/dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/UsersServiceTest.java
@@ -18,7 +18,6 @@
 package org.apache.dolphinscheduler.api.service;
 
 import static org.apache.dolphinscheduler.api.constants.ApiFuncIdentificationConstant.USER_MANAGER;
-
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.Mockito.when;
@@ -158,38 +157,39 @@ public class UsersServiceTest {
         String phone = "13456432345";
         int state = 1;
         try {
-            //userName error
-            Map<String, Object> result = usersService.createUser(user, userName, userPassword, email, tenantId, phone, queueName, state);
+            // userName error
+            Map<String, Object> result =
+                    usersService.createUser(user, userName, userPassword, email, tenantId, phone, queueName, state);
             logger.info(result.toString());
             Assert.assertEquals(Status.REQUEST_PARAMS_NOT_VALID_ERROR, result.get(Constants.STATUS));
 
             userName = "userTest0001";
             userPassword = "userTest000111111111111111";
-            //password error
+            // password error
             result = usersService.createUser(user, userName, userPassword, email, tenantId, phone, queueName, state);
             logger.info(result.toString());
             Assert.assertEquals(Status.REQUEST_PARAMS_NOT_VALID_ERROR, result.get(Constants.STATUS));
 
             userPassword = "userTest0001";
             email = "1q.com";
-            //email error
+            // email error
             result = usersService.createUser(user, userName, userPassword, email, tenantId, phone, queueName, state);
             logger.info(result.toString());
             Assert.assertEquals(Status.REQUEST_PARAMS_NOT_VALID_ERROR, result.get(Constants.STATUS));
 
             email = "122222@qq.com";
             phone = "2233";
-            //phone error
+            // phone error
             result = usersService.createUser(user, userName, userPassword, email, tenantId, phone, queueName, state);
             logger.info(result.toString());
             Assert.assertEquals(Status.REQUEST_PARAMS_NOT_VALID_ERROR, result.get(Constants.STATUS));
 
             phone = "13456432345";
-            //tenantId not exists
+            // tenantId not exists
             result = usersService.createUser(user, userName, userPassword, email, tenantId, phone, queueName, state);
             logger.info(result.toString());
             Assert.assertEquals(Status.TENANT_NOT_EXIST, result.get(Constants.STATUS));
-            //success
+            // success
             Mockito.when(tenantMapper.queryById(1)).thenReturn(getTenant());
             result = usersService.createUser(user, userName, userPassword, email, 1, phone, queueName, state);
             logger.info(result.toString());
@@ -205,7 +205,8 @@ public class UsersServiceTest {
     public void testQueryUser() {
         String userName = "userTest0001";
         String userPassword = "userTest0001";
-        when(userMapper.queryUserByNamePassword(userName, EncryptionUtils.getMd5(userPassword))).thenReturn(getGeneralUser());
+        when(userMapper.queryUserByNamePassword(userName, EncryptionUtils.getMd5(userPassword)))
+                .thenReturn(getGeneralUser());
         User queryUser = usersService.queryUser(userName, userPassword);
         logger.info(queryUser.toString());
         Assert.assertTrue(queryUser != null);
@@ -231,18 +232,18 @@ public class UsersServiceTest {
         user.setUserType(UserType.ADMIN_USER);
         user.setUserName("test_user");
 
-        //user name null
+        // user name null
         int userId = usersService.getUserIdByName("");
         Assert.assertEquals(0, userId);
 
-        //user not exist
+        // user not exist
         when(usersService.queryUser(user.getUserName())).thenReturn(null);
         int userNotExistId = usersService.getUserIdByName(user.getUserName());
         Assert.assertEquals(-1, userNotExistId);
 
-        //user exist
+        // user exist
         when(usersService.queryUser(user.getUserName())).thenReturn(user);
-        int userExistId = usersService.getUserIdByName(user.getUserName());
+        Integer userExistId = usersService.getUserIdByName(user.getUserName());
         Assert.assertEquals(user.getId(), userExistId);
     }
 
@@ -252,15 +253,19 @@ public class UsersServiceTest {
         user.setUserType(UserType.ADMIN_USER);
         user.setId(1);
 
-        Mockito.when(resourcePermissionCheckService.operationPermissionCheck(AuthorizationType.ACCESS_TOKEN,null, 1, USER_MANAGER, serviceLogger)).thenReturn(true);
-        Mockito.when(resourcePermissionCheckService.resourcePermissionCheck(AuthorizationType.ACCESS_TOKEN, null, 0, serviceLogger)).thenReturn(false);
+        Mockito.when(resourcePermissionCheckService.operationPermissionCheck(AuthorizationType.ACCESS_TOKEN, null, 1,
+                USER_MANAGER, serviceLogger)).thenReturn(true);
+        Mockito.when(resourcePermissionCheckService.resourcePermissionCheck(AuthorizationType.ACCESS_TOKEN, null, 0,
+                serviceLogger)).thenReturn(false);
         Map<String, Object> result = usersService.queryUserList(user);
         logger.info(result.toString());
         Assert.assertEquals(Status.USER_NO_OPERATION_PERM, result.get(Constants.STATUS));
 
-        //success
-        Mockito.when(resourcePermissionCheckService.operationPermissionCheck(AuthorizationType.ACCESS_TOKEN,null, 1, USER_MANAGER, serviceLogger)).thenReturn(true);
-        Mockito.when(resourcePermissionCheckService.resourcePermissionCheck(AuthorizationType.ACCESS_TOKEN, null, 0, serviceLogger)).thenReturn(true);
+        // success
+        Mockito.when(resourcePermissionCheckService.operationPermissionCheck(AuthorizationType.ACCESS_TOKEN, null, 1,
+                USER_MANAGER, serviceLogger)).thenReturn(true);
+        Mockito.when(resourcePermissionCheckService.resourcePermissionCheck(AuthorizationType.ACCESS_TOKEN, null, 0,
+                serviceLogger)).thenReturn(true);
         user.setUserType(UserType.ADMIN_USER);
         when(userMapper.queryEnabledUsers()).thenReturn(getUserList());
         result = usersService.queryUserList(user);
@@ -275,12 +280,12 @@ public class UsersServiceTest {
         page.setRecords(getUserList());
         when(userMapper.queryUserPaging(any(Page.class), eq("userTest"))).thenReturn(page);
 
-        //no operate
+        // no operate
         Result result = usersService.queryUserList(user, "userTest", 1, 10);
         logger.info(result.toString());
         Assert.assertEquals(Status.USER_NO_OPERATION_PERM.getCode(), (int) result.getCode());
 
-        //success
+        // success
         user.setUserType(UserType.ADMIN_USER);
         result = usersService.queryUserList(user, "userTest", 1, 10);
         Assert.assertEquals(Status.SUCCESS.getCode(), (int) result.getCode());
@@ -293,14 +298,16 @@ public class UsersServiceTest {
         String userName = "userTest0001";
         String userPassword = "userTest0001";
         try {
-            //user not exist
-            Map<String, Object> result = usersService.updateUser(getLoginUser(), 0, userName, userPassword, "3443@qq.com", 1, "13457864543", "queue", 1, "Asia/Shanghai");
+            // user not exist
+            Map<String, Object> result = usersService.updateUser(getLoginUser(), 0, userName, userPassword,
+                    "3443@qq.com", 1, "13457864543", "queue", 1, "Asia/Shanghai");
             Assert.assertEquals(Status.USER_NOT_EXIST, result.get(Constants.STATUS));
             logger.info(result.toString());
 
-            //success
+            // success
             when(userMapper.selectById(1)).thenReturn(getUser());
-            result = usersService.updateUser(getLoginUser(), 1, userName, userPassword, "32222s@qq.com", 1, "13457864543", "queue", 1, "Asia/Shanghai");
+            result = usersService.updateUser(getLoginUser(), 1, userName, userPassword, "32222s@qq.com", 1,
+                    "13457864543", "queue", 1, "Asia/Shanghai");
             logger.info(result.toString());
             Assert.assertEquals(Status.SUCCESS, result.get(Constants.STATUS));
         } catch (Exception e) {
@@ -316,7 +323,7 @@ public class UsersServiceTest {
             when(userMapper.queryTenantCodeByUserId(1)).thenReturn(getUser());
             when(userMapper.selectById(1)).thenReturn(getUser());
             when(accessTokenMapper.deleteAccessTokenByUserId(1)).thenReturn(0);
-            //no operate
+            // no operate
             Map<String, Object> result = usersService.deleteUserById(loginUser, 3);
             logger.info(result.toString());
             Assert.assertEquals(Status.USER_NO_OPERATION_PERM, result.get(Constants.STATUS));
@@ -332,7 +339,7 @@ public class UsersServiceTest {
             result = usersService.deleteUserById(loginUser, 1);
             Assert.assertEquals(Status.TRANSFORM_PROJECT_OWNERSHIP, result.get(Constants.STATUS));
 
-            //success
+            // success
             Mockito.when(projectMapper.queryProjectCreatedByUser(1)).thenReturn(null);
             result = usersService.deleteUserById(loginUser, 1);
             logger.info(result.toString());
@@ -350,7 +357,7 @@ public class UsersServiceTest {
         User loginUser = new User();
         int userId = 3;
 
-        //user not exist
+        // user not exist
         loginUser.setId(1);
         loginUser.setUserType(UserType.ADMIN_USER);
         when(userMapper.selectById(userId)).thenReturn(null);
@@ -358,7 +365,7 @@ public class UsersServiceTest {
         logger.info(result.toString());
         Assert.assertEquals(Status.USER_NOT_EXIST, result.get(Constants.STATUS));
 
-        //SUCCESS
+        // SUCCESS
         when(userMapper.selectById(userId)).thenReturn(getUser());
         result = usersService.grantProject(loginUser, userId, projectIds);
         logger.info(result.toString());
@@ -439,12 +446,12 @@ public class UsersServiceTest {
         when(userMapper.selectById(1)).thenReturn(getUser());
         User loginUser = new User();
 
-        //user not exist
+        // user not exist
         loginUser.setUserType(UserType.ADMIN_USER);
         Map<String, Object> result = usersService.grantResources(loginUser, 2, resourceIds);
         logger.info(result.toString());
         Assert.assertEquals(Status.USER_NOT_EXIST, result.get(Constants.STATUS));
-        //success
+        // success
         when(resourceMapper.selectById(Mockito.anyInt())).thenReturn(getResource());
         when(resourceUserMapper.deleteResourceUser(1, 0)).thenReturn(1);
         result = usersService.grantResources(loginUser, 1, resourceIds);
@@ -459,12 +466,12 @@ public class UsersServiceTest {
         when(userMapper.selectById(1)).thenReturn(getUser());
         User loginUser = new User();
 
-        //user not exist
+        // user not exist
         loginUser.setUserType(UserType.ADMIN_USER);
         Map<String, Object> result = usersService.grantUDFFunction(loginUser, 2, udfIds);
         logger.info(result.toString());
         Assert.assertEquals(Status.USER_NOT_EXIST, result.get(Constants.STATUS));
-        //success
+        // success
         when(udfUserMapper.deleteByUserId(1)).thenReturn(1);
         result = usersService.grantUDFFunction(loginUser, 1, udfIds);
         logger.info(result.toString());
@@ -477,12 +484,12 @@ public class UsersServiceTest {
         when(userMapper.selectById(1)).thenReturn(getUser());
         User loginUser = new User();
 
-        //user not exist
+        // user not exist
         loginUser.setUserType(UserType.ADMIN_USER);
         Map<String, Object> result = usersService.grantNamespaces(loginUser, 2, namespaceIds);
         logger.info(result.toString());
         Assert.assertEquals(Status.USER_NOT_EXIST, result.get(Constants.STATUS));
-        //success
+        // success
         when(k8sNamespaceUserMapper.deleteNamespaceRelation(0, 1)).thenReturn(1);
         result = usersService.grantNamespaces(loginUser, 1, namespaceIds);
         logger.info(result.toString());
@@ -495,7 +502,7 @@ public class UsersServiceTest {
         User loginUser = new User();
         int userId = 3;
 
-        //user not exist
+        // user not exist
         loginUser.setId(1);
         loginUser.setUserType(UserType.ADMIN_USER);
         when(userMapper.selectById(userId)).thenReturn(null);
@@ -536,10 +543,10 @@ public class UsersServiceTest {
         logger.info(result.toString());
         Assert.assertEquals(Status.SUCCESS, result.get(Constants.STATUS));
         User tempUser = (User) result.get(Constants.DATA_LIST);
-        //check userName
+        // check userName
         Assert.assertEquals("admin", tempUser.getUserName());
 
-        //get general user
+        // get general user
         loginUser.setUserType(null);
         loginUser.setId(1);
         when(userMapper.queryDetailsById(1)).thenReturn(getGeneralUser());
@@ -548,18 +555,18 @@ public class UsersServiceTest {
         logger.info(result.toString());
         Assert.assertEquals(Status.SUCCESS, result.get(Constants.STATUS));
         tempUser = (User) result.get(Constants.DATA_LIST);
-        //check userName
+        // check userName
         Assert.assertEquals("userTest0001", tempUser.getUserName());
     }
 
     @Test
     public void testQueryAllGeneralUsers() {
         User loginUser = new User();
-        //no operate
+        // no operate
         Map<String, Object> result = usersService.queryAllGeneralUsers(loginUser);
         logger.info(result.toString());
         Assert.assertEquals(Status.USER_NO_OPERATION_PERM, result.get(Constants.STATUS));
-        //success
+        // success
         loginUser.setUserType(UserType.ADMIN_USER);
         when(userMapper.queryAllGeneralUser()).thenReturn(getUserList());
         result = usersService.queryAllGeneralUsers(loginUser);
@@ -571,11 +578,11 @@ public class UsersServiceTest {
 
     @Test
     public void testVerifyUserName() {
-        //not exist user
+        // not exist user
         Result result = usersService.verifyUserName("admin89899");
         logger.info(result.toString());
         Assert.assertEquals(Status.SUCCESS.getMsg(), result.getMsg());
-        //exist user
+        // exist user
         when(userMapper.queryByUserNameAccurately("userTest0001")).thenReturn(getUser());
         result = usersService.verifyUserName("userTest0001");
         logger.info(result.toString());
@@ -587,12 +594,12 @@ public class UsersServiceTest {
         User loginUser = new User();
         when(userMapper.selectList(null)).thenReturn(getUserList());
         when(userMapper.queryUserListByAlertGroupId(2)).thenReturn(getUserList());
-        //no operate
+        // no operate
         Map<String, Object> result = usersService.unauthorizedUser(loginUser, 2);
         logger.info(result.toString());
         loginUser.setUserType(UserType.ADMIN_USER);
         Assert.assertEquals(Status.USER_NO_OPERATION_PERM, result.get(Constants.STATUS));
-        //success
+        // success
         result = usersService.unauthorizedUser(loginUser, 2);
         logger.info(result.toString());
         Assert.assertEquals(Status.SUCCESS, result.get(Constants.STATUS));
@@ -602,11 +609,11 @@ public class UsersServiceTest {
     public void testAuthorizedUser() {
         User loginUser = new User();
         when(userMapper.queryUserListByAlertGroupId(2)).thenReturn(getUserList());
-        //no operate
+        // no operate
         Map<String, Object> result = usersService.authorizedUser(loginUser, 2);
         logger.info(result.toString());
         Assert.assertEquals(Status.USER_NO_OPERATION_PERM, result.get(Constants.STATUS));
-        //success
+        // success
         loginUser.setUserType(UserType.ADMIN_USER);
         result = usersService.authorizedUser(loginUser, 2);
         Assert.assertEquals(Status.SUCCESS, result.get(Constants.STATUS));
@@ -622,29 +629,29 @@ public class UsersServiceTest {
         String repeatPassword = "userTest";
         String email = "123@qq.com";
         try {
-            //userName error
+            // userName error
             Map<String, Object> result = usersService.registerUser(userName, userPassword, repeatPassword, email);
             Assert.assertEquals(Status.REQUEST_PARAMS_NOT_VALID_ERROR, result.get(Constants.STATUS));
 
             userName = "userTest0002";
             userPassword = "userTest000111111111111111";
-            //password error
+            // password error
             result = usersService.registerUser(userName, userPassword, repeatPassword, email);
             Assert.assertEquals(Status.REQUEST_PARAMS_NOT_VALID_ERROR, result.get(Constants.STATUS));
 
             userPassword = "userTest0002";
             email = "1q.com";
-            //email error
+            // email error
             result = usersService.registerUser(userName, userPassword, repeatPassword, email);
             Assert.assertEquals(Status.REQUEST_PARAMS_NOT_VALID_ERROR, result.get(Constants.STATUS));
 
-            //repeatPassword error
+            // repeatPassword error
             email = "7400@qq.com";
             repeatPassword = "userPassword";
             result = usersService.registerUser(userName, userPassword, repeatPassword, email);
             Assert.assertEquals(Status.REQUEST_PARAMS_NOT_VALID_ERROR, result.get(Constants.STATUS));
 
-            //success
+            // success
             repeatPassword = "userTest0002";
             result = usersService.registerUser(userName, userPassword, repeatPassword, email);
             Assert.assertEquals(Status.SUCCESS, result.get(Constants.STATUS));
@@ -660,27 +667,27 @@ public class UsersServiceTest {
         user.setUserType(UserType.GENERAL_USER);
         String userName = "userTest0002~";
         try {
-            //not admin
+            // not admin
             Map<String, Object> result = usersService.activateUser(user, userName);
             Assert.assertEquals(Status.USER_NO_OPERATION_PERM, result.get(Constants.STATUS));
 
-            //userName error
+            // userName error
             user.setUserType(UserType.ADMIN_USER);
             result = usersService.activateUser(user, userName);
             Assert.assertEquals(Status.REQUEST_PARAMS_NOT_VALID_ERROR, result.get(Constants.STATUS));
 
-            //user not exist
+            // user not exist
             userName = "userTest10013";
             result = usersService.activateUser(user, userName);
             Assert.assertEquals(Status.USER_NOT_EXIST, result.get(Constants.STATUS));
 
-            //user state error
+            // user state error
             userName = "userTest0001";
             when(userMapper.queryByUserNameAccurately(userName)).thenReturn(getUser());
             result = usersService.activateUser(user, userName);
             Assert.assertEquals(Status.REQUEST_PARAMS_NOT_VALID_ERROR, result.get(Constants.STATUS));
 
-            //success
+            // success
             when(userMapper.queryByUserNameAccurately(userName)).thenReturn(getDisabledUser());
             result = usersService.activateUser(user, userName);
             Assert.assertEquals(Status.SUCCESS, result.get(Constants.STATUS));
@@ -700,11 +707,11 @@ public class UsersServiceTest {
         userNames.add("userTest0004");
 
         try {
-            //not admin
+            // not admin
             Map<String, Object> result = usersService.batchActivateUser(user, userNames);
             Assert.assertEquals(Status.USER_NO_OPERATION_PERM, result.get(Constants.STATUS));
 
-            //batch activate user names
+            // batch activate user names
             user.setUserType(UserType.ADMIN_USER);
             when(userMapper.queryByUserNameAccurately("userTest0001")).thenReturn(getUser());
             when(userMapper.queryByUserNameAccurately("userTest0002")).thenReturn(getDisabledUser());
diff --git a/dolphinscheduler-bom/pom.xml b/dolphinscheduler-bom/pom.xml
index 0599d5510e..ca0afc4133 100644
--- a/dolphinscheduler-bom/pom.xml
+++ b/dolphinscheduler-bom/pom.xml
@@ -32,10 +32,10 @@
         <spring-boot.version>2.7.3</spring-boot.version>
         <spring.version>5.3.19</spring.version>
         <java-websocket.version>1.5.1</java-websocket.version>
-        <mybatis-plus.version>3.2.0</mybatis-plus.version>
+        <mybatis-plus.version>3.5.2</mybatis-plus.version>
         <quartz.version>2.3.2</quartz.version>
         <druid.version>1.2.4</druid.version>
-        <zookeeper.version>3.4.14</zookeeper.version>
+        <zookeeper.version>3.8.0</zookeeper.version>
         <curator.version>4.3.0</curator.version>
         <curator-test.version>2.12.0</curator-test.version>
         <commons-codec.version>1.11</commons-codec.version>
@@ -52,9 +52,9 @@
         <protostuff.version>1.7.2</protostuff.version>
         <byte-buddy.version>1.9.16</byte-buddy.version>
         <logback.version>1.2.11</logback.version>
-        <hadoop.version>2.7.3</hadoop.version>
-        <cron-utils.version>9.1.3</cron-utils.version>
-        <h2.version>1.4.200</h2.version>
+        <hadoop.version>2.7.7</hadoop.version>
+        <cron-utils.version>9.1.6</cron-utils.version>
+        <h2.version>2.1.210</h2.version>
         <mysql-connector.version>8.0.16</mysql-connector.version>
         <oracle-jdbc.version>21.5.0.0</oracle-jdbc.version>
         <slf4j.version>1.7.36</slf4j.version>
@@ -63,8 +63,8 @@
         <activation.version>1.1</activation.version>
         <javax-mail>1.6.2</javax-mail>
         <guava.version>24.1-jre</guava.version>
-        <postgresql.version>42.3.4</postgresql.version>
-        <hive-jdbc.version>2.1.0</hive-jdbc.version>
+        <postgresql.version>42.4.1</postgresql.version>
+        <hive-jdbc.version>2.3.3</hive-jdbc.version>
         <commons-io.version>2.11.0</commons-io.version>
         <oshi-core.version>6.1.1</oshi-core.version>
         <clickhouse-jdbc.version>0.1.52</clickhouse-jdbc.version>
@@ -85,6 +85,9 @@
         <okhttp.version>3.14.9</okhttp.version>
         <json-path.version>2.7.0</json-path.version>
         <spring-cloud-dependencies.version>2021.0.3</spring-cloud-dependencies.version>
+        <gson.version>2.9.0</gson.version>
+        <dropwizard.metrics-version>4.2.11</dropwizard.metrics-version>
+        <snappy.version>1.1.8.4</snappy.version>
     </properties>
 
     <dependencyManagement>
@@ -204,6 +207,16 @@
                 </exclusions>
             </dependency>
             <dependency>
+    <groupId>io.dropwizard.metrics</groupId>
+    <artifactId>metrics-core</artifactId>
+    <version>${dropwizard.metrics-version}</version>
+</dependency>
+<dependency>
+    <groupId>org.xerial.snappy</groupId>
+    <artifactId>snappy-java</artifactId>
+    <version>${snappy.version}</version>
+</dependency>
+            <dependency>
                 <groupId>org.apache.curator</groupId>
                 <artifactId>curator-framework</artifactId>
                 <version>${curator.version}</version>
@@ -615,6 +628,12 @@
                 <artifactId>spring-ldap</artifactId>
                 <version>1.1.2</version>
             </dependency>
+
+            <dependency>
+                <groupId>com.google.code.gson</groupId>
+                <artifactId>gson</artifactId>
+                <version>${gson.version}</version>
+            </dependency>
         </dependencies>
 
     </dependencyManagement>
diff --git a/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/model/WorkerServerModel.java b/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/model/WorkerServerModel.java
index a1f7b479d3..30d4b1686c 100644
--- a/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/model/WorkerServerModel.java
+++ b/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/model/WorkerServerModel.java
@@ -60,7 +60,7 @@ public class WorkerServerModel {
      */
     private Date lastHeartbeatTime;
 
-    public int getId() {
+    public Integer getId() {
         return id;
     }
 
diff --git a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/PluginDao.java b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/PluginDao.java
index 57ff712bc8..0527cfd705 100644
--- a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/PluginDao.java
+++ b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/PluginDao.java
@@ -27,6 +27,7 @@ import org.springframework.stereotype.Component;
 
 @Component
 public class PluginDao {
+
     @Autowired
     private PluginDefineMapper pluginDefineMapper;
 
@@ -49,9 +50,10 @@ public class PluginDao {
         requireNonNull(pluginDefine.getPluginName(), "pluginName is null");
         requireNonNull(pluginDefine.getPluginType(), "pluginType is null");
 
-        PluginDefine currPluginDefine = pluginDefineMapper.queryByNameAndType(pluginDefine.getPluginName(), pluginDefine.getPluginType());
+        PluginDefine currPluginDefine =
+                pluginDefineMapper.queryByNameAndType(pluginDefine.getPluginName(), pluginDefine.getPluginType());
         if (currPluginDefine == null) {
-            if (pluginDefineMapper.insert(pluginDefine) == 1 && pluginDefine.getId() > 0) {
+            if (pluginDefineMapper.insert(pluginDefine) == 1 && pluginDefine.getId() != null) {
                 return pluginDefine.getId();
             }
             throw new IllegalStateException("Failed to insert plugin definition");
diff --git a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/datasource/SpringConnectionFactory.java b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/datasource/SpringConnectionFactory.java
index 74ca570fb1..5a486ee828 100644
--- a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/datasource/SpringConnectionFactory.java
+++ b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/datasource/SpringConnectionFactory.java
@@ -24,21 +24,23 @@ import org.apache.ibatis.type.JdbcType;
 
 import java.util.Properties;
 
-import javax.annotation.Resource;
 import javax.sql.DataSource;
 
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.jdbc.init.DataSourceScriptDatabaseInitializer;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Profile;
 import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
 import org.springframework.core.io.support.ResourcePatternResolver;
 import org.springframework.jdbc.datasource.DataSourceTransactionManager;
 
+import com.baomidou.mybatisplus.annotation.DbType;
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.core.MybatisConfiguration;
 import com.baomidou.mybatisplus.core.config.GlobalConfig;
-import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
+import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
+import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
 import com.baomidou.mybatisplus.extension.spring.MybatisSqlSessionFactoryBean;
 
 @Configuration
@@ -51,8 +53,10 @@ public class SpringConnectionFactory {
     public DataSourceScriptDatabaseInitializer dataSourceScriptDatabaseInitializer;
 
     @Bean
-    public PaginationInterceptor paginationInterceptor() {
-        return new PaginationInterceptor();
+    public MybatisPlusInterceptor paginationInterceptor() {
+        MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
+        interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL));
+        return interceptor;
     }
 
     @Bean
@@ -61,7 +65,7 @@ public class SpringConnectionFactory {
     }
 
     @Bean
-    public SqlSessionFactory sqlSessionFactory(DataSource dataSource) throws Exception {
+    public SqlSessionFactory sqlSessionFactory(DataSource dataSource, GlobalConfig globalConfig) throws Exception {
         MybatisConfiguration configuration = new MybatisConfiguration();
         configuration.setMapUnderscoreToCamelCase(true);
         configuration.setCacheEnabled(false);
@@ -69,24 +73,25 @@ public class SpringConnectionFactory {
         configuration.setJdbcTypeForNull(JdbcType.NULL);
         configuration.addInterceptor(paginationInterceptor());
 
-        configuration.setGlobalConfig(new GlobalConfig().setBanner(false));
         MybatisSqlSessionFactoryBean sqlSessionFactoryBean = new MybatisSqlSessionFactoryBean();
         sqlSessionFactoryBean.setConfiguration(configuration);
         sqlSessionFactoryBean.setDataSource(dataSource);
 
-        GlobalConfig.DbConfig dbConfig = new GlobalConfig.DbConfig();
-        dbConfig.setIdType(IdType.AUTO);
-        GlobalConfig globalConfig = new GlobalConfig().setBanner(false);
-        globalConfig.setDbConfig(dbConfig);
         sqlSessionFactoryBean.setGlobalConfig(globalConfig);
         sqlSessionFactoryBean.setTypeAliasesPackage("org.apache.dolphinscheduler.dao.entity");
         ResourcePatternResolver resolver = new PathMatchingResourcePatternResolver();
-        sqlSessionFactoryBean.setMapperLocations(resolver.getResources("org/apache/dolphinscheduler/dao/mapper/*Mapper.xml"));
-        sqlSessionFactoryBean.setTypeEnumsPackage("org.apache.dolphinscheduler.**.enums");
+        sqlSessionFactoryBean
+                .setMapperLocations(resolver.getResources("org/apache/dolphinscheduler/dao/mapper/*Mapper.xml"));
         sqlSessionFactoryBean.setDatabaseIdProvider(databaseIdProvider());
         return sqlSessionFactoryBean.getObject();
     }
 
+    @Bean
+    public GlobalConfig globalConfig() {
+        return new GlobalConfig().setDbConfig(new GlobalConfig.DbConfig()
+                .setIdType(IdType.AUTO)).setBanner(false);
+    }
+
     @Bean
     public DatabaseIdProvider databaseIdProvider() {
         DatabaseIdProvider databaseIdProvider = new VendorDatabaseIdProvider();
@@ -97,4 +102,22 @@ public class SpringConnectionFactory {
         databaseIdProvider.setProperties(properties);
         return databaseIdProvider;
     }
+
+    @Bean
+    @Profile("mysql")
+    public DbType mysql() {
+        return DbType.MYSQL;
+    }
+
+    @Bean
+    @Profile("h2")
+    public DbType h2() {
+        return DbType.H2;
+    }
+
+    @Bean
+    @Profile("postgresql")
+    public DbType postgresql() {
+        return DbType.POSTGRE_SQL;
+    }
 }
diff --git a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/AccessToken.java b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/AccessToken.java
index 56f976173b..a3ebdd3799 100644
--- a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/AccessToken.java
+++ b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/AccessToken.java
@@ -26,11 +26,12 @@ import com.baomidou.mybatisplus.annotation.TableName;
 
 @TableName("t_ds_access_token")
 public class AccessToken {
+
     /**
      * primary key
      */
     @TableId(value = "id", type = IdType.AUTO)
-    private int id;
+    private Integer id;
     /**
      * user_id
      */
@@ -59,7 +60,7 @@ public class AccessToken {
     @TableField(exist = false)
     private String userName;
 
-    public int getId() {
+    public Integer getId() {
         return id;
     }
 
diff --git a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/AlertGroup.java b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/AlertGroup.java
index 174eb55a3a..6c50154cb6 100644
--- a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/AlertGroup.java
+++ b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/AlertGroup.java
@@ -26,11 +26,12 @@ import com.baomidou.mybatisplus.annotation.TableName;
 
 @TableName("t_ds_alertgroup")
 public class AlertGroup {
+
     /**
      * primary key
      */
     @TableId(value = "id", type = IdType.AUTO)
-    private int id;
+    private Integer id;
     /**
      * group_name
      */
@@ -62,7 +63,7 @@ public class AlertGroup {
     @TableField(value = "create_user_id")
     private int createUserId;
 
-    public int getId() {
+    public Integer getId() {
         return id;
     }
 
@@ -138,13 +139,15 @@ public class AlertGroup {
         if (groupName != null ? !groupName.equals(that.groupName) : that.groupName != null) {
             return false;
         }
-        if (alertInstanceIds != null ? !alertInstanceIds.equals(that.alertInstanceIds) : that.alertInstanceIds != null) {
+        if (alertInstanceIds != null ? !alertInstanceIds.equals(that.alertInstanceIds)
+                : that.alertInstanceIds != null) {
             return false;
         }
         if (description != null ? !description.equals(that.description) : that.description != null) {
             return false;
         }
-        return !(createTime != null ? !createTime.equals(that.createTime) : that.createTime != null) && !(updateTime != null ? !updateTime.equals(that.updateTime) : that.updateTime != null);
+        return !(createTime != null ? !createTime.equals(that.createTime) : that.createTime != null)
+                && !(updateTime != null ? !updateTime.equals(that.updateTime) : that.updateTime != null);
 
     }
 
@@ -163,12 +166,12 @@ public class AlertGroup {
     @Override
     public String toString() {
         return "AlertGroup{"
-            + "id=" + id
-            + "createUserId=" + createUserId
-            + ", groupName='" + groupName + '\''
-            + ", description='" + description + '\''
-            + ", createTime=" + createTime
-            + ", updateTime=" + updateTime
-            + '}';
+                + "id=" + id
+                + "createUserId=" + createUserId
+                + ", groupName='" + groupName + '\''
+                + ", description='" + description + '\''
+                + ", createTime=" + createTime
+                + ", updateTime=" + updateTime
+                + '}';
     }
 }
diff --git a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/AlertPluginInstance.java b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/AlertPluginInstance.java
index f94d220fb2..12974110b7 100644
--- a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/AlertPluginInstance.java
+++ b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/AlertPluginInstance.java
@@ -35,7 +35,7 @@ public class AlertPluginInstance {
      * id
      */
     @TableId(value = "id", type = IdType.AUTO)
-    private int id;
+    private Integer id;
 
     /**
      * plugin_define_id
@@ -87,7 +87,7 @@ public class AlertPluginInstance {
         this.instanceName = instanceName;
     }
 
-    public int getId() {
+    public Integer getId() {
         return id;
     }
 
@@ -135,4 +135,3 @@ public class AlertPluginInstance {
         this.instanceName = instanceName;
     }
 }
-
diff --git a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/AlertSendStatus.java b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/AlertSendStatus.java
index c1876a581d..1e72c435dd 100644
--- a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/AlertSendStatus.java
+++ b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/AlertSendStatus.java
@@ -30,11 +30,12 @@ import com.google.common.base.Objects;
 
 @TableName("t_ds_alert_send_status")
 public class AlertSendStatus {
+
     /**
      * primary key
      */
     @TableId(value = "id", type = IdType.AUTO)
-    private int id;
+    private Integer id;
 
     /**
      * alert id
@@ -66,7 +67,7 @@ public class AlertSendStatus {
     @TableField("create_time")
     private Date createTime;
 
-    public int getId() {
+    public Integer getId() {
         return id;
     }
 
@@ -134,12 +135,12 @@ public class AlertSendStatus {
     @Override
     public String toString() {
         return new StringJoiner(", ", AlertSendStatus.class.getSimpleName() + "[", "]")
-            .add("id=" + id)
-            .add("alertId=" + alertId)
-            .add("alertPluginInstanceId=" + alertPluginInstanceId)
-            .add("sendStatus=" + sendStatus)
-            .add("log='" + log + "'")
-            .add("createTime=" + createTime)
-            .toString();
+                .add("id=" + id)
+                .add("alertId=" + alertId)
+                .add("alertPluginInstanceId=" + alertPluginInstanceId)
+                .add("sendStatus=" + sendStatus)
+                .add("log='" + log + "'")
+                .add("createTime=" + createTime)
+                .toString();
     }
 }
diff --git a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/AuditLog.java b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/AuditLog.java
index 6cb9821bf0..10023d1547 100644
--- a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/AuditLog.java
+++ b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/AuditLog.java
@@ -31,7 +31,7 @@ public class AuditLog {
      * id
      */
     @TableId(value = "id", type = IdType.AUTO)
-    private int id;
+    private Integer id;
 
     /**
      * user id
diff --git a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/Cluster.java b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/Cluster.java
index ee138f3c0d..ec1e7d9dd3 100644
--- a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/Cluster.java
+++ b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/Cluster.java
@@ -30,7 +30,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
 public class Cluster {
 
     @TableId(value = "id", type = IdType.AUTO)
-    private int id;
+    private Integer id;
 
     /**
      * cluster code
@@ -58,7 +58,7 @@ public class Cluster {
 
     private Date updateTime;
 
-    public int getId() {
+    public Integer getId() {
         return id;
     }
 
diff --git a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/Command.java b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/Command.java
index ae2ff6258a..8c6a950ea3 100644
--- a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/Command.java
+++ b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/Command.java
@@ -40,7 +40,7 @@ public class Command {
      * id
      */
     @TableId(value = "id", type = IdType.AUTO)
-    private int id;
+    private Integer id;
 
     /**
      * command type
@@ -146,22 +146,21 @@ public class Command {
     }
 
     public Command(
-            CommandType commandType,
-            TaskDependType taskDependType,
-            FailureStrategy failureStrategy,
-            int executorId,
-            long processDefinitionCode,
-            String commandParam,
-            WarningType warningType,
-            int warningGroupId,
-            Date scheduleTime,
-            String workerGroup,
-            Long environmentCode,
-            Priority processInstancePriority,
-            int dryRun,
-            int processInstanceId,
-            int processDefinitionVersion
-    ) {
+                   CommandType commandType,
+                   TaskDependType taskDependType,
+                   FailureStrategy failureStrategy,
+                   int executorId,
+                   long processDefinitionCode,
+                   String commandParam,
+                   WarningType warningType,
+                   int warningGroupId,
+                   Date scheduleTime,
+                   String workerGroup,
+                   Long environmentCode,
+                   Priority processInstancePriority,
+                   int dryRun,
+                   int processInstanceId,
+                   int processDefinitionVersion) {
         this.commandType = commandType;
         this.executorId = executorId;
         this.processDefinitionCode = processDefinitionCode;
@@ -189,7 +188,7 @@ public class Command {
         this.taskDependType = taskDependType;
     }
 
-    public int getId() {
+    public Integer getId() {
         return id;
     }
 
@@ -349,7 +348,8 @@ public class Command {
             return false;
         }
 
-        if (environmentCode != null ? environmentCode.equals(command.environmentCode) : command.environmentCode == null) {
+        if (environmentCode != null ? environmentCode.equals(command.environmentCode)
+                : command.environmentCode == null) {
             return false;
         }
 
@@ -437,4 +437,3 @@ public class Command {
     }
 
 }
-
diff --git a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/DataSource.java b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/DataSource.java
index 68120cafe8..87b9d0eb77 100644
--- a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/DataSource.java
+++ b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/DataSource.java
@@ -28,11 +28,12 @@ import com.baomidou.mybatisplus.annotation.TableName;
 
 @TableName("t_ds_datasource")
 public class DataSource {
+
     /**
      * id
      */
     @TableId(value = "id", type = IdType.AUTO)
-    private int id;
+    private Integer id;
 
     /**
      * user id
@@ -78,7 +79,7 @@ public class DataSource {
     public DataSource() {
     }
 
-    public int getId() {
+    public Integer getId() {
         return id;
     }
 
diff --git a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/DatasourceUser.java b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/DatasourceUser.java
index 6f18d0c9ee..7c09da5210 100644
--- a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/DatasourceUser.java
+++ b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/DatasourceUser.java
@@ -33,7 +33,7 @@ public class DatasourceUser {
      * id
      */
     @TableId(value = "id", type = IdType.AUTO)
-    private int id;
+    private Integer id;
 
     /**
      * user id
@@ -59,7 +59,7 @@ public class DatasourceUser {
      */
     private Date updateTime;
 
-    public int getId() {
+    public Integer getId() {
         return id;
     }
 
diff --git a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/DqComparisonType.java b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/DqComparisonType.java
index cf35342ce8..4941249f79 100644
--- a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/DqComparisonType.java
+++ b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/DqComparisonType.java
@@ -27,11 +27,12 @@ import com.baomidou.mybatisplus.annotation.TableName;
 
 @TableName("t_ds_dq_comparison_type")
 public class DqComparisonType implements Serializable {
+
     /**
      * primary key
      */
     @TableId(value = "id", type = IdType.AUTO)
-    private int id;
+    private Integer id;
     /**
      * type
      */
@@ -68,7 +69,7 @@ public class DqComparisonType implements Serializable {
     @TableField(value = "update_time")
     private Date updateTime;
 
-    public int getId() {
+    public Integer getId() {
         return id;
     }
 
diff --git a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/DqExecuteResult.java b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/DqExecuteResult.java
index ed5de24d72..b0a2e07483 100644
--- a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/DqExecuteResult.java
+++ b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/DqExecuteResult.java
@@ -27,11 +27,12 @@ import com.baomidou.mybatisplus.annotation.TableName;
 
 @TableName("t_ds_dq_execute_result")
 public class DqExecuteResult implements Serializable {
+
     /**
      * primary key
      */
     @TableId(value = "id", type = IdType.AUTO)
-    private int id;
+    private Integer id;
     /**
      * process defined id
      */
@@ -41,7 +42,7 @@ public class DqExecuteResult implements Serializable {
      * process definition name
      */
     @TableField(exist = false)
-    private String  processDefinitionName;
+    private String processDefinitionName;
     /**
      * process definition code
      */
@@ -153,7 +154,7 @@ public class DqExecuteResult implements Serializable {
     @TableField(value = "update_time")
     private Date updateTime;
 
-    public int getId() {
+    public Integer getId() {
         return id;
     }
 
@@ -355,7 +356,7 @@ public class DqExecuteResult implements Serializable {
 
     @Override
     public String toString() {
-        return "DqExecuteResult{" 
+        return "DqExecuteResult{"
                 + "id=" + id
                 + ", processDefinitionId=" + processDefinitionId
                 + ", processDefinitionName='" + processDefinitionName + '\''
diff --git a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/DqRule.java b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/DqRule.java
index bb87db257c..77369f78e1 100644
--- a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/DqRule.java
+++ b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/DqRule.java
@@ -27,11 +27,12 @@ import com.baomidou.mybatisplus.annotation.TableName;
 
 @TableName("t_ds_dq_rule")
 public class DqRule implements Serializable {
+
     /**
      * primary key
      */
     @TableId(value = "id", type = IdType.AUTO)
-    private int id;
+    private Integer id;
     /**
      * name
      */
@@ -68,7 +69,7 @@ public class DqRule implements Serializable {
     @TableField(value = "update_time")
     private Date updateTime;
 
-    public int getId() {
+    public Integer getId() {
         return id;
     }
 
diff --git a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/DqRuleExecuteSql.java b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/DqRuleExecuteSql.java
index d349b63f34..bfaed0628e 100644
--- a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/DqRuleExecuteSql.java
+++ b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/DqRuleExecuteSql.java
@@ -32,11 +32,12 @@ import com.baomidou.mybatisplus.annotation.TableName;
  */
 @TableName("t_ds_dq_rule_execute_sql")
 public class DqRuleExecuteSql implements Serializable {
+
     /**
      * primary key
      */
     @TableId(value = "id", type = IdType.AUTO)
-    private int id;
+    private Integer id;
     /**
      * index,ensure the execution order of sql
      */
@@ -73,7 +74,7 @@ public class DqRuleExecuteSql implements Serializable {
     @TableField(value = "update_time")
     private Date updateTime;
 
-    public int getId() {
+    public Integer getId() {
         return id;
     }
 
@@ -150,4 +151,4 @@ public class DqRuleExecuteSql implements Serializable {
                 + ", updateTime=" + updateTime
                 + '}';
     }
-}
\ No newline at end of file
+}
diff --git a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/DqRuleInputEntry.java b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/DqRuleInputEntry.java
index 63659f5688..ecb13d1fc9 100644
--- a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/DqRuleInputEntry.java
+++ b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/DqRuleInputEntry.java
@@ -34,11 +34,12 @@ import com.baomidou.mybatisplus.annotation.TableName;
  */
 @TableName("t_ds_dq_rule_input_entry")
 public class DqRuleInputEntry implements Serializable {
+
     /**
      * primary key
      */
     @TableId(value = "id", type = IdType.AUTO)
-    private int id;
+    private Integer id;
     /**
      * form field name
      */
@@ -127,7 +128,7 @@ public class DqRuleInputEntry implements Serializable {
     @TableField(value = "update_time")
     private Date updateTime;
 
-    public int getId() {
+    public Integer getId() {
         return id;
     }
 
@@ -294,4 +295,4 @@ public class DqRuleInputEntry implements Serializable {
                 + ", updateTime=" + updateTime
                 + '}';
     }
-}
\ No newline at end of file
+}
diff --git a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/DqTaskStatisticsValue.java b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/DqTaskStatisticsValue.java
index f76b97f98b..79b63d65d0 100644
--- a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/DqTaskStatisticsValue.java
+++ b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/DqTaskStatisticsValue.java
@@ -27,11 +27,12 @@ import com.baomidou.mybatisplus.annotation.TableName;
 
 @TableName("t_ds_dq_task_statistics_value")
 public class DqTaskStatisticsValue implements Serializable {
+
     /**
      * primary key
      */
     @TableId(value = "id", type = IdType.AUTO)
-    private int id;
+    private Integer id;
     /**
      * process defined id
      */
@@ -41,7 +42,7 @@ public class DqTaskStatisticsValue implements Serializable {
      * process definition name
      */
     @TableField(exist = false)
-    private String  processDefinitionName;
+    private String processDefinitionName;
     /**
      * task instance id
      */
@@ -93,7 +94,7 @@ public class DqTaskStatisticsValue implements Serializable {
     @TableField(value = "update_time")
     private Date updateTime;
 
-    public int getId() {
+    public Integer getId() {
         return id;
     }
 
diff --git a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/Environment.java b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/Environment.java
index 8aed0fe8df..ca6b569638 100644
--- a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/Environment.java
+++ b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/Environment.java
@@ -30,7 +30,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
 public class Environment {
 
     @TableId(value = "id", type = IdType.AUTO)
-    private int id;
+    private Integer id;
 
     /**
      * environment code
@@ -58,7 +58,7 @@ public class Environment {
 
     private Date updateTime;
 
-    public int getId() {
+    public Integer getId() {
         return id;
     }
 
diff --git a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/EnvironmentWorkerGroupRelation.java b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/EnvironmentWorkerGroupRelation.java
index 14bce3959f..683d8a5be0 100644
--- a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/EnvironmentWorkerGroupRelation.java
+++ b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/EnvironmentWorkerGroupRelation.java
@@ -30,7 +30,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
 public class EnvironmentWorkerGroupRelation {
 
     @TableId(value = "id", type = IdType.AUTO)
-    private int id;
+    private Integer id;
 
     /**
      * environment code
@@ -51,7 +51,7 @@ public class EnvironmentWorkerGroupRelation {
 
     private Date updateTime;
 
-    public int getId() {
+    public Integer getId() {
         return id;
     }
 
diff --git a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/ErrorCommand.java b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/ErrorCommand.java
index f050dd2b74..db77bb7739 100644
--- a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/ErrorCommand.java
+++ b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/ErrorCommand.java
@@ -121,7 +121,8 @@ public class ErrorCommand {
      */
     private int dryRun;
 
-    public ErrorCommand() {}
+    public ErrorCommand() {
+    }
 
     public ErrorCommand(Command command, String message) {
         this.id = command.getId();
@@ -150,7 +151,7 @@ public class ErrorCommand {
         this.taskDependType = taskDependType;
     }
 
-    public int getId() {
+    public Integer getId() {
         return id;
     }
 
diff --git a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/K8s.java b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/K8s.java
index 9f2ef2ff77..06fe3f0b48 100644
--- a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/K8s.java
+++ b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/K8s.java
@@ -29,11 +29,12 @@ import com.baomidou.mybatisplus.annotation.TableName;
  */
 @TableName("t_ds_k8s")
 public class K8s {
+
     /**
      * id
      */
     @TableId(value = "id", type = IdType.AUTO)
-    private int id;
+    private Integer id;
     /**
      * k8s name
      */
@@ -60,7 +61,7 @@ public class K8s {
 
     }
 
-    public int getId() {
+    public Integer getId() {
         return id;
     }
 
diff --git a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/K8sNamespaceUser.java b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/K8sNamespaceUser.java
index 87a7a3ecc4..adc97976e0 100644
--- a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/K8sNamespaceUser.java
+++ b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/K8sNamespaceUser.java
@@ -29,11 +29,12 @@ import com.baomidou.mybatisplus.annotation.TableName;
  */
 @TableName("t_ds_relation_namespace_user")
 public class K8sNamespaceUser {
+
     /**
      * id
      */
     @TableId(value = "id", type = IdType.AUTO)
-    private int id;
+    private Integer id;
 
     /**
      * user id
@@ -76,7 +77,7 @@ public class K8sNamespaceUser {
     @TableField("update_time")
     private Date updateTime;
 
-    public int getId() {
+    public Integer getId() {
         return id;
     }
 
@@ -151,14 +152,14 @@ public class K8sNamespaceUser {
     @Override
     public String toString() {
         return "K8sNamespaceUser{" +
-            "id=" + id +
-            ", userId=" + userId +
-            ", namespaceId=" + namespaceId +
-            ", k8s=" + k8s +
-            ", namespaceName=" + namespaceName +
-            ", perm=" + perm +
-            ", createTime=" + createTime +
-            ", updateTime=" + updateTime +
-            '}';
+                "id=" + id +
+                ", userId=" + userId +
+                ", namespaceId=" + namespaceId +
+                ", k8s=" + k8s +
+                ", namespaceName=" + namespaceName +
+                ", perm=" + perm +
+                ", createTime=" + createTime +
+                ", updateTime=" + updateTime +
+                '}';
     }
 }
diff --git a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/PluginDefine.java b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/PluginDefine.java
index 2be8988a08..7c73cdd816 100644
--- a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/PluginDefine.java
+++ b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/PluginDefine.java
@@ -34,7 +34,7 @@ public class PluginDefine {
      * id
      */
     @TableId(value = "id", type = IdType.AUTO)
-    private int id;
+    private Integer id;
 
     /**
      * plugin name
@@ -74,7 +74,7 @@ public class PluginDefine {
         this.updateTime = new Date();
     }
 
-    public int getId() {
+    public Integer getId() {
         return id;
     }
 
@@ -122,4 +122,3 @@ public class PluginDefine {
         this.updateTime = updateTime;
     }
 }
-
diff --git a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/ProcessDefinition.java b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/ProcessDefinition.java
index 80331db34d..f0a9b11872 100644
--- a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/ProcessDefinition.java
+++ b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/ProcessDefinition.java
@@ -46,7 +46,7 @@ public class ProcessDefinition {
      * id
      */
     @TableId(value = "id", type = IdType.AUTO)
-    private int id;
+    private Integer id;
 
     /**
      * code
@@ -171,7 +171,8 @@ public class ProcessDefinition {
      */
     private ProcessExecutionTypeEnum executionType;
 
-    public ProcessDefinition() { }
+    public ProcessDefinition() {
+    }
 
     public ProcessDefinition(long projectCode,
                              String name,
@@ -223,7 +224,7 @@ public class ProcessDefinition {
         this.version = version;
     }
 
-    public int getId() {
+    public Integer getId() {
         return id;
     }
 
@@ -418,44 +419,44 @@ public class ProcessDefinition {
         }
         ProcessDefinition that = (ProcessDefinition) o;
         return projectCode == that.projectCode
-            && userId == that.userId
-            && timeout == that.timeout
-            && tenantId == that.tenantId
-            && Objects.equals(name, that.name)
-            && releaseState == that.releaseState
-            && Objects.equals(description, that.description)
-            && Objects.equals(globalParams, that.globalParams)
-            && flag == that.flag
-            && executionType == that.executionType
-            && Objects.equals(locations, that.locations);
+                && userId == that.userId
+                && timeout == that.timeout
+                && tenantId == that.tenantId
+                && Objects.equals(name, that.name)
+                && releaseState == that.releaseState
+                && Objects.equals(description, that.description)
+                && Objects.equals(globalParams, that.globalParams)
+                && flag == that.flag
+                && executionType == that.executionType
+                && Objects.equals(locations, that.locations);
     }
 
     @Override
     public String toString() {
         return "ProcessDefinition{"
-            + "id=" + id
-            + ", code=" + code
-            + ", name='" + name + '\''
-            + ", version=" + version
-            + ", releaseState=" + releaseState
-            + ", projectCode=" + projectCode
-            + ", description='" + description + '\''
-            + ", globalParams='" + globalParams + '\''
-            + ", globalParamList=" + globalParamList
-            + ", globalParamMap=" + globalParamMap
-            + ", createTime=" + createTime
-            + ", updateTime=" + updateTime
-            + ", flag=" + flag
-            + ", userId=" + userId
-            + ", userName='" + userName + '\''
-            + ", projectName='" + projectName + '\''
-            + ", locations='" + locations + '\''
-            + ", scheduleReleaseState=" + scheduleReleaseState
-            + ", timeout=" + timeout
-            + ", tenantId=" + tenantId
-            + ", tenantCode='" + tenantCode + '\''
-            + ", modifyBy='" + modifyBy + '\''
-            + ", warningGroupId=" + warningGroupId
-            + '}';
+                + "id=" + id
+                + ", code=" + code
+                + ", name='" + name + '\''
+                + ", version=" + version
+                + ", releaseState=" + releaseState
+                + ", projectCode=" + projectCode
+                + ", description='" + description + '\''
+                + ", globalParams='" + globalParams + '\''
+                + ", globalParamList=" + globalParamList
+                + ", globalParamMap=" + globalParamMap
+                + ", createTime=" + createTime
+                + ", updateTime=" + updateTime
+                + ", flag=" + flag
+                + ", userId=" + userId
+                + ", userName='" + userName + '\''
+                + ", projectName='" + projectName + '\''
+                + ", locations='" + locations + '\''
+                + ", scheduleReleaseState=" + scheduleReleaseState
+                + ", timeout=" + timeout
+                + ", tenantId=" + tenantId
+                + ", tenantCode='" + tenantCode + '\''
+                + ", modifyBy='" + modifyBy + '\''
+                + ", warningGroupId=" + warningGroupId
+                + '}';
     }
 }
diff --git a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/ProcessInstance.java b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/ProcessInstance.java
index c9608416d1..df85c72cc5 100644
--- a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/ProcessInstance.java
+++ b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/ProcessInstance.java
@@ -17,9 +17,6 @@
 
 package org.apache.dolphinscheduler.dao.entity;
 
-import lombok.Data;
-import lombok.NoArgsConstructor;
-
 import org.apache.dolphinscheduler.common.enums.CommandType;
 import org.apache.dolphinscheduler.common.enums.FailureStrategy;
 import org.apache.dolphinscheduler.common.enums.Flag;
@@ -31,6 +28,9 @@ import org.apache.dolphinscheduler.common.utils.DateUtils;
 
 import java.util.Date;
 
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
@@ -49,7 +49,7 @@ public class ProcessInstance {
      * id
      */
     @TableId(value = "id", type = IdType.AUTO)
-    private int id;
+    private Integer id;
 
     /**
      * process definition code
diff --git a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/ProcessInstanceMap.java b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/ProcessInstanceMap.java
index 4cd2186f18..817998bf66 100644
--- a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/ProcessInstanceMap.java
+++ b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/ProcessInstanceMap.java
@@ -31,7 +31,7 @@ public class ProcessInstanceMap {
      * id
      */
     @TableId(value = "id", type = IdType.AUTO)
-    private int id;
+    private Integer id;
 
     /**
      * parent process instance id
@@ -48,7 +48,7 @@ public class ProcessInstanceMap {
      */
     private int processInstanceId;
 
-    public int getId() {
+    public Integer getId() {
         return id;
     }
 
diff --git a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/ProcessTaskRelation.java b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/ProcessTaskRelation.java
index 4f999b6c06..2946e38667 100644
--- a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/ProcessTaskRelation.java
+++ b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/ProcessTaskRelation.java
@@ -39,7 +39,7 @@ public class ProcessTaskRelation {
      * id
      */
     @TableId(value = "id", type = IdType.AUTO)
-    private int id;
+    private Integer id;
 
     /**
      * name
@@ -140,7 +140,7 @@ public class ProcessTaskRelation {
         this.name = name;
     }
 
-    public int getId() {
+    public Integer getId() {
         return id;
     }
 
@@ -246,36 +246,37 @@ public class ProcessTaskRelation {
         }
         ProcessTaskRelation that = (ProcessTaskRelation) o;
         return processDefinitionVersion == that.processDefinitionVersion
-            && projectCode == that.projectCode
-            && processDefinitionCode == that.processDefinitionCode
-            && preTaskCode == that.preTaskCode
-            && preTaskVersion == that.preTaskVersion
-            && postTaskCode == that.postTaskCode
-            && postTaskVersion == that.postTaskVersion
-            && Objects.equals(name, that.name);
+                && projectCode == that.projectCode
+                && processDefinitionCode == that.processDefinitionCode
+                && preTaskCode == that.preTaskCode
+                && preTaskVersion == that.preTaskVersion
+                && postTaskCode == that.postTaskCode
+                && postTaskVersion == that.postTaskVersion
+                && Objects.equals(name, that.name);
     }
 
     @Override
     public int hashCode() {
-        return Objects.hash(name, processDefinitionVersion, projectCode, processDefinitionCode, preTaskCode, preTaskVersion, postTaskCode, postTaskVersion);
+        return Objects.hash(name, processDefinitionVersion, projectCode, processDefinitionCode, preTaskCode,
+                preTaskVersion, postTaskCode, postTaskVersion);
     }
 
     @Override
     public String toString() {
         return "ProcessTaskRelation{"
-            + "id=" + id
-            + ", name='" + name + '\''
-            + ", processDefinitionVersion=" + processDefinitionVersion
-            + ", projectCode=" + projectCode
-            + ", processDefinitionCode=" + processDefinitionCode
-            + ", preTaskCode=" + preTaskCode
-            + ", preTaskVersion=" + preTaskVersion
-            + ", postTaskCode=" + postTaskCode
-            + ", postTaskVersion=" + postTaskVersion
-            + ", conditionType=" + conditionType
-            + ", conditionParams='" + conditionParams + '\''
-            + ", createTime=" + createTime
-            + ", updateTime=" + updateTime
-            + '}';
+                + "id=" + id
+                + ", name='" + name + '\''
+                + ", processDefinitionVersion=" + processDefinitionVersion
+                + ", projectCode=" + projectCode
+                + ", processDefinitionCode=" + processDefinitionCode
+                + ", preTaskCode=" + preTaskCode
+                + ", preTaskVersion=" + preTaskVersion
+                + ", postTaskCode=" + postTaskCode
+                + ", postTaskVersion=" + postTaskVersion
+                + ", conditionType=" + conditionType
+                + ", conditionParams='" + conditionParams + '\''
+                + ", createTime=" + createTime
+                + ", updateTime=" + updateTime
+                + '}';
     }
 }
diff --git a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/Project.java b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/Project.java
index 2a41c01306..ab0ec861ea 100644
--- a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/Project.java
+++ b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/Project.java
@@ -34,7 +34,7 @@ public class Project {
      * id
      */
     @TableId(value = "id", type = IdType.AUTO)
-    private int id;
+    private Integer id;
 
     /**
      * user id
@@ -115,7 +115,7 @@ public class Project {
         this.instRunningCount = instRunningCount;
     }
 
-    public int getId() {
+    public Integer getId() {
         return id;
     }
 
@@ -226,6 +226,7 @@ public class Project {
     }
 
     public static final class Builder {
+
         private int id;
         private int userId;
         private String userName;
diff --git a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/ProjectUser.java b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/ProjectUser.java
index 63c292ea10..e4de108250 100644
--- a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/ProjectUser.java
+++ b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/ProjectUser.java
@@ -26,11 +26,12 @@ import com.baomidou.mybatisplus.annotation.TableName;
 
 @TableName("t_ds_relation_project_user")
 public class ProjectUser {
+
     /**
      * id
      */
     @TableId(value = "id", type = IdType.AUTO)
-    private int id;
+    private Integer id;
 
     @TableField("user_id")
     private int userId;
@@ -67,7 +68,7 @@ public class ProjectUser {
     @TableField("update_time")
     private Date updateTime;
 
-    public int getId() {
+    public Integer getId() {
         return id;
     }
 
@@ -142,15 +143,15 @@ public class ProjectUser {
     @Override
     public String toString() {
         return "ProjectUser{"
-               + "id=" + id
-               + ", userId=" + userId
-               + ", projectId=" + projectId
-               + ", projectCode=" + projectCode
-               + ", projectName='" + projectName + '\''
-               + ", userName='" + userName + '\''
-               + ", perm=" + perm
-               + ", createTime=" + createTime
-               + ", updateTime=" + updateTime
-               + '}';
+                + "id=" + id
+                + ", userId=" + userId
+                + ", projectId=" + projectId
+                + ", projectCode=" + projectCode
+                + ", projectName='" + projectName + '\''
+                + ", userName='" + userName + '\''
+                + ", perm=" + perm
+                + ", createTime=" + createTime
+                + ", updateTime=" + updateTime
+                + '}';
     }
 }
diff --git a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/Queue.java b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/Queue.java
index cc423e13ca..6d7261d195 100644
--- a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/Queue.java
+++ b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/Queue.java
@@ -16,12 +16,12 @@
  */
 package org.apache.dolphinscheduler.dao.entity;
 
+import java.util.Date;
+
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
 
-import java.util.Date;
-
 /**
  * queue
  */
@@ -31,8 +31,8 @@ public class Queue {
     /**
      * id
      */
-    @TableId(value="id", type=IdType.AUTO)
-    private int id;
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
     /**
      * queue name
      */
@@ -71,7 +71,7 @@ public class Queue {
         this.updateTime = now;
     }
 
-    public int getId() {
+    public Integer getId() {
         return id;
     }
 
diff --git a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/Resource.java b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/Resource.java
index 1cafe09291..95a9078f99 100644
--- a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/Resource.java
+++ b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/Resource.java
@@ -17,22 +17,23 @@
 
 package org.apache.dolphinscheduler.dao.entity;
 
-import com.baomidou.mybatisplus.annotation.TableField;
 import org.apache.dolphinscheduler.spi.enums.ResourceType;
 
 import java.util.Date;
 
 import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
 
 @TableName("t_ds_resources")
 public class Resource {
+
     /**
      * id
      */
     @TableId(value = "id", type = IdType.AUTO)
-    private int id;
+    private Integer id;
 
     /**
      * parent id
@@ -95,7 +96,6 @@ public class Resource {
     @TableField(exist = false)
     private String userName;
 
-
     public Resource() {
     }
 
@@ -121,7 +121,8 @@ public class Resource {
         this.isDirectory = isDirectory;
     }
 
-    public Resource(int pid, String alias, String fullName, boolean isDirectory, String description, String fileName, int userId, ResourceType type, long size, Date createTime, Date updateTime) {
+    public Resource(int pid, String alias, String fullName, boolean isDirectory, String description, String fileName,
+                    int userId, ResourceType type, long size, Date createTime, Date updateTime) {
         this.pid = pid;
         this.alias = alias;
         this.fullName = fullName;
@@ -135,7 +136,7 @@ public class Resource {
         this.updateTime = updateTime;
     }
 
-    public int getId() {
+    public Integer getId() {
         return id;
     }
 
@@ -199,7 +200,6 @@ public class Resource {
         this.userId = userId;
     }
 
-
     public ResourceType getType() {
         return type;
     }
@@ -243,20 +243,20 @@ public class Resource {
     @Override
     public String toString() {
         return "Resource{" +
-            "id=" + id +
-            ", pid=" + pid +
-            ", alias='" + alias + '\'' +
-            ", fullName='" + fullName + '\'' +
-            ", isDirectory=" + isDirectory +
-            ", description='" + description + '\'' +
-            ", fileName='" + fileName + '\'' +
-            ", userId=" + userId +
-            ", type=" + type +
-            ", size=" + size +
-            ", createTime=" + createTime +
-            ", updateTime=" + updateTime +
-            ",userName=" + userName +
-            '}';
+                "id=" + id +
+                ", pid=" + pid +
+                ", alias='" + alias + '\'' +
+                ", fullName='" + fullName + '\'' +
+                ", isDirectory=" + isDirectory +
+                ", description='" + description + '\'' +
+                ", fileName='" + fileName + '\'' +
+                ", userId=" + userId +
+                ", type=" + type +
+                ", size=" + size +
+                ", createTime=" + createTime +
+                ", updateTime=" + updateTime +
+                ",userName=" + userName +
+                '}';
     }
 
     @Override
diff --git a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/Schedule.java b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/Schedule.java
index 4d21f25e25..bafd40df0a 100644
--- a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/Schedule.java
+++ b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/Schedule.java
@@ -37,7 +37,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
 public class Schedule {
 
     @TableId(value = "id", type = IdType.AUTO)
-    private int id;
+    private Integer id;
 
     /**
      * process definition code
@@ -124,7 +124,6 @@ public class Schedule {
      */
     private int warningGroupId;
 
-
     /**
      * process instance priority
      */
@@ -263,7 +262,7 @@ public class Schedule {
         this.userName = userName;
     }
 
-    public int getId() {
+    public Integer getId() {
         return id;
     }
 
diff --git a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/TaskDefinition.java b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/TaskDefinition.java
index 2db49f9e07..e2b81b53b5 100644
--- a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/TaskDefinition.java
+++ b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/TaskDefinition.java
@@ -21,12 +21,13 @@ import org.apache.dolphinscheduler.common.Constants;
 import org.apache.dolphinscheduler.common.enums.Flag;
 import org.apache.dolphinscheduler.common.enums.Priority;
 import org.apache.dolphinscheduler.common.enums.TaskExecuteType;
-import org.apache.dolphinscheduler.plugin.task.api.enums.TaskTimeoutStrategy;
 import org.apache.dolphinscheduler.common.enums.TimeoutFlag;
 import org.apache.dolphinscheduler.common.utils.JSONUtils;
+import org.apache.dolphinscheduler.plugin.task.api.enums.TaskTimeoutStrategy;
 import org.apache.dolphinscheduler.plugin.task.api.model.Property;
 
 import org.apache.commons.collections4.CollectionUtils;
+
 import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
@@ -53,7 +54,7 @@ public class TaskDefinition {
      * id
      */
     @TableId(value = "id", type = IdType.AUTO)
-    private int id;
+    private Integer id;
 
     /**
      * code
@@ -241,7 +242,7 @@ public class TaskDefinition {
         this.name = name;
     }
 
-    public int getId() {
+    public Integer getId() {
         return id;
     }
 
@@ -326,7 +327,7 @@ public class TaskDefinition {
         if (taskParamMap == null && !Strings.isNullOrEmpty(taskParams)) {
             JsonNode localParams = JSONUtils.parseObject(taskParams).findValue("localParams");
 
-            //If a jsonNode is null, not only use !=null, but also it should use the isNull method to be estimated.
+            // If a jsonNode is null, not only use !=null, but also it should use the isNull method to be estimated.
             if (localParams != null && !localParams.isNull()) {
                 List<Property> propList = JSONUtils.toList(localParams.toString(), Property.class);
 
@@ -504,27 +505,27 @@ public class TaskDefinition {
         }
         TaskDefinition that = (TaskDefinition) o;
         return failRetryTimes == that.failRetryTimes
-            && failRetryInterval == that.failRetryInterval
-            && timeout == that.timeout
-            && delayTime == that.delayTime
-            && Objects.equals(name, that.name)
-            && Objects.equals(description, that.description)
-            && Objects.equals(taskType, that.taskType)
-            && Objects.equals(taskParams, that.taskParams)
-            && flag == that.flag
-            && taskPriority == that.taskPriority
-            && Objects.equals(workerGroup, that.workerGroup)
-            && timeoutFlag == that.timeoutFlag
-            && timeoutNotifyStrategy == that.timeoutNotifyStrategy
-            && (Objects.equals(resourceIds, that.resourceIds)
-            || ("".equals(resourceIds) && that.resourceIds == null)
-            || ("".equals(that.resourceIds) && resourceIds == null))
-            && environmentCode == that.environmentCode
-            && taskGroupId == that.taskGroupId
-            && taskGroupPriority == that.taskGroupPriority
-            && Objects.equals(cpuQuota, that.cpuQuota)
-            && Objects.equals(memoryMax, that.memoryMax)
-            && Objects.equals(taskExecuteType, that.taskExecuteType);
+                && failRetryInterval == that.failRetryInterval
+                && timeout == that.timeout
+                && delayTime == that.delayTime
+                && Objects.equals(name, that.name)
+                && Objects.equals(description, that.description)
+                && Objects.equals(taskType, that.taskType)
+                && Objects.equals(taskParams, that.taskParams)
+                && flag == that.flag
+                && taskPriority == that.taskPriority
+                && Objects.equals(workerGroup, that.workerGroup)
+                && timeoutFlag == that.timeoutFlag
+                && timeoutNotifyStrategy == that.timeoutNotifyStrategy
+                && (Objects.equals(resourceIds, that.resourceIds)
+                        || ("".equals(resourceIds) && that.resourceIds == null)
+                        || ("".equals(that.resourceIds) && resourceIds == null))
+                && environmentCode == that.environmentCode
+                && taskGroupId == that.taskGroupId
+                && taskGroupPriority == that.taskGroupPriority
+                && Objects.equals(cpuQuota, that.cpuQuota)
+                && Objects.equals(memoryMax, that.memoryMax)
+                && Objects.equals(taskExecuteType, that.taskExecuteType);
     }
 
     @Override
diff --git a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/TaskGroup.java b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/TaskGroup.java
index cbb3b3008c..34576d5974 100644
--- a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/TaskGroup.java
+++ b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/TaskGroup.java
@@ -29,6 +29,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
  */
 @TableName("t_ds_task_group")
 public class TaskGroup implements Serializable {
+
     /**
      * key
      */
@@ -69,7 +70,7 @@ public class TaskGroup implements Serializable {
      */
     private long projectCode;
 
-    public TaskGroup(String name,long projectCode, String description, int groupSize, int userId,int status) {
+    public TaskGroup(String name, long projectCode, String description, int groupSize, int userId, int status) {
         this.name = name;
         this.projectCode = projectCode;
         this.description = description;
@@ -104,7 +105,7 @@ public class TaskGroup implements Serializable {
                 + '}';
     }
 
-    public int getId() {
+    public Integer getId() {
         return id;
     }
 
diff --git a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/TaskGroupQueue.java b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/TaskGroupQueue.java
index b9959eb96e..2f50ab345a 100644
--- a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/TaskGroupQueue.java
+++ b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/TaskGroupQueue.java
@@ -32,11 +32,12 @@ import com.baomidou.mybatisplus.annotation.TableName;
  */
 @TableName("t_ds_task_group_queue")
 public class TaskGroupQueue implements Serializable {
+
     /**
      * key
      */
     @TableId(value = "id", type = IdType.AUTO)
-    private int id;
+    private Integer id;
     /**
      * taskInstanceId
      */
@@ -99,7 +100,8 @@ public class TaskGroupQueue implements Serializable {
 
     }
 
-    public TaskGroupQueue(int taskId, String taskName, int groupId, int processId, int priority, TaskGroupQueueStatus status) {
+    public TaskGroupQueue(int taskId, String taskName, int groupId, int processId, int priority,
+                          TaskGroupQueueStatus status) {
         this.taskId = taskId;
         this.taskName = taskName;
         this.groupId = groupId;
@@ -108,7 +110,7 @@ public class TaskGroupQueue implements Serializable {
         this.status = status;
     }
 
-    public int getId() {
+    public Integer getId() {
         return id;
     }
 
@@ -175,16 +177,16 @@ public class TaskGroupQueue implements Serializable {
     @Override
     public String toString() {
         return "TaskGroupQueue{"
-            + "id=" + id
-            + ", taskId=" + taskId
-            + ", taskName='" + taskName + '\''
-            + ", groupId=" + groupId
-            + ", processId=" + processId
-            + ", priority=" + priority
-            + ", status=" + status
-            + ", createTime=" + createTime
-            + ", updateTime=" + updateTime
-            + '}';
+                + "id=" + id
+                + ", taskId=" + taskId
+                + ", taskName='" + taskName + '\''
+                + ", groupId=" + groupId
+                + ", processId=" + processId
+                + ", priority=" + priority
+                + ", status=" + status
+                + ", createTime=" + createTime
+                + ", updateTime=" + updateTime
+                + '}';
     }
 
     public TaskGroupQueueStatus getStatus() {
diff --git a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/TaskInstance.java b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/TaskInstance.java
index 91d82df089..08ab6d11ac 100644
--- a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/TaskInstance.java
+++ b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/TaskInstance.java
@@ -38,14 +38,14 @@ import java.io.Serializable;
 import java.util.Date;
 import java.util.Map;
 
+import lombok.Data;
+
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.fasterxml.jackson.core.type.TypeReference;
 
-import lombok.Data;
-
 /**
  * task instance
  */
@@ -57,7 +57,7 @@ public class TaskInstance implements Serializable {
      * id
      */
     @TableId(value = "id", type = IdType.AUTO)
-    private int id;
+    private Integer id;
 
     /**
      * task name
@@ -371,7 +371,6 @@ public class TaskInstance implements Serializable {
         return endTime == null;
     }
 
-
     /**
      * determine if a task instance can retry
      * if subProcess,
diff --git a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/Tenant.java b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/Tenant.java
index d6a548151e..6892db0afb 100644
--- a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/Tenant.java
+++ b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/Tenant.java
@@ -16,14 +16,14 @@
  */
 package org.apache.dolphinscheduler.dao.entity;
 
+import java.util.Date;
+import java.util.Objects;
+
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
 
-import java.util.Date;
-import java.util.Objects;
-
 /**
  * tenant
  */
@@ -33,8 +33,8 @@ public class Tenant {
     /**
      * id
      */
-    @TableId(value="id", type=IdType.AUTO)
-    private int id;
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
 
     /**
      * tenant code
@@ -94,7 +94,7 @@ public class Tenant {
         this.updateTime = now;
     }
 
-    public int getId() {
+    public Integer getId() {
         return id;
     }
 
diff --git a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/UdfFunc.java b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/UdfFunc.java
index 8eb4d20033..6615d3394f 100644
--- a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/UdfFunc.java
+++ b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/UdfFunc.java
@@ -17,6 +17,12 @@
 
 package org.apache.dolphinscheduler.dao.entity;
 
+import org.apache.dolphinscheduler.common.enums.UdfType;
+import org.apache.dolphinscheduler.common.utils.JSONUtils;
+
+import java.io.IOException;
+import java.util.Date;
+
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
@@ -24,22 +30,18 @@ import com.baomidou.mybatisplus.annotation.TableName;
 import com.fasterxml.jackson.databind.DeserializationContext;
 import com.fasterxml.jackson.databind.KeyDeserializer;
 import com.google.common.base.Strings;
-import org.apache.dolphinscheduler.common.enums.UdfType;
-import org.apache.dolphinscheduler.common.utils.JSONUtils;
-
-import java.io.IOException;
-import java.util.Date;
 
 /**
  * udf function
  */
 @TableName("t_ds_udfs")
 public class UdfFunc {
+
     /**
      * id
      */
     @TableId(value = "id", type = IdType.AUTO)
-    private int id;
+    private Integer id;
     /**
      * user id
      */
@@ -111,7 +113,7 @@ public class UdfFunc {
     @TableField(exist = false)
     private String userName;
 
-    public int getId() {
+    public Integer getId() {
         return id;
     }
 
@@ -199,7 +201,6 @@ public class UdfFunc {
         this.createTime = createTime;
     }
 
-
     public Date getUpdateTime() {
         return updateTime;
     }
@@ -246,7 +247,7 @@ public class UdfFunc {
         return JSONUtils.toJsonString(this);
     }
 
-    public static  class UdfFuncDeserializer extends KeyDeserializer {
+    public static class UdfFuncDeserializer extends KeyDeserializer {
 
         @Override
         public Object deserializeKey(String key, DeserializationContext ctxt) throws IOException {
diff --git a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/User.java b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/User.java
index c0e61fffd7..a4aaa1f6d0 100644
--- a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/User.java
+++ b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/User.java
@@ -18,24 +18,25 @@
 package org.apache.dolphinscheduler.dao.entity;
 
 import org.apache.dolphinscheduler.common.enums.UserType;
+
+import java.util.Date;
+
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
 
-import java.util.Date;
-
 /**
  * user
  */
 @TableName("t_ds_user")
-public class  User {
+public class User {
 
     /**
      * id
      */
-    @TableId(value="id", type=IdType.AUTO)
-    private int id;
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
 
     /**
      * user name
@@ -110,7 +111,7 @@ public class  User {
      */
     private Date updateTime;
 
-    public int getId() {
+    public Integer getId() {
         return id;
     }
 
@@ -174,7 +175,6 @@ public class  User {
         this.updateTime = updateTime;
     }
 
-
     public String getPhone() {
         return phone;
     }
@@ -270,7 +270,7 @@ public class  User {
                 ", tenantCode='" + tenantCode + '\'' +
                 ", queueName='" + queueName + '\'' +
                 ", alertGroup='" + alertGroup + '\'' +
-                ", queue='" + queue + '\''  +
+                ", queue='" + queue + '\'' +
                 ", timeZone='" + timeZone + '\'' +
                 ", createTime=" + createTime +
                 ", updateTime=" + updateTime +
diff --git a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/WorkerGroup.java b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/WorkerGroup.java
index 2fdd711549..c7c50ccb33 100644
--- a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/WorkerGroup.java
+++ b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/WorkerGroup.java
@@ -19,11 +19,12 @@ package org.apache.dolphinscheduler.dao.entity;
 
 import java.util.Date;
 
+import lombok.Data;
+
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
-import lombok.Data;
 
 /**
  * worker group
@@ -33,7 +34,7 @@ import lombok.Data;
 public class WorkerGroup {
 
     @TableId(value = "id", type = IdType.AUTO)
-    private int id;
+    private Integer id;
 
     private String name;
 
diff --git a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/WorkerServer.java b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/WorkerServer.java
index 3fbbf71f74..28fd5b3749 100644
--- a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/WorkerServer.java
+++ b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/WorkerServer.java
@@ -36,7 +36,6 @@ public class WorkerServer {
      */
     private int port;
 
-
     /**
      * zookeeper directory
      */
@@ -57,7 +56,7 @@ public class WorkerServer {
      */
     private Date lastHeartbeatTime;
 
-    public int getId() {
+    public Integer getId() {
         return id;
     }
 
diff --git a/dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/mapper/CommandMapperTest.java b/dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/mapper/CommandMapperTest.java
index 975a910bf1..bab5d103a9 100644
--- a/dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/mapper/CommandMapperTest.java
+++ b/dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/mapper/CommandMapperTest.java
@@ -64,7 +64,7 @@ public class CommandMapperTest extends BaseDaoTest {
     @Test
     public void testInsert() {
         Command command = createCommand();
-        assertThat(command.getId(),greaterThan(0));
+        assertThat(command.getId(), greaterThan(0));
     }
 
     /**
@@ -73,7 +73,7 @@ public class CommandMapperTest extends BaseDaoTest {
     @Test
     public void testSelectById() {
         Command expectedCommand = createCommand();
-        //query
+        // query
         Command actualCommand = commandMapper.selectById(expectedCommand.getId());
 
         assertNotNull(actualCommand);
@@ -96,7 +96,7 @@ public class CommandMapperTest extends BaseDaoTest {
         Command actualCommand = commandMapper.selectById(expectedCommand.getId());
 
         assertNotNull(actualCommand);
-        assertEquals(expectedCommand.getUpdateTime(),actualCommand.getUpdateTime());
+        assertEquals(expectedCommand.getUpdateTime(), actualCommand.getUpdateTime());
 
     }
 
@@ -114,8 +114,6 @@ public class CommandMapperTest extends BaseDaoTest {
         assertNull(actualCommand);
     }
 
-
-
     /**
      * test query all
      */
@@ -140,7 +138,7 @@ public class CommandMapperTest extends BaseDaoTest {
 
         createCommand(CommandType.START_PROCESS, processDefinition.getCode());
 
-        List<Command> actualCommand = commandMapper.queryCommandPage(1,0);
+        List<Command> actualCommand = commandMapper.queryCommandPage(1, 0);
 
         assertNotNull(actualCommand);
     }
@@ -164,7 +162,7 @@ public class CommandMapperTest extends BaseDaoTest {
 
         List<CommandCount> actualCommandCounts = commandMapper.countCommandState(startTime, endTime, projectCodeArray);
 
-        assertThat(actualCommandCounts.size(),greaterThanOrEqualTo(1));
+        assertThat(actualCommandCounts.size(), greaterThanOrEqualTo(1));
     }
 
     /**
@@ -175,19 +173,19 @@ public class CommandMapperTest extends BaseDaoTest {
         int masterCount = 4;
         int thisMasterSlot = 2;
         // for hit or miss
-        toTestQueryCommandPageBySlot(masterCount,thisMasterSlot);
-        toTestQueryCommandPageBySlot(masterCount,thisMasterSlot);
-        toTestQueryCommandPageBySlot(masterCount,thisMasterSlot);
-        toTestQueryCommandPageBySlot(masterCount,thisMasterSlot);
+        toTestQueryCommandPageBySlot(masterCount, thisMasterSlot);
+        toTestQueryCommandPageBySlot(masterCount, thisMasterSlot);
+        toTestQueryCommandPageBySlot(masterCount, thisMasterSlot);
+        toTestQueryCommandPageBySlot(masterCount, thisMasterSlot);
     }
 
     private boolean toTestQueryCommandPageBySlot(int masterCount, int thisMasterSlot) {
         Command command = createCommand();
-        int id = command.getId();
+        Integer id = command.getId();
         boolean hit = id % masterCount == thisMasterSlot;
         List<Command> commandList = commandMapper.queryCommandPageBySlot(1, 0, masterCount, thisMasterSlot);
         if (hit) {
-            assertEquals(id,commandList.get(0).getId());
+            assertEquals(id, commandList.get(0).getId());
         } else {
             commandList.forEach(o -> {
                 assertNotEquals(id, o.getId());
@@ -197,8 +195,6 @@ public class CommandMapperTest extends BaseDaoTest {
         return hit;
     }
 
-
-
     /**
      * create command map
      * @param count map count
@@ -207,13 +203,13 @@ public class CommandMapperTest extends BaseDaoTest {
      * @return command map
      */
     private CommandCount createCommandMap(
-            Integer count,
-            CommandType commandType,
-            long processDefinitionCode) {
+                                          Integer count,
+                                          CommandType commandType,
+                                          long processDefinitionCode) {
 
         CommandCount commandCount = new CommandCount();
 
-        for (int i = 0;i < count;i++) {
+        for (int i = 0; i < count; i++) {
             createCommand(commandType, processDefinitionCode);
         }
         commandCount.setCommandType(commandType);
@@ -246,12 +242,12 @@ public class CommandMapperTest extends BaseDaoTest {
      * @param count map count
      * @return command map
      */
-    private Map<Integer,Command> createCommandMap(Integer count) {
-        Map<Integer,Command> commandMap = new HashMap<>();
+    private Map<Integer, Command> createCommandMap(Integer count) {
+        Map<Integer, Command> commandMap = new HashMap<>();
 
-        for (int i = 0;i < count;i++) {
+        for (int i = 0; i < count; i++) {
             Command command = createCommand();
-            commandMap.put(command.getId(),command);
+            commandMap.put(command.getId(), command);
         }
         return commandMap;
     }
@@ -261,7 +257,7 @@ public class CommandMapperTest extends BaseDaoTest {
      * @return
      */
     private Command createCommand() {
-        return createCommand(CommandType.START_PROCESS,1);
+        return createCommand(CommandType.START_PROCESS, 1);
     }
 
     /**
diff --git a/dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/mapper/DataSourceMapperTest.java b/dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/mapper/DataSourceMapperTest.java
index 949bf7bbd5..606cec6816 100644
--- a/dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/mapper/DataSourceMapperTest.java
+++ b/dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/mapper/DataSourceMapperTest.java
@@ -18,7 +18,6 @@
 package org.apache.dolphinscheduler.dao.mapper;
 
 import static java.util.stream.Collectors.toList;
-
 import static org.hamcrest.Matchers.greaterThan;
 import static org.hamcrest.Matchers.greaterThanOrEqualTo;
 import static org.junit.Assert.assertEquals;
@@ -86,7 +85,6 @@ public class DataSourceMapperTest extends BaseDaoTest {
         assertEquals(expectedDataSource, actualDataSource);
     }
 
-
     /**
      * test query
      */
@@ -108,7 +106,6 @@ public class DataSourceMapperTest extends BaseDaoTest {
         assertEquals(expectedDataSource, actualDataSource);
     }
 
-
     /**
      * test delete
      */
@@ -123,8 +120,6 @@ public class DataSourceMapperTest extends BaseDaoTest {
         assertNull(actualDataSource);
     }
 
-
-
     /**
      * test query datasource by type
      */
@@ -142,7 +137,7 @@ public class DataSourceMapperTest extends BaseDaoTest {
         for (DataSource actualDataSource : actualDataSources) {
             DataSource expectedDataSource = datasourceMap.get(actualDataSource.getId());
             if (expectedDataSource != null) {
-                assertEquals(expectedDataSource,actualDataSource);
+                assertEquals(expectedDataSource, actualDataSource);
             }
         }
 
@@ -166,7 +161,7 @@ public class DataSourceMapperTest extends BaseDaoTest {
         for (DataSource actualDataSource : actualDataSources) {
             DataSource expectedDataSource = expectedDataSourceMap.get(actualDataSource.getId());
             if (expectedDataSource != null) {
-                assertEquals(expectedDataSource,actualDataSource);
+                assertEquals(expectedDataSource, actualDataSource);
             }
         }
 
@@ -184,7 +179,7 @@ public class DataSourceMapperTest extends BaseDaoTest {
 
         for (DataSource actualDataSource : actualDataSources) {
             if (expectedDataSource.getId() == actualDataSource.getId()) {
-                assertEquals(expectedDataSource,actualDataSource);
+                assertEquals(expectedDataSource, actualDataSource);
             }
         }
 
@@ -205,7 +200,7 @@ public class DataSourceMapperTest extends BaseDaoTest {
         for (DataSource actualDataSource : actualDataSources) {
             DataSource expectedDataSource = expectedDataSourceMap.get(actualDataSource.getId());
             if (expectedDataSource != null) {
-                assertEquals(expectedDataSource,actualDataSource);
+                assertEquals(expectedDataSource, actualDataSource);
             }
         }
 
@@ -226,7 +221,7 @@ public class DataSourceMapperTest extends BaseDaoTest {
         for (DataSource actualDataSource : actualDataSources) {
             DataSource expectedDataSource = expectedDataSourceMap.get(actualDataSource.getId());
             if (expectedDataSource != null) {
-                assertEquals(expectedDataSource,actualDataSource);
+                assertEquals(expectedDataSource, actualDataSource);
             }
         }
     }
@@ -247,48 +242,51 @@ public class DataSourceMapperTest extends BaseDaoTest {
         for (DataSource actualDataSource : actualDataSources) {
             DataSource expectedDataSource = expectedDataSourceMap.get(actualDataSource.getId());
             if (expectedDataSource != null) {
-                assertEquals(expectedDataSource,actualDataSource);
+                assertEquals(expectedDataSource, actualDataSource);
             }
         }
     }
 
     @Test
     public void testListAuthorizedDataSource() {
-        //create general user
+        // create general user
         User generalUser1 = createGeneralUser("user1");
         User generalUser2 = createGeneralUser("user2");
 
-        //create data source
+        // create data source
         DataSource dataSource = createDataSource(generalUser1.getId(), "ds-1");
         DataSource unauthorizdDataSource = createDataSource(generalUser2.getId(), "ds-2");
 
-        //data source ids
+        // data source ids
         Integer[] dataSourceIds = new Integer[]{dataSource.getId(), unauthorizdDataSource.getId()};
 
-        List<DataSource> authorizedDataSource = dataSourceMapper.listAuthorizedDataSource(generalUser1.getId(), dataSourceIds);
+        List<DataSource> authorizedDataSource =
+                dataSourceMapper.listAuthorizedDataSource(generalUser1.getId(), dataSourceIds);
 
-        assertEquals(generalUser1.getId(), dataSource.getUserId());
-        Assert.assertNotEquals(generalUser1.getId(), unauthorizdDataSource.getUserId());
-        Assert.assertFalse(authorizedDataSource.stream().map(t -> t.getId()).collect(toList()).containsAll(Arrays.asList(dataSourceIds)));
+        assertEquals(generalUser1.getId().intValue(), dataSource.getUserId());
+        Assert.assertNotEquals(generalUser1.getId().intValue(), unauthorizdDataSource.getUserId());
+        Assert.assertFalse(authorizedDataSource.stream().map(t -> t.getId()).collect(toList())
+                .containsAll(Arrays.asList(dataSourceIds)));
 
-        //authorize object unauthorizdDataSource to generalUser1
+        // authorize object unauthorizdDataSource to generalUser1
         createUserDataSource(generalUser1, unauthorizdDataSource);
         authorizedDataSource = dataSourceMapper.listAuthorizedDataSource(generalUser1.getId(), dataSourceIds);
 
-        Assert.assertTrue(authorizedDataSource.stream().map(t -> t.getId()).collect(toList()).containsAll(Arrays.asList(dataSourceIds)));
+        Assert.assertTrue(authorizedDataSource.stream().map(t -> t.getId()).collect(toList())
+                .containsAll(Arrays.asList(dataSourceIds)));
     }
 
     /**
      * create datasource relation
      * @param userId
      */
-    private Map<Integer,DataSource> createDataSourceMap(Integer userId,String name) {
+    private Map<Integer, DataSource> createDataSourceMap(Integer userId, String name) {
 
-        Map<Integer,DataSource> dataSourceMap = new HashMap<>();
+        Map<Integer, DataSource> dataSourceMap = new HashMap<>();
 
         DataSource dataSource = createDataSource(userId, name);
 
-        dataSourceMap.put(dataSource.getId(),dataSource);
+        dataSourceMap.put(dataSource.getId(), dataSource);
 
         DataSource otherDataSource = createDataSource(userId + 1, name + "1");
 
@@ -312,12 +310,12 @@ public class DataSourceMapperTest extends BaseDaoTest {
      * @param count datasource count
      * @return datasource map
      */
-    private Map<Integer,DataSource> createDataSourceMap(Integer count) {
-        Map<Integer,DataSource> dataSourceMap = new HashMap<>();
+    private Map<Integer, DataSource> createDataSourceMap(Integer count) {
+        Map<Integer, DataSource> dataSourceMap = new HashMap<>();
 
         for (int i = 0; i < count; i++) {
             DataSource dataSource = createDataSource("test");
-            dataSourceMap.put(dataSource.getId(),dataSource);
+            dataSourceMap.put(dataSource.getId(), dataSource);
         }
 
         return dataSourceMap;
@@ -328,7 +326,7 @@ public class DataSourceMapperTest extends BaseDaoTest {
      * @return datasource
      */
     private DataSource createDataSource() {
-        return createDataSource(1,"test");
+        return createDataSource(1, "test");
     }
 
     /**
@@ -337,7 +335,7 @@ public class DataSourceMapperTest extends BaseDaoTest {
      * @return datasource
      */
     private DataSource createDataSource(String name) {
-        return createDataSource(1,name);
+        return createDataSource(1, name);
     }
 
     /**
@@ -346,7 +344,7 @@ public class DataSourceMapperTest extends BaseDaoTest {
      * @param name name
      * @return datasource
      */
-    private DataSource createDataSource(Integer userId,String name) {
+    private DataSource createDataSource(Integer userId, String name) {
         Random random = new Random();
         DataSource dataSource = new DataSource();
         dataSource.setUserId(userId);
@@ -399,4 +397,4 @@ public class DataSourceMapperTest extends BaseDaoTest {
         return datasourceUser;
     }
 
-}
\ No newline at end of file
+}
diff --git a/dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/mapper/ProcessDefinitionLogMapperTest.java b/dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/mapper/ProcessDefinitionLogMapperTest.java
index 405bc8628b..1c2c08889a 100644
--- a/dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/mapper/ProcessDefinitionLogMapperTest.java
+++ b/dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/mapper/ProcessDefinitionLogMapperTest.java
@@ -34,6 +34,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 
 public class ProcessDefinitionLogMapperTest extends BaseDaoTest {
+
     @Autowired
     private UserMapper userMapper;
 
@@ -49,7 +50,7 @@ public class ProcessDefinitionLogMapperTest extends BaseDaoTest {
      * @return ProcessDefinition
      */
     private ProcessDefinitionLog insertOne() {
-        //insertOne
+        // insertOne
         ProcessDefinitionLog processDefinitionLog = new ProcessDefinitionLog();
         processDefinitionLog.setCode(1L);
         processDefinitionLog.setName("def 1");
@@ -68,7 +69,7 @@ public class ProcessDefinitionLogMapperTest extends BaseDaoTest {
      * @return ProcessDefinition
      */
     private ProcessDefinitionLog insertTwo() {
-        //insertOne
+        // insertOne
         ProcessDefinitionLog processDefinitionLog = new ProcessDefinitionLog();
         processDefinitionLog.setCode(1L);
         processDefinitionLog.setName("def 2");
@@ -85,7 +86,7 @@ public class ProcessDefinitionLogMapperTest extends BaseDaoTest {
     @Test
     public void testInsert() {
         ProcessDefinitionLog processDefinitionLog = insertOne();
-        Assert.assertNotEquals(processDefinitionLog.getId(), 0);
+        Assert.assertNotEquals(processDefinitionLog.getId().intValue(), 0);
     }
 
     @Test
@@ -142,7 +143,8 @@ public class ProcessDefinitionLogMapperTest extends BaseDaoTest {
     public void testQueryProcessDefinitionVersionsPaging() {
         insertOne();
         Page<ProcessDefinitionLog> page = new Page(1, 3);
-        IPage<ProcessDefinitionLog> processDefinitionLogs = processDefinitionLogMapper.queryProcessDefinitionVersionsPaging(page, 1L,1L);
+        IPage<ProcessDefinitionLog> processDefinitionLogs =
+                processDefinitionLogMapper.queryProcessDefinitionVersionsPaging(page, 1L, 1L);
         Assert.assertNotEquals(processDefinitionLogs.getTotal(), 0);
     }
 
diff --git a/dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/mapper/ResourceMapperTest.java b/dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/mapper/ResourceMapperTest.java
index d78721587d..5698bffc72 100644
--- a/dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/mapper/ResourceMapperTest.java
+++ b/dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/mapper/ResourceMapperTest.java
@@ -23,13 +23,13 @@ import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertThat;
 
 import org.apache.dolphinscheduler.common.Constants;
-import org.apache.dolphinscheduler.spi.enums.ResourceType;
 import org.apache.dolphinscheduler.common.enums.UserType;
 import org.apache.dolphinscheduler.dao.BaseDaoTest;
 import org.apache.dolphinscheduler.dao.entity.Resource;
 import org.apache.dolphinscheduler.dao.entity.ResourcesUser;
 import org.apache.dolphinscheduler.dao.entity.Tenant;
 import org.apache.dolphinscheduler.dao.entity.User;
+import org.apache.dolphinscheduler.spi.enums.ResourceType;
 
 import org.apache.commons.collections.CollectionUtils;
 
@@ -65,7 +65,7 @@ public class ResourceMapperTest extends BaseDaoTest {
      * @return Resource
      */
     private Resource insertOne() {
-        //insertOne
+        // insertOne
         Resource resource = new Resource();
         resource.setAlias("ut-resource");
         resource.setFullName("/ut-resource");
@@ -86,8 +86,9 @@ public class ResourceMapperTest extends BaseDaoTest {
      * @param user user
      * @return Resource
      */
-    private Resource createResource(User user, boolean isDirectory, ResourceType resourceType, int pid, String alias, String fullName) {
-        //insertOne
+    private Resource createResource(User user, boolean isDirectory, ResourceType resourceType, int pid, String alias,
+                                    String fullName) {
+        // insertOne
         Resource resource = new Resource();
         resource.setDirectory(isDirectory);
         resource.setType(resourceType);
@@ -108,7 +109,7 @@ public class ResourceMapperTest extends BaseDaoTest {
      * @return Resource
      */
     private Resource createResource(User user) {
-        //insertOne
+        // insertOne
         String alias = String.format("ut-resource-%s", user.getUserName());
         String fullName = String.format("/%s", alias);
 
@@ -144,7 +145,7 @@ public class ResourceMapperTest extends BaseDaoTest {
      * @return ResourcesUser
      */
     private ResourcesUser createResourcesUser(Resource resource, User user) {
-        //insertOne
+        // insertOne
         ResourcesUser resourcesUser = new ResourcesUser();
         resourcesUser.setCreateTime(new Date());
         resourcesUser.setUpdateTime(new Date());
@@ -167,10 +168,10 @@ public class ResourceMapperTest extends BaseDaoTest {
      */
     @Test
     public void testUpdate() {
-        //insertOne
+        // insertOne
         Resource resource = insertOne();
         resource.setCreateTime(new Date());
-        //update
+        // update
         int update = resourceMapper.updateById(resource);
         Assert.assertEquals(1, update);
     }
@@ -191,7 +192,7 @@ public class ResourceMapperTest extends BaseDaoTest {
     @Test
     public void testQuery() {
         Resource resource = insertOne();
-        //query
+        // query
         List<Resource> resources = resourceMapper.selectList(null);
         Assert.assertNotEquals(resources.size(), 0);
     }
@@ -210,8 +211,7 @@ public class ResourceMapperTest extends BaseDaoTest {
         List<Resource> resources = resourceMapper.queryResourceList(
                 alias,
                 userId,
-                type
-        );
+                type);
 
         Assert.assertNotEquals(resources.size(), 0);
     }
@@ -246,15 +246,13 @@ public class ResourceMapperTest extends BaseDaoTest {
                 -1,
                 resource.getType().ordinal(),
                 "",
-                new ArrayList<>(resource.getId())
-        );
+                new ArrayList<>(resource.getId()));
         IPage<Resource> resourceIPage1 = resourceMapper.queryResourcePaging(
                 page,
                 -1,
                 resource.getType().ordinal(),
                 "",
-                null
-        );
+                null);
         Assert.assertEquals(resourceIPage.getTotal(), 1);
         Assert.assertEquals(resourceIPage1.getTotal(), 1);
 
@@ -267,8 +265,10 @@ public class ResourceMapperTest extends BaseDaoTest {
     public void testQueryResourceListAuthored() {
         Resource resource = insertOne();
 
-        List<Integer> resIds = resourceUserMapper.queryResourcesIdListByUserIdAndPerm(resource.getUserId(), Constants.AUTHORIZE_WRITABLE_PERM);
-        List<Resource> resources = CollectionUtils.isEmpty(resIds) ? new ArrayList<>() : resourceMapper.queryResourceListById(resIds);
+        List<Integer> resIds = resourceUserMapper.queryResourcesIdListByUserIdAndPerm(resource.getUserId(),
+                Constants.AUTHORIZE_WRITABLE_PERM);
+        List<Resource> resources =
+                CollectionUtils.isEmpty(resIds) ? new ArrayList<>() : resourceMapper.queryResourceListById(resIds);
 
         ResourcesUser resourcesUser = new ResourcesUser();
 
@@ -277,8 +277,10 @@ public class ResourceMapperTest extends BaseDaoTest {
         resourcesUser.setPerm(Constants.AUTHORIZE_WRITABLE_PERM);
         resourceUserMapper.insert(resourcesUser);
 
-        List<Integer> resIds1 = resourceUserMapper.queryResourcesIdListByUserIdAndPerm(1110, Constants.AUTHORIZE_WRITABLE_PERM);
-        List<Resource> resources1 = CollectionUtils.isEmpty(resIds1) ? new ArrayList<>() : resourceMapper.queryResourceListById(resIds1);
+        List<Integer> resIds1 =
+                resourceUserMapper.queryResourcesIdListByUserIdAndPerm(1110, Constants.AUTHORIZE_WRITABLE_PERM);
+        List<Resource> resources1 =
+                CollectionUtils.isEmpty(resIds1) ? new ArrayList<>() : resourceMapper.queryResourceListById(resIds1);
 
         Assert.assertEquals(0, resources.size());
         Assert.assertNotEquals(0, resources1.size());
@@ -292,8 +294,10 @@ public class ResourceMapperTest extends BaseDaoTest {
     public void testQueryAuthorizedResourceList() {
         Resource resource = insertOne();
 
-        List<Integer> resIds = resourceUserMapper.queryResourcesIdListByUserIdAndPerm(resource.getUserId(), Constants.AUTHORIZE_WRITABLE_PERM);
-        List<Resource> resources = CollectionUtils.isEmpty(resIds) ? new ArrayList<>() : resourceMapper.queryResourceListById(resIds);
+        List<Integer> resIds = resourceUserMapper.queryResourcesIdListByUserIdAndPerm(resource.getUserId(),
+                Constants.AUTHORIZE_WRITABLE_PERM);
+        List<Resource> resources =
+                CollectionUtils.isEmpty(resIds) ? new ArrayList<>() : resourceMapper.queryResourceListById(resIds);
 
         resourceMapper.deleteById(resource.getId());
         Assert.assertEquals(0, resources.size());
@@ -306,8 +310,7 @@ public class ResourceMapperTest extends BaseDaoTest {
     public void testQueryResourceExceptUserId() {
         Resource resource = insertOne();
         List<Resource> resources = resourceMapper.queryResourceExceptUserId(
-                11111
-        );
+                11111);
         Assert.assertNotEquals(resources.size(), 0);
     }
 
@@ -365,13 +368,15 @@ public class ResourceMapperTest extends BaseDaoTest {
 
         List<Resource> resources = resourceMapper.listAuthorizedResource(generalUser2.getId(), resNames);
 
-        Assert.assertEquals(generalUser2.getId(), resource.getUserId());
-        Assert.assertFalse(resources.stream().map(t -> t.getFullName()).collect(toList()).containsAll(Arrays.asList(resNames)));
+        Assert.assertEquals(generalUser2.getId().intValue(), resource.getUserId());
+        Assert.assertFalse(
+                resources.stream().map(t -> t.getFullName()).collect(toList()).containsAll(Arrays.asList(resNames)));
 
         // authorize object unauthorizedResource to generalUser
         createResourcesUser(unauthorizedResource, generalUser2);
         List<Resource> authorizedResources = resourceMapper.listAuthorizedResource(generalUser2.getId(), resNames);
-        Assert.assertTrue(authorizedResources.stream().map(t -> t.getFullName()).collect(toList()).containsAll(Arrays.asList(resource.getFullName())));
+        Assert.assertTrue(authorizedResources.stream().map(t -> t.getFullName()).collect(toList())
+                .containsAll(Arrays.asList(resource.getFullName())));
 
     }
 
@@ -400,7 +405,8 @@ public class ResourceMapperTest extends BaseDaoTest {
         Resource resource = createResource(generalUser1);
         createResourcesUser(resource, generalUser2);
 
-        List<Resource> resourceList = resourceMapper.queryResourceListAuthored(generalUser2.getId(), ResourceType.FILE.ordinal());
+        List<Resource> resourceList =
+                resourceMapper.queryResourceListAuthored(generalUser2.getId(), ResourceType.FILE.ordinal());
         Assert.assertNotNull(resourceList);
 
         resourceList = resourceMapper.queryResourceListAuthored(generalUser2.getId(), ResourceType.FILE.ordinal());
@@ -435,4 +441,3 @@ public class ResourceMapperTest extends BaseDaoTest {
         Assert.assertTrue(resourceMapper.existResource(fullName, type));
     }
 }
-
diff --git a/dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/mapper/TaskDefinitionLogMapperTest.java b/dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/mapper/TaskDefinitionLogMapperTest.java
index f61813be3a..f0307df57e 100644
--- a/dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/mapper/TaskDefinitionLogMapperTest.java
+++ b/dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/mapper/TaskDefinitionLogMapperTest.java
@@ -57,7 +57,7 @@ public class TaskDefinitionLogMapperTest extends BaseDaoTest {
     @Test
     public void testInsert() {
         TaskDefinitionLog taskDefinitionLog = insertOne();
-        Assert.assertNotEquals(taskDefinitionLog.getId(), 0);
+        Assert.assertNotEquals(taskDefinitionLog.getId().intValue(), 0);
     }
 
     @Test
diff --git a/dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/mapper/TaskDefinitionMapperTest.java b/dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/mapper/TaskDefinitionMapperTest.java
index 3d16e2e44d..4efe97ecce 100644
--- a/dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/mapper/TaskDefinitionMapperTest.java
+++ b/dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/mapper/TaskDefinitionMapperTest.java
@@ -85,15 +85,15 @@ public class TaskDefinitionMapperTest extends BaseDaoTest {
     @Test
     public void testInsert() {
         TaskDefinition taskDefinition = insertOne();
-        Assert.assertNotEquals(taskDefinition.getId(), 0);
+        Assert.assertNotEquals(taskDefinition.getId().intValue(), 0);
     }
 
     @Test
     public void testQueryByDefinitionName() {
         TaskDefinition taskDefinition = insertOne();
         ProcessTaskRelation processTaskRelation = insertTaskRelation(taskDefinition.getCode());
-        TaskDefinition result = taskDefinitionMapper.queryByName(taskDefinition.getProjectCode(), processTaskRelation.getProcessDefinitionCode()
-                , taskDefinition.getName());
+        TaskDefinition result = taskDefinitionMapper.queryByName(taskDefinition.getProjectCode(),
+                processTaskRelation.getProcessDefinitionCode(), taskDefinition.getName());
 
         Assert.assertNotNull(result);
     }
@@ -109,7 +109,8 @@ public class TaskDefinitionMapperTest extends BaseDaoTest {
     @Test
     public void testQueryAllDefinitionList() {
         TaskDefinition taskDefinition = insertOne();
-        List<TaskDefinition> taskDefinitions = taskDefinitionMapper.queryAllDefinitionList(taskDefinition.getProjectCode());
+        List<TaskDefinition> taskDefinitions =
+                taskDefinitionMapper.queryAllDefinitionList(taskDefinition.getProjectCode());
         Assert.assertNotEquals(taskDefinitions.size(), 0);
 
     }
@@ -122,7 +123,8 @@ public class TaskDefinitionMapperTest extends BaseDaoTest {
         User un = userMapper.queryByUserNameAccurately("un");
         TaskDefinition taskDefinition = insertOne(un.getId());
 
-        List<DefinitionGroupByUser> users = taskDefinitionMapper.countDefinitionGroupByUser(new Long[]{taskDefinition.getProjectCode()});
+        List<DefinitionGroupByUser> users =
+                taskDefinitionMapper.countDefinitionGroupByUser(new Long[]{taskDefinition.getProjectCode()});
         Assert.assertNotEquals(users.size(), 0);
 
     }
@@ -158,7 +160,8 @@ public class TaskDefinitionMapperTest extends BaseDaoTest {
 
     @Test
     public void testNullPropertyValueOfLocalParams() {
-        String definitionJson = "{\"failRetryTimes\":\"0\",\"timeoutNotifyStrategy\":\"\",\"code\":\"5195043558720\",\"flag\":\"YES\",\"environmentCode\":\"-1\",\"taskDefinitionIndex\":2,\"taskPriority\":\"MEDIUM\",\"taskParams\":\"{\\\"preStatements\\\":null,\\\"postStatements\\\":null,\\\"type\\\":\\\"ADB_MYSQL\\\",\\\"database\\\":\\\"lijia\\\",\\\"sql\\\":\\\"create table nation_${random_serial_number} as select * from nation\\\",\\\"localParams\\\":[{\\\"direct\\\":2,\\\"type\\\":3, [...]
+        String definitionJson =
+                "{\"failRetryTimes\":\"0\",\"timeoutNotifyStrategy\":\"\",\"code\":\"5195043558720\",\"flag\":\"YES\",\"environmentCode\":\"-1\",\"taskDefinitionIndex\":2,\"taskPriority\":\"MEDIUM\",\"taskParams\":\"{\\\"preStatements\\\":null,\\\"postStatements\\\":null,\\\"type\\\":\\\"ADB_MYSQL\\\",\\\"database\\\":\\\"lijia\\\",\\\"sql\\\":\\\"create table nation_${random_serial_number} as select * from nation\\\",\\\"localParams\\\":[{\\\"direct\\\":2,\\\"type\\\":3,\\\"prop\\\":\\\ [...]
         TaskDefinition definition = JSONUtils.parseObject(definitionJson, TaskDefinition.class);
 
         Map<String, String> taskParamsMap = definition.getTaskParamMap();
@@ -174,7 +177,8 @@ public class TaskDefinitionMapperTest extends BaseDaoTest {
 
     @Test
     public void testNullLocalParamsOfTaskParams() {
-        String definitionJson = "{\"failRetryTimes\":\"0\",\"timeoutNotifyStrategy\":\"\",\"code\":\"5195043558720\",\"flag\":\"YES\",\"environmentCode\":\"-1\",\"taskDefinitionIndex\":2,\"taskPriority\":\"MEDIUM\",\"taskParams\":\"{\\\"preStatements\\\":null,\\\"postStatements\\\":null,\\\"type\\\":\\\"ADB_MYSQL\\\",\\\"database\\\":\\\"lijia\\\",\\\"sql\\\":\\\"create table nation_${random_serial_number} as select * from nation\\\",\\\"localParams\\\":null,\\\"Name\\\":\\\"create_table [...]
+        String definitionJson =
+                "{\"failRetryTimes\":\"0\",\"timeoutNotifyStrategy\":\"\",\"code\":\"5195043558720\",\"flag\":\"YES\",\"environmentCode\":\"-1\",\"taskDefinitionIndex\":2,\"taskPriority\":\"MEDIUM\",\"taskParams\":\"{\\\"preStatements\\\":null,\\\"postStatements\\\":null,\\\"type\\\":\\\"ADB_MYSQL\\\",\\\"database\\\":\\\"lijia\\\",\\\"sql\\\":\\\"create table nation_${random_serial_number} as select * from nation\\\",\\\"localParams\\\":null,\\\"Name\\\":\\\"create_table_as_select_natio [...]
         TaskDefinition definition = JSONUtils.parseObject(definitionJson, TaskDefinition.class);
 
         Assert.assertNull("Serialize the task definition success", definition.getTaskParamMap());
diff --git a/dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/mapper/UdfFuncMapperTest.java b/dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/mapper/UdfFuncMapperTest.java
index 1adbe689ae..30fc721fe0 100644
--- a/dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/mapper/UdfFuncMapperTest.java
+++ b/dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/mapper/UdfFuncMapperTest.java
@@ -163,13 +163,13 @@ public class UdfFuncMapperTest extends BaseDaoTest {
      */
     @Test
     public void testUpdate() {
-        //insertOne
+        // insertOne
         UdfFunc udfFunc = insertOne("func1");
         udfFunc.setResourceName("dolphin_resource_update");
         udfFunc.setResourceId(2);
         udfFunc.setClassName("org.apache.dolphinscheduler.test.mrUpdate");
         udfFunc.setUpdateTime(new Date());
-        //update
+        // update
         int update = udfFuncMapper.updateById(udfFunc);
         Assert.assertEquals(update, 1);
 
@@ -180,9 +180,9 @@ public class UdfFuncMapperTest extends BaseDaoTest {
      */
     @Test
     public void testDelete() {
-        //insertOne
+        // insertOne
         UdfFunc udfFunc = insertOne("func2");
-        //delete
+        // delete
         int delete = udfFuncMapper.deleteById(udfFunc.getId());
         Assert.assertEquals(delete, 1);
     }
@@ -192,12 +192,12 @@ public class UdfFuncMapperTest extends BaseDaoTest {
      */
     @Test
     public void testQueryUdfByIdStr() {
-        //insertOne
+        // insertOne
         UdfFunc udfFunc = insertOne("func3");
-        //insertOne
+        // insertOne
         UdfFunc udfFunc1 = insertOne("func4");
         Integer[] idArray = new Integer[]{udfFunc.getId(), udfFunc1.getId()};
-        //queryUdfByIdStr
+        // queryUdfByIdStr
         List<UdfFunc> udfFuncList = udfFuncMapper.queryUdfByIdStr(idArray, "");
         Assert.assertNotEquals(udfFuncList.size(), 0);
     }
@@ -207,14 +207,15 @@ public class UdfFuncMapperTest extends BaseDaoTest {
      */
     @Test
     public void testQueryUdfFuncPaging() {
-        //insertOneUser
+        // insertOneUser
         User user = insertOneUser();
-        //insertOne
+        // insertOne
         UdfFunc udfFunc = insertOne(user);
-        //queryUdfFuncPaging
+        // queryUdfFuncPaging
         Page<UdfFunc> page = new Page(1, 3);
 
-        IPage<UdfFunc> udfFuncIPage = udfFuncMapper.queryUdfFuncPaging(page, Collections.singletonList(udfFunc.getId()), "");
+        IPage<UdfFunc> udfFuncIPage =
+                udfFuncMapper.queryUdfFuncPaging(page, Collections.singletonList(udfFunc.getId()), "");
         Assert.assertNotEquals(udfFuncIPage.getTotal(), 0);
 
     }
@@ -224,12 +225,13 @@ public class UdfFuncMapperTest extends BaseDaoTest {
      */
     @Test
     public void testGetUdfFuncByType() {
-        //insertOneUser
+        // insertOneUser
         User user = insertOneUser();
-        //insertOne
+        // insertOne
         UdfFunc udfFunc = insertOne(user);
-        //getUdfFuncByType
-        List<UdfFunc> udfFuncList = udfFuncMapper.getUdfFuncByType(Collections.singletonList(udfFunc.getId()), udfFunc.getType().ordinal());
+        // getUdfFuncByType
+        List<UdfFunc> udfFuncList =
+                udfFuncMapper.getUdfFuncByType(Collections.singletonList(udfFunc.getId()), udfFunc.getType().ordinal());
         Assert.assertNotEquals(udfFuncList.size(), 0);
 
     }
@@ -239,10 +241,10 @@ public class UdfFuncMapperTest extends BaseDaoTest {
      */
     @Test
     public void testQueryUdfFuncExceptUserId() {
-        //insertOneUser
+        // insertOneUser
         User user1 = insertOneUser();
         User user2 = insertOneUser("user2");
-        //insertOne
+        // insertOne
         UdfFunc udfFunc1 = insertOne(user1);
         UdfFunc udfFunc2 = insertOne(user2);
         List<UdfFunc> udfFuncList = udfFuncMapper.queryUdfFuncExceptUserId(user1.getId());
@@ -255,48 +257,49 @@ public class UdfFuncMapperTest extends BaseDaoTest {
      */
     @Test
     public void testQueryAuthedUdfFunc() {
-        //insertOneUser
+        // insertOneUser
         User user = insertOneUser();
 
-        //insertOne
+        // insertOne
         UdfFunc udfFunc = insertOne(user);
 
-        //insertOneUDFUser
+        // insertOneUDFUser
         UDFUser udfUser = insertOneUDFUser(user, udfFunc);
-        //queryAuthedUdfFunc
+        // queryAuthedUdfFunc
         List<UdfFunc> udfFuncList = udfFuncMapper.queryAuthedUdfFunc(user.getId());
         Assert.assertNotEquals(udfFuncList.size(), 0);
     }
 
     @Test
     public void testListAuthorizedUdfFunc() {
-        //create general user
+        // create general user
         User generalUser1 = createGeneralUser("user1");
         User generalUser2 = createGeneralUser("user2");
 
-        //create udf function
+        // create udf function
         UdfFunc udfFunc = insertOne(generalUser1);
         UdfFunc unauthorizdUdfFunc = insertOne(generalUser2);
 
-        //udf function ids
+        // udf function ids
         Integer[] udfFuncIds = new Integer[]{udfFunc.getId(), unauthorizdUdfFunc.getId()};
 
         List<UdfFunc> authorizedUdfFunc = udfFuncMapper.listAuthorizedUdfFunc(generalUser1.getId(), udfFuncIds);
 
-        Assert.assertEquals(generalUser1.getId(), udfFunc.getUserId());
-        Assert.assertNotEquals(generalUser1.getId(), unauthorizdUdfFunc.getUserId());
-        Assert.assertFalse(authorizedUdfFunc.stream().map(t -> t.getId()).collect(toList()).containsAll(Arrays.asList(udfFuncIds)));
+        Assert.assertEquals(generalUser1.getId().intValue(), udfFunc.getUserId());
+        Assert.assertNotEquals(generalUser1.getId().intValue(), unauthorizdUdfFunc.getUserId());
+        Assert.assertFalse(authorizedUdfFunc.stream().map(t -> t.getId()).collect(toList())
+                .containsAll(Arrays.asList(udfFuncIds)));
 
-
-        //authorize object unauthorizdUdfFunc to generalUser1
+        // authorize object unauthorizdUdfFunc to generalUser1
         insertOneUDFUser(generalUser1, unauthorizdUdfFunc);
         authorizedUdfFunc = udfFuncMapper.listAuthorizedUdfFunc(generalUser1.getId(), udfFuncIds);
-        Assert.assertTrue(authorizedUdfFunc.stream().map(t -> t.getId()).collect(toList()).containsAll(Arrays.asList(udfFuncIds)));
+        Assert.assertTrue(authorizedUdfFunc.stream().map(t -> t.getId()).collect(toList())
+                .containsAll(Arrays.asList(udfFuncIds)));
     }
 
     @Test
     public void batchUpdateUdfFuncTest() {
-        //create general user
+        // create general user
         User generalUser1 = createGeneralUser("user1");
         UdfFunc udfFunc = insertOne(generalUser1);
         udfFunc.setResourceName("/updateTest");
diff --git a/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java b/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java
index c952832c99..c3f05e3c7c 100644
--- a/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java
+++ b/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java
@@ -17,11 +17,19 @@
 
 package org.apache.dolphinscheduler.server.master.runner;
 
-import com.google.common.collect.Lists;
-import lombok.NonNull;
-import org.apache.commons.collections.CollectionUtils;
-import org.apache.commons.lang3.StringUtils;
-import org.apache.commons.lang3.math.NumberUtils;
+import static org.apache.dolphinscheduler.common.Constants.CMDPARAM_COMPLEMENT_DATA_END_DATE;
+import static org.apache.dolphinscheduler.common.Constants.CMDPARAM_COMPLEMENT_DATA_SCHEDULE_DATE_LIST;
+import static org.apache.dolphinscheduler.common.Constants.CMDPARAM_COMPLEMENT_DATA_START_DATE;
+import static org.apache.dolphinscheduler.common.Constants.CMD_PARAM_RECOVERY_START_NODE_STRING;
+import static org.apache.dolphinscheduler.common.Constants.CMD_PARAM_RECOVER_PROCESS_ID_STRING;
+import static org.apache.dolphinscheduler.common.Constants.CMD_PARAM_START_NODES;
+import static org.apache.dolphinscheduler.common.Constants.COMMA;
+import static org.apache.dolphinscheduler.common.Constants.DEFAULT_WORKER_GROUP;
+import static org.apache.dolphinscheduler.common.Constants.YYYY_MM_DD_HH_MM_SS;
+import static org.apache.dolphinscheduler.plugin.task.api.TaskConstants.TASK_TYPE_BLOCKING;
+import static org.apache.dolphinscheduler.plugin.task.api.enums.DataType.VARCHAR;
+import static org.apache.dolphinscheduler.plugin.task.api.enums.Direct.IN;
+
 import org.apache.dolphinscheduler.common.Constants;
 import org.apache.dolphinscheduler.common.enums.CommandType;
 import org.apache.dolphinscheduler.common.enums.FailureStrategy;
@@ -29,7 +37,6 @@ import org.apache.dolphinscheduler.common.enums.Flag;
 import org.apache.dolphinscheduler.common.enums.Priority;
 import org.apache.dolphinscheduler.common.enums.StateEventType;
 import org.apache.dolphinscheduler.common.enums.TaskDependType;
-import org.apache.dolphinscheduler.common.enums.TaskExecuteType;
 import org.apache.dolphinscheduler.common.enums.TaskGroupQueueStatus;
 import org.apache.dolphinscheduler.common.enums.WorkflowExecutionStatus;
 import org.apache.dolphinscheduler.common.graph.DAG;
@@ -77,9 +84,10 @@ import org.apache.dolphinscheduler.service.exceptions.CronParseException;
 import org.apache.dolphinscheduler.service.expand.CuringParamsService;
 import org.apache.dolphinscheduler.service.process.ProcessService;
 import org.apache.dolphinscheduler.service.queue.PeerTaskInstancePriorityQueue;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.BeanUtils;
+
+import org.apache.commons.collections.CollectionUtils;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.commons.lang3.math.NumberUtils;
 
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -100,18 +108,13 @@ import java.util.concurrent.ConcurrentLinkedQueue;
 import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.stream.Collectors;
 
-import static org.apache.dolphinscheduler.common.Constants.CMDPARAM_COMPLEMENT_DATA_END_DATE;
-import static org.apache.dolphinscheduler.common.Constants.CMDPARAM_COMPLEMENT_DATA_SCHEDULE_DATE_LIST;
-import static org.apache.dolphinscheduler.common.Constants.CMDPARAM_COMPLEMENT_DATA_START_DATE;
-import static org.apache.dolphinscheduler.common.Constants.CMD_PARAM_RECOVERY_START_NODE_STRING;
-import static org.apache.dolphinscheduler.common.Constants.CMD_PARAM_RECOVER_PROCESS_ID_STRING;
-import static org.apache.dolphinscheduler.common.Constants.CMD_PARAM_START_NODES;
-import static org.apache.dolphinscheduler.common.Constants.COMMA;
-import static org.apache.dolphinscheduler.common.Constants.DEFAULT_WORKER_GROUP;
-import static org.apache.dolphinscheduler.common.Constants.YYYY_MM_DD_HH_MM_SS;
-import static org.apache.dolphinscheduler.plugin.task.api.TaskConstants.TASK_TYPE_BLOCKING;
-import static org.apache.dolphinscheduler.plugin.task.api.enums.DataType.VARCHAR;
-import static org.apache.dolphinscheduler.plugin.task.api.enums.Direct.IN;
+import lombok.NonNull;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.BeanUtils;
+
+import com.google.common.collect.Lists;
 
 /**
  * Workflow execute task, used to execute a workflow instance.
@@ -1326,7 +1329,7 @@ public class WorkflowExecuteRunnable implements Callable<WorkflowSubmitStatue> {
                 continue;
             }
 
-            if (task.getId() > 0 && completeTaskMap.containsKey(task.getTaskCode())) {
+            if (task.getId() != null && completeTaskMap.containsKey(task.getTaskCode())) {
                 logger.info("task {} has already run success", task.getName());
                 continue;
             }
@@ -2009,4 +2012,4 @@ public class WorkflowExecuteRunnable implements Callable<WorkflowSubmitStatue> {
 
     }
 
-}
\ No newline at end of file
+}
diff --git a/dolphinscheduler-registry/dolphinscheduler-registry-plugins/dolphinscheduler-registry-zookeeper/pom.xml b/dolphinscheduler-registry/dolphinscheduler-registry-plugins/dolphinscheduler-registry-zookeeper/pom.xml
index 028e5d6cb7..8f8bd7b645 100644
--- a/dolphinscheduler-registry/dolphinscheduler-registry-plugins/dolphinscheduler-registry-zookeeper/pom.xml
+++ b/dolphinscheduler-registry/dolphinscheduler-registry-plugins/dolphinscheduler-registry-zookeeper/pom.xml
@@ -15,15 +15,14 @@
   ~ See the License for the specific language governing permissions and
   ~ limitations under the License.
   -->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
     <parent>
-        <artifactId>dolphinscheduler-registry-plugins</artifactId>
         <groupId>org.apache.dolphinscheduler</groupId>
+        <artifactId>dolphinscheduler-registry-plugins</artifactId>
         <version>dev-SNAPSHOT</version>
     </parent>
-    <modelVersion>4.0.0</modelVersion>
 
     <artifactId>dolphinscheduler-registry-zookeeper</artifactId>
 
@@ -57,6 +56,15 @@
             <artifactId>slf4j-api</artifactId>
         </dependency>
 
+        <dependency>
+            <groupId>io.dropwizard.metrics</groupId>
+            <artifactId>metrics-core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.xerial.snappy</groupId>
+            <artifactId>snappy-java</artifactId>
+        </dependency>
+
         <dependency>
             <groupId>org.apache.curator</groupId>
             <artifactId>curator-test</artifactId>
diff --git a/dolphinscheduler-service/src/test/java/org/apache/dolphinscheduler/service/process/ProcessServiceTest.java b/dolphinscheduler-service/src/test/java/org/apache/dolphinscheduler/service/process/ProcessServiceTest.java
index 190f869b1a..fb173a597b 100644
--- a/dolphinscheduler-service/src/test/java/org/apache/dolphinscheduler/service/process/ProcessServiceTest.java
+++ b/dolphinscheduler-service/src/test/java/org/apache/dolphinscheduler/service/process/ProcessServiceTest.java
@@ -20,7 +20,6 @@ package org.apache.dolphinscheduler.service.process;
 import static org.apache.dolphinscheduler.common.Constants.CMD_PARAM_RECOVER_PROCESS_ID_STRING;
 import static org.apache.dolphinscheduler.common.Constants.CMD_PARAM_START_PARAMS;
 import static org.apache.dolphinscheduler.common.Constants.CMD_PARAM_SUB_PROCESS_DEFINE_CODE;
-
 import static org.mockito.ArgumentMatchers.any;
 
 import org.apache.dolphinscheduler.common.Constants;
@@ -190,7 +189,7 @@ public class ProcessServiceTest {
         instanceMap.setParentTaskInstanceId(10);
         Command command;
 
-        //father history: start; child null == command type: start
+        // father history: start; child null == command type: start
         parentInstance.setHistoryCmd("START_PROCESS");
         parentInstance.setCommandType(CommandType.START_PROCESS);
         ProcessDefinition processDefinition = new ProcessDefinition();
@@ -200,19 +199,19 @@ public class ProcessServiceTest {
         command = processService.createSubProcessCommand(parentInstance, childInstance, instanceMap, task);
         Assert.assertEquals(CommandType.START_PROCESS, command.getCommandType());
 
-        //father history: start,start failure; child null == command type: start
+        // father history: start,start failure; child null == command type: start
         parentInstance.setCommandType(CommandType.START_FAILURE_TASK_PROCESS);
         parentInstance.setHistoryCmd("START_PROCESS,START_FAILURE_TASK_PROCESS");
         command = processService.createSubProcessCommand(parentInstance, childInstance, instanceMap, task);
         Assert.assertEquals(CommandType.START_PROCESS, command.getCommandType());
 
-        //father history: scheduler,start failure; child null == command type: scheduler
+        // father history: scheduler,start failure; child null == command type: scheduler
         parentInstance.setCommandType(CommandType.START_FAILURE_TASK_PROCESS);
         parentInstance.setHistoryCmd("SCHEDULER,START_FAILURE_TASK_PROCESS");
         command = processService.createSubProcessCommand(parentInstance, childInstance, instanceMap, task);
         Assert.assertEquals(CommandType.SCHEDULER, command.getCommandType());
 
-        //father history: complement,start failure; child null == command type: complement
+        // father history: complement,start failure; child null == command type: complement
 
         String startString = "2020-01-01 00:00:00";
         String endString = "2020-01-10 00:00:00";
@@ -231,7 +230,7 @@ public class ProcessServiceTest {
         Assert.assertEquals(startString, DateUtils.dateToString(start));
         Assert.assertEquals(endString, DateUtils.dateToString(end));
 
-        //father history: start,failure,start failure; child not null == command type: start failure
+        // father history: start,failure,start failure; child not null == command type: start failure
         childInstance = new ProcessInstance();
         parentInstance.setCommandType(CommandType.START_FAILURE_TASK_PROCESS);
         parentInstance.setHistoryCmd("START_PROCESS,START_FAILURE_TASK_PROCESS");
@@ -292,16 +291,16 @@ public class ProcessServiceTest {
     @Test
     public void testHandleCommand() throws CronParseException, CodeGenerateUtils.CodeGenerateException {
 
-        //cannot construct process instance, return null;
+        // cannot construct process instance, return null;
         String host = "127.0.0.1";
         Command command = new Command();
         command.setProcessDefinitionCode(222);
         command.setCommandType(CommandType.REPEAT_RUNNING);
         command.setCommandParam("{\""
-                                    + CMD_PARAM_RECOVER_PROCESS_ID_STRING
-                                    + "\":\"111\",\""
-                                    + CMD_PARAM_SUB_PROCESS_DEFINE_CODE
-                                    + "\":\"222\"}");
+                + CMD_PARAM_RECOVER_PROCESS_ID_STRING
+                + "\":\"111\",\""
+                + CMD_PARAM_SUB_PROCESS_DEFINE_CODE
+                + "\":\"222\"}");
         try {
             Assert.assertNull(processService.handleCommand(host, command));
         } catch (IllegalArgumentException illegalArgumentException) {
@@ -312,7 +311,7 @@ public class ProcessServiceTest {
         int definitionVersion = 1;
         long definitionCode = 123;
         int processInstanceId = 222;
-        //there is not enough thread for this command
+        // there is not enough thread for this command
         Command command1 = new Command();
         command1.setId(1);
         command1.setProcessDefinitionCode(definitionCode);
@@ -326,7 +325,8 @@ public class ProcessServiceTest {
         processDefinition.setName("test");
         processDefinition.setVersion(definitionVersion);
         processDefinition.setCode(definitionCode);
-        processDefinition.setGlobalParams("[{\"prop\":\"startParam1\",\"direct\":\"IN\",\"type\":\"VARCHAR\",\"value\":\"\"}]");
+        processDefinition
+                .setGlobalParams("[{\"prop\":\"startParam1\",\"direct\":\"IN\",\"type\":\"VARCHAR\",\"value\":\"\"}]");
         processDefinition.setExecutionType(ProcessExecutionTypeEnum.PARALLEL);
 
         ProcessInstance processInstance = new ProcessInstance();
@@ -338,7 +338,8 @@ public class ProcessServiceTest {
         processInstance.setProcessDefinitionCode(definitionCode);
         processInstance.setProcessDefinitionVersion(definitionVersion);
 
-        Mockito.when(processDefineMapper.queryByCode(command1.getProcessDefinitionCode())).thenReturn(processDefinition);
+        Mockito.when(processDefineMapper.queryByCode(command1.getProcessDefinitionCode()))
+                .thenReturn(processDefinition);
         Mockito.when(processDefineLogMapper.queryByDefinitionCodeAndVersion(processInstance.getProcessDefinitionCode(),
                 processInstance.getProcessDefinitionVersion())).thenReturn(new ProcessDefinitionLog(processDefinition));
         Mockito.when(processInstanceMapper.queryDetailById(222)).thenReturn(processInstance);
@@ -424,7 +425,8 @@ public class ProcessServiceTest {
         command6.setCommandParam("{\"ProcessInstanceId\":223}");
         command6.setCommandType(CommandType.RECOVER_SERIAL_WAIT);
         command6.setProcessDefinitionVersion(1);
-        Mockito.when(processInstanceMapper.queryByProcessDefineCodeAndProcessDefinitionVersionAndStatusAndNextId(11L, 1, Constants.RUNNING_PROCESS_STATE, 223)).thenReturn(lists);
+        Mockito.when(processInstanceMapper.queryByProcessDefineCodeAndProcessDefinitionVersionAndStatusAndNextId(11L, 1,
+                Constants.RUNNING_PROCESS_STATE, 223)).thenReturn(lists);
         Mockito.when(processInstanceMapper.updateNextProcessIdById(223, 222)).thenReturn(true);
         Mockito.when(commandMapper.deleteById(6)).thenReturn(1);
         ProcessInstance processInstance6 = processService.handleCommand(host, command6);
@@ -445,7 +447,8 @@ public class ProcessServiceTest {
         command7.setCommandType(CommandType.RECOVER_SERIAL_WAIT);
         command7.setProcessDefinitionVersion(1);
         Mockito.when(commandMapper.deleteById(7)).thenReturn(1);
-        Mockito.when(processInstanceMapper.queryByProcessDefineCodeAndProcessDefinitionVersionAndStatusAndNextId(11L, 1, Constants.RUNNING_PROCESS_STATE, 224)).thenReturn(null);
+        Mockito.when(processInstanceMapper.queryByProcessDefineCodeAndProcessDefinitionVersionAndStatusAndNextId(11L, 1,
+                Constants.RUNNING_PROCESS_STATE, 224)).thenReturn(null);
         ProcessInstance processInstance8 = processService.handleCommand(host, command7);
         Assert.assertTrue(processInstance8 != null);
 
@@ -467,7 +470,8 @@ public class ProcessServiceTest {
         command9.setCommandType(CommandType.RECOVER_SERIAL_WAIT);
         command9.setProcessDefinitionVersion(1);
         Mockito.when(processInstanceMapper.queryDetailById(225)).thenReturn(processInstance9);
-        Mockito.when(processInstanceMapper.queryByProcessDefineCodeAndProcessDefinitionVersionAndStatusAndNextId(12L, 1, Constants.RUNNING_PROCESS_STATE, 0)).thenReturn(lists);
+        Mockito.when(processInstanceMapper.queryByProcessDefineCodeAndProcessDefinitionVersionAndStatusAndNextId(12L, 1,
+                Constants.RUNNING_PROCESS_STATE, 0)).thenReturn(lists);
         Mockito.when(processInstanceMapper.updateById(processInstance)).thenReturn(1);
         Mockito.when(commandMapper.deleteById(9)).thenReturn(1);
         ProcessInstance processInstance10 = processService.handleCommand(host, command9);
@@ -493,7 +497,8 @@ public class ProcessServiceTest {
         processDefinition.setName("test");
         processDefinition.setVersion(definitionVersion);
         processDefinition.setCode(definitionCode);
-        processDefinition.setGlobalParams("[{\"prop\":\"startParam1\",\"direct\":\"IN\",\"type\":\"VARCHAR\",\"value\":\"\"}]");
+        processDefinition
+                .setGlobalParams("[{\"prop\":\"startParam1\",\"direct\":\"IN\",\"type\":\"VARCHAR\",\"value\":\"\"}]");
         processDefinition.setExecutionType(ProcessExecutionTypeEnum.PARALLEL);
 
         ProcessInstance processInstance = new ProcessInstance();
@@ -505,7 +510,8 @@ public class ProcessServiceTest {
         processInstance.setProcessDefinitionCode(definitionCode);
         processInstance.setProcessDefinitionVersion(definitionVersion);
 
-        Mockito.when(processDefineMapper.queryByCode(command1.getProcessDefinitionCode())).thenReturn(processDefinition);
+        Mockito.when(processDefineMapper.queryByCode(command1.getProcessDefinitionCode()))
+                .thenReturn(processDefinition);
         Mockito.when(processDefineLogMapper.queryByDefinitionCodeAndVersion(processInstance.getProcessDefinitionCode(),
                 processInstance.getProcessDefinitionVersion())).thenReturn(new ProcessDefinitionLog(processDefinition));
         Mockito.when(processInstanceMapper.queryDetailById(222)).thenReturn(processInstance);
@@ -536,7 +542,8 @@ public class ProcessServiceTest {
         processInstance.setId(222);
         processInstance.setProcessDefinitionVersion(1);
         processInstance.setProcessDefinitionCode(1L);
-        Mockito.when(processService.findProcessInstanceById(taskInstance.getProcessInstanceId())).thenReturn(processInstance);
+        Mockito.when(processService.findProcessInstanceById(taskInstance.getProcessInstanceId()))
+                .thenReturn(processInstance);
         Assert.assertEquals("", processService.formatTaskAppId(taskInstance));
     }
 
@@ -559,8 +566,8 @@ public class ProcessServiceTest {
         processTaskRelationLog.setPostTaskCode(postTaskCode);
         processTaskRelationLog.setPostTaskVersion(postTaskVersion);
         relationLogList.add(processTaskRelationLog);
-        Mockito.when(processTaskRelationLogMapper.queryByProcessCodeAndVersion(parentProcessDefineCode
-                , parentProcessDefineVersion)).thenReturn(relationLogList);
+        Mockito.when(processTaskRelationLogMapper.queryByProcessCodeAndVersion(parentProcessDefineCode,
+                parentProcessDefineVersion)).thenReturn(relationLogList);
 
         List<TaskDefinitionLog> taskDefinitionLogs = new ArrayList<>();
         TaskDefinitionLog taskDefinitionLog1 = new TaskDefinitionLog();
@@ -619,7 +626,8 @@ public class ProcessServiceTest {
         srcConnectorType.setValue("JDBC");
         srcConnectorType.setPlaceholder("Please select the source connector type");
         srcConnectorType.setOptionSourceType(OptionSourceType.DEFAULT.getCode());
-        srcConnectorType.setOptions("[{\"label\":\"HIVE\",\"value\":\"HIVE\"},{\"label\":\"JDBC\",\"value\":\"JDBC\"}]");
+        srcConnectorType
+                .setOptions("[{\"label\":\"HIVE\",\"value\":\"HIVE\"},{\"label\":\"JDBC\",\"value\":\"JDBC\"}]");
         srcConnectorType.setInputType(InputType.DEFAULT.getCode());
         srcConnectorType.setValueType(ValueType.NUMBER.getCode());
         srcConnectorType.setEmit(true);
@@ -692,15 +700,16 @@ public class ProcessServiceTest {
         operator.setId(-1);
         operator.setUserType(UserType.GENERAL_USER);
         long projectCode = 751485690568704L;
-        String taskJson = "[{\"code\":751500437479424,\"name\":\"aa\",\"version\":1,\"description\":\"\",\"delayTime\":0,"
-                + "\"taskType\":\"SHELL\",\"taskParams\":{\"resourceList\":[],\"localParams\":[],\"rawScript\":\"sleep 1s\\necho 11\","
-                + "\"dependence\":{},\"conditionResult\":{\"successNode\":[\"\"],\"failedNode\":[\"\"]},\"waitStartTimeout\":{}},"
-                + "\"flag\":\"YES\",\"taskPriority\":\"MEDIUM\",\"workerGroup\":\"yarn\",\"failRetryTimes\":0,\"failRetryInterval\":1,"
-                + "\"timeoutFlag\":\"OPEN\",\"timeoutNotifyStrategy\":\"FAILED\",\"timeout\":1,\"environmentCode\":751496815697920},"
-                + "{\"code\":751516889636864,\"name\":\"bb\",\"description\":\"\",\"taskType\":\"SHELL\",\"taskParams\":{\"resourceList\":[],"
-                + "\"localParams\":[],\"rawScript\":\"echo 22\",\"dependence\":{},\"conditionResult\":{\"successNode\":[\"\"],\"failedNode\":[\"\"]},"
-                + "\"waitStartTimeout\":{}},\"flag\":\"YES\",\"taskPriority\":\"MEDIUM\",\"workerGroup\":\"default\",\"failRetryTimes\":\"0\","
-                + "\"failRetryInterval\":\"1\",\"timeoutFlag\":\"CLOSE\",\"timeoutNotifyStrategy\":\"\",\"timeout\":0,\"delayTime\":\"0\",\"environmentCode\":-1}]";
+        String taskJson =
+                "[{\"code\":751500437479424,\"name\":\"aa\",\"version\":1,\"description\":\"\",\"delayTime\":0,"
+                        + "\"taskType\":\"SHELL\",\"taskParams\":{\"resourceList\":[],\"localParams\":[],\"rawScript\":\"sleep 1s\\necho 11\","
+                        + "\"dependence\":{},\"conditionResult\":{\"successNode\":[\"\"],\"failedNode\":[\"\"]},\"waitStartTimeout\":{}},"
+                        + "\"flag\":\"YES\",\"taskPriority\":\"MEDIUM\",\"workerGroup\":\"yarn\",\"failRetryTimes\":0,\"failRetryInterval\":1,"
+                        + "\"timeoutFlag\":\"OPEN\",\"timeoutNotifyStrategy\":\"FAILED\",\"timeout\":1,\"environmentCode\":751496815697920},"
+                        + "{\"code\":751516889636864,\"name\":\"bb\",\"description\":\"\",\"taskType\":\"SHELL\",\"taskParams\":{\"resourceList\":[],"
+                        + "\"localParams\":[],\"rawScript\":\"echo 22\",\"dependence\":{},\"conditionResult\":{\"successNode\":[\"\"],\"failedNode\":[\"\"]},"
+                        + "\"waitStartTimeout\":{}},\"flag\":\"YES\",\"taskPriority\":\"MEDIUM\",\"workerGroup\":\"default\",\"failRetryTimes\":\"0\","
+                        + "\"failRetryInterval\":\"1\",\"timeoutFlag\":\"CLOSE\",\"timeoutNotifyStrategy\":\"\",\"timeout\":0,\"delayTime\":\"0\",\"environmentCode\":-1}]";
         List<TaskDefinitionLog> taskDefinitionLogs = JSONUtils.toList(taskJson, TaskDefinitionLog.class);
         TaskDefinitionLog taskDefinition = new TaskDefinitionLog();
         taskDefinition.setCode(751500437479424L);
@@ -712,9 +721,11 @@ public class ProcessServiceTest {
         taskDefinition.setCreateTime(new Date());
         taskDefinition.setUpdateTime(new Date());
         Mockito.when(taskPluginManager.getParameters(any())).thenReturn(null);
-        Mockito.when(taskDefinitionLogMapper.queryByDefinitionCodeAndVersion(taskDefinition.getCode(), taskDefinition.getVersion())).thenReturn(taskDefinition);
+        Mockito.when(taskDefinitionLogMapper.queryByDefinitionCodeAndVersion(taskDefinition.getCode(),
+                taskDefinition.getVersion())).thenReturn(taskDefinition);
         Mockito.when(taskDefinitionLogMapper.queryMaxVersionForDefinition(taskDefinition.getCode())).thenReturn(1);
-        Mockito.when(taskDefinitionMapper.queryByCodeList(Collections.singletonList(taskDefinition.getCode()))).thenReturn(Collections.singletonList(taskDefinition));
+        Mockito.when(taskDefinitionMapper.queryByCodeList(Collections.singletonList(taskDefinition.getCode())))
+                .thenReturn(Collections.singletonList(taskDefinition));
         int result = processService.saveTaskDefine(operator, projectCode, taskDefinitionLogs, Boolean.TRUE);
         Assert.assertEquals(0, result);
     }
@@ -765,9 +776,11 @@ public class ProcessServiceTest {
         taskDefinitionLogs.add(td2);
 
         Mockito.when(taskDefinitionLogMapper.queryByTaskDefinitions(any())).thenReturn(taskDefinitionLogs);
-        Mockito.when(processTaskRelationLogMapper.queryByProcessCodeAndVersion(Mockito.anyLong(), Mockito.anyInt())).thenReturn(list);
+        Mockito.when(processTaskRelationLogMapper.queryByProcessCodeAndVersion(Mockito.anyLong(), Mockito.anyInt()))
+                .thenReturn(list);
 
-        DAG<String, TaskNode, TaskNodeRelation> stringTaskNodeTaskNodeRelationDAG = processService.genDagGraph(processDefinition);
+        DAG<String, TaskNode, TaskNodeRelation> stringTaskNodeTaskNodeRelationDAG =
+                processService.genDagGraph(processDefinition);
         Assert.assertEquals(1, stringTaskNodeTaskNodeRelationDAG.getNodesCount());
     }
 
@@ -827,7 +840,7 @@ public class ProcessServiceTest {
                 "updateResourceInfo",
                 resourceInfoNormal);
 
-        Assert.assertEquals(1, updatedResourceInfo3.getId());
+        Assert.assertEquals(1, updatedResourceInfo3.getId().intValue());
         Assert.assertEquals("test.txt", updatedResourceInfo3.getRes());
         Assert.assertEquals("/test.txt", updatedResourceInfo3.getResourceName());
 
@@ -836,7 +849,8 @@ public class ProcessServiceTest {
     @Test
     public void testCreateTaskGroupQueue() {
         Mockito.when(taskGroupQueueMapper.insert(Mockito.any(TaskGroupQueue.class))).thenReturn(1);
-        TaskGroupQueue taskGroupQueue = processService.insertIntoTaskGroupQueue(1, "task name", 1, 1, 1, TaskGroupQueueStatus.WAIT_QUEUE);
+        TaskGroupQueue taskGroupQueue =
+                processService.insertIntoTaskGroupQueue(1, "task name", 1, 1, 1, TaskGroupQueueStatus.WAIT_QUEUE);
         Assert.assertNotNull(taskGroupQueue);
     }
 
@@ -879,7 +893,8 @@ public class ProcessServiceTest {
         int pageNumber = 0;
         int masterCount = 0;
         int thisMasterSlot = 2;
-        List<Command> commandList = processService.findCommandPageBySlot(pageSize, pageNumber, masterCount, thisMasterSlot);
+        List<Command> commandList =
+                processService.findCommandPageBySlot(pageSize, pageNumber, masterCount, thisMasterSlot);
         Assert.assertEquals(0, commandList.size());
     }
 
diff --git a/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/model/ResourceInfo.java b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/model/ResourceInfo.java
index f86b01daa7..7cde602bcf 100644
--- a/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/model/ResourceInfo.java
+++ b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/model/ResourceInfo.java
@@ -21,6 +21,7 @@ package org.apache.dolphinscheduler.plugin.task.api.model;
  * resource info
  */
 public class ResourceInfo {
+
     /**
      * res the name of the resource that was uploaded
      */
@@ -33,7 +34,7 @@ public class ResourceInfo {
 
     private String res;
 
-    public int getId() {
+    public Integer getId() {
         return id;
     }
 
diff --git a/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/parameters/SqlParameters.java b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/parameters/SqlParameters.java
index 8c7725ccf8..2bb7822a87 100644
--- a/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/parameters/SqlParameters.java
+++ b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/parameters/SqlParameters.java
@@ -18,6 +18,7 @@
 package org.apache.dolphinscheduler.plugin.task.api.parameters;
 
 import org.apache.dolphinscheduler.plugin.task.api.SQLTaskExecutionContext;
+import org.apache.dolphinscheduler.plugin.task.api.enums.DataType;
 import org.apache.dolphinscheduler.plugin.task.api.enums.ResourceType;
 import org.apache.dolphinscheduler.plugin.task.api.enums.UdfType;
 import org.apache.dolphinscheduler.plugin.task.api.model.Property;
@@ -25,11 +26,10 @@ import org.apache.dolphinscheduler.plugin.task.api.model.ResourceInfo;
 import org.apache.dolphinscheduler.plugin.task.api.parameters.resource.DataSourceParameters;
 import org.apache.dolphinscheduler.plugin.task.api.parameters.resource.ResourceParametersHelper;
 import org.apache.dolphinscheduler.plugin.task.api.parameters.resource.UdfFuncParameters;
-import org.apache.dolphinscheduler.plugin.task.api.enums.DataType;
 import org.apache.dolphinscheduler.spi.utils.JSONUtils;
 import org.apache.dolphinscheduler.spi.utils.StringUtils;
 
-import org.apache.commons.collections.CollectionUtils;
+import org.apache.commons.collections4.CollectionUtils;
 
 import java.util.ArrayList;
 import java.util.HashMap;
@@ -45,6 +45,7 @@ import com.google.common.base.Strings;
  * Sql/Hql parameter
  */
 public class SqlParameters extends AbstractParameters {
+
     /**
      * data source type,eg  MYSQL, POSTGRES, HIVE ...
      */
@@ -269,10 +270,10 @@ public class SqlParameters extends AbstractParameters {
         if (CollectionUtils.isEmpty(sqlResult)) {
             return;
         }
-        //if sql return more than one line
+        // if sql return more than one line
         if (sqlResult.size() > 1) {
             Map<String, List<String>> sqlResultFormat = new HashMap<>();
-            //init sqlResultFormat
+            // init sqlResultFormat
             Set<String> keySet = sqlResult.get(0).keySet();
             for (String key : keySet) {
                 sqlResultFormat.put(key, new ArrayList<>());
@@ -289,7 +290,7 @@ public class SqlParameters extends AbstractParameters {
                 }
             }
         } else {
-            //result only one line
+            // result only one line
             Map<String, String> firstRow = sqlResult.get(0);
             for (Property info : outProperty) {
                 info.setValue(String.valueOf(firstRow.get(info.getProp())));
@@ -346,7 +347,8 @@ public class SqlParameters extends AbstractParameters {
     public SQLTaskExecutionContext generateExtendedContext(ResourceParametersHelper parametersHelper) {
         SQLTaskExecutionContext sqlTaskExecutionContext = new SQLTaskExecutionContext();
 
-        DataSourceParameters dbSource = (DataSourceParameters) parametersHelper.getResourceParameters(ResourceType.DATASOURCE, datasource);
+        DataSourceParameters dbSource =
+                (DataSourceParameters) parametersHelper.getResourceParameters(ResourceType.DATASOURCE, datasource);
         sqlTaskExecutionContext.setConnectionParams(dbSource.getConnectionParams());
 
         // whether udf type
@@ -354,7 +356,8 @@ public class SqlParameters extends AbstractParameters {
                 && !StringUtils.isEmpty(this.getUdfs());
 
         if (udfTypeFlag) {
-            List<UdfFuncParameters> collect = parametersHelper.getResourceMap(ResourceType.UDF).entrySet().stream().map(entry -> (UdfFuncParameters) entry.getValue()).collect(Collectors.toList());
+            List<UdfFuncParameters> collect = parametersHelper.getResourceMap(ResourceType.UDF).entrySet().stream()
+                    .map(entry -> (UdfFuncParameters) entry.getValue()).collect(Collectors.toList());
             sqlTaskExecutionContext.setUdfFuncParametersList(collect);
         }
 
diff --git a/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/parameters/resource/UdfFuncParameters.java b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/parameters/resource/UdfFuncParameters.java
index f0ce772935..4cc99f7cb5 100644
--- a/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/parameters/resource/UdfFuncParameters.java
+++ b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/parameters/resource/UdfFuncParameters.java
@@ -17,16 +17,18 @@
 
 package org.apache.dolphinscheduler.plugin.task.api.parameters.resource;
 
-import com.fasterxml.jackson.annotation.JsonProperty;
 import org.apache.dolphinscheduler.plugin.task.api.enums.UdfType;
 import org.apache.dolphinscheduler.spi.utils.JSONUtils;
 
 import java.util.Date;
 
+import com.fasterxml.jackson.annotation.JsonProperty;
+
 /**
  * udf function
  */
 public class UdfFuncParameters extends AbstractResourceParameters {
+
     /**
      * id
      */
@@ -102,7 +104,7 @@ public class UdfFuncParameters extends AbstractResourceParameters {
      */
     private Date updateTime;
 
-    public int getId() {
+    public Integer getId() {
         return id;
     }
 
diff --git a/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/test/java/org/apache/dolphinscheduler/plugin/task/api/parameters/SqlParametersTest.java b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/test/java/org/apache/dolphinscheduler/plugin/task/api/parameters/SqlParametersTest.java
index 8aded957b6..6fa1148795 100644
--- a/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/test/java/org/apache/dolphinscheduler/plugin/task/api/parameters/SqlParametersTest.java
+++ b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/test/java/org/apache/dolphinscheduler/plugin/task/api/parameters/SqlParametersTest.java
@@ -19,11 +19,11 @@ package org.apache.dolphinscheduler.plugin.task.api.parameters;
 
 import static org.junit.Assert.assertNotNull;
 
+import org.apache.dolphinscheduler.plugin.task.api.enums.DataType;
 import org.apache.dolphinscheduler.plugin.task.api.enums.Direct;
 import org.apache.dolphinscheduler.plugin.task.api.model.Property;
-import org.apache.dolphinscheduler.plugin.task.api.enums.DataType;
 
-import org.apache.commons.collections.CollectionUtils;
+import org.apache.commons.collections4.CollectionUtils;
 
 import java.util.ArrayList;
 import java.util.List;
diff --git a/dolphinscheduler-task-plugin/dolphinscheduler-task-dataquality/src/main/java/org/apache/dolphinscheduler/plugin/task/dq/rule/entity/DqRuleExecuteSql.java b/dolphinscheduler-task-plugin/dolphinscheduler-task-dataquality/src/main/java/org/apache/dolphinscheduler/plugin/task/dq/rule/entity/DqRuleExecuteSql.java
index 8e49df09e1..c0a2255370 100644
--- a/dolphinscheduler-task-plugin/dolphinscheduler-task-dataquality/src/main/java/org/apache/dolphinscheduler/plugin/task/dq/rule/entity/DqRuleExecuteSql.java
+++ b/dolphinscheduler-task-plugin/dolphinscheduler-task-dataquality/src/main/java/org/apache/dolphinscheduler/plugin/task/dq/rule/entity/DqRuleExecuteSql.java
@@ -26,6 +26,7 @@ import java.util.Date;
  * RuleExecuteSql
  */
 public class DqRuleExecuteSql implements Serializable {
+
     /**
      * primary key
      */
@@ -59,7 +60,7 @@ public class DqRuleExecuteSql implements Serializable {
      */
     private Date updateTime;
 
-    public int getId() {
+    public Integer getId() {
         return id;
     }
 
@@ -136,4 +137,4 @@ public class DqRuleExecuteSql implements Serializable {
                 + ", updateTime=" + updateTime
                 + '}';
     }
-}
\ No newline at end of file
+}
diff --git a/dolphinscheduler-task-plugin/dolphinscheduler-task-dataquality/src/main/java/org/apache/dolphinscheduler/plugin/task/dq/rule/entity/DqRuleInputEntry.java b/dolphinscheduler-task-plugin/dolphinscheduler-task-dataquality/src/main/java/org/apache/dolphinscheduler/plugin/task/dq/rule/entity/DqRuleInputEntry.java
index 0e88b6e430..246acf20b3 100644
--- a/dolphinscheduler-task-plugin/dolphinscheduler-task-dataquality/src/main/java/org/apache/dolphinscheduler/plugin/task/dq/rule/entity/DqRuleInputEntry.java
+++ b/dolphinscheduler-task-plugin/dolphinscheduler-task-dataquality/src/main/java/org/apache/dolphinscheduler/plugin/task/dq/rule/entity/DqRuleInputEntry.java
@@ -28,6 +28,7 @@ import java.util.Date;
  * RuleInputEntry
  */
 public class DqRuleInputEntry implements Serializable {
+
     /**
      * primary key
      */
@@ -102,7 +103,7 @@ public class DqRuleInputEntry implements Serializable {
      */
     private Date updateTime;
 
-    public int getId() {
+    public Integer getId() {
         return id;
     }
 
@@ -269,4 +270,4 @@ public class DqRuleInputEntry implements Serializable {
                 + ", updateTime=" + updateTime
                 + '}';
     }
-}
\ No newline at end of file
+}
diff --git a/pom.xml b/pom.xml
index 1e50eb29c9..87c9d588fd 100644
--- a/pom.xml
+++ b/pom.xml
@@ -450,6 +450,7 @@
                                 <workingDirectory>${project.basedir}</workingDirectory>
                                 <arguments>
                                     <argument>build</argument>
+                                    <argument>--load</argument>
                                     <argument>--no-cache</argument>
                                     <argument>-t</argument>
                                     <argument>${docker.hub}/${docker.repo}:${docker.tag}</argument>