mirror of
https://gitee.com/dolphinscheduler/DolphinScheduler.git
synced 2024-11-30 03:08:01 +08:00
Move utils, builder under master (#11000)
This commit is contained in:
parent
083ab2b5c9
commit
e1c78d1a49
@ -15,7 +15,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.apache.dolphinscheduler.server.builder;
|
package org.apache.dolphinscheduler.server.master.builder;
|
||||||
|
|
||||||
import static org.apache.dolphinscheduler.common.Constants.SEC_2_MINUTES_TIME_UNIT;
|
import static org.apache.dolphinscheduler.common.Constants.SEC_2_MINUTES_TIME_UNIT;
|
||||||
|
|
||||||
@ -30,9 +30,7 @@ import org.apache.dolphinscheduler.plugin.task.api.TaskExecutionContext;
|
|||||||
import org.apache.dolphinscheduler.plugin.task.api.enums.ExecutionStatus;
|
import org.apache.dolphinscheduler.plugin.task.api.enums.ExecutionStatus;
|
||||||
import org.apache.dolphinscheduler.plugin.task.api.enums.TaskTimeoutStrategy;
|
import org.apache.dolphinscheduler.plugin.task.api.enums.TaskTimeoutStrategy;
|
||||||
import org.apache.dolphinscheduler.plugin.task.api.model.Property;
|
import org.apache.dolphinscheduler.plugin.task.api.model.Property;
|
||||||
import org.apache.dolphinscheduler.plugin.task.api.parameters.AbstractParameters;
|
|
||||||
import org.apache.dolphinscheduler.plugin.task.api.parameters.resource.ResourceParametersHelper;
|
import org.apache.dolphinscheduler.plugin.task.api.parameters.resource.ResourceParametersHelper;
|
||||||
import org.apache.dolphinscheduler.service.expand.CuringParamsService;
|
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
@ -28,7 +28,7 @@ import org.apache.dolphinscheduler.server.master.config.MasterConfig;
|
|||||||
import org.apache.dolphinscheduler.server.master.processor.queue.TaskEvent;
|
import org.apache.dolphinscheduler.server.master.processor.queue.TaskEvent;
|
||||||
import org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteRunnable;
|
import org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteRunnable;
|
||||||
import org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteThreadPool;
|
import org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteThreadPool;
|
||||||
import org.apache.dolphinscheduler.server.utils.DataQualityResultOperator;
|
import org.apache.dolphinscheduler.server.master.utils.DataQualityResultOperator;
|
||||||
import org.apache.dolphinscheduler.service.process.ProcessService;
|
import org.apache.dolphinscheduler.service.process.ProcessService;
|
||||||
|
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
@ -71,7 +71,7 @@ import org.apache.dolphinscheduler.plugin.task.api.utils.JdbcUrlParser;
|
|||||||
import org.apache.dolphinscheduler.plugin.task.api.utils.MapUtils;
|
import org.apache.dolphinscheduler.plugin.task.api.utils.MapUtils;
|
||||||
import org.apache.dolphinscheduler.plugin.task.dq.DataQualityParameters;
|
import org.apache.dolphinscheduler.plugin.task.dq.DataQualityParameters;
|
||||||
import org.apache.dolphinscheduler.plugin.task.k8s.K8sTaskParameters;
|
import org.apache.dolphinscheduler.plugin.task.k8s.K8sTaskParameters;
|
||||||
import org.apache.dolphinscheduler.server.builder.TaskExecutionContextBuilder;
|
import org.apache.dolphinscheduler.server.master.builder.TaskExecutionContextBuilder;
|
||||||
import org.apache.dolphinscheduler.server.master.config.MasterConfig;
|
import org.apache.dolphinscheduler.server.master.config.MasterConfig;
|
||||||
import org.apache.dolphinscheduler.service.bean.SpringApplicationContext;
|
import org.apache.dolphinscheduler.service.bean.SpringApplicationContext;
|
||||||
import org.apache.dolphinscheduler.service.expand.CuringParamsService;
|
import org.apache.dolphinscheduler.service.expand.CuringParamsService;
|
||||||
@ -83,7 +83,6 @@ import org.apache.dolphinscheduler.spi.utils.StringUtils;
|
|||||||
|
|
||||||
import org.apache.commons.collections.CollectionUtils;
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
|
|
||||||
import java.time.Duration;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -26,7 +26,7 @@ import org.apache.dolphinscheduler.plugin.task.api.enums.TaskTimeoutStrategy;
|
|||||||
import org.apache.dolphinscheduler.plugin.task.api.model.DependentTaskModel;
|
import org.apache.dolphinscheduler.plugin.task.api.model.DependentTaskModel;
|
||||||
import org.apache.dolphinscheduler.plugin.task.api.parameters.DependentParameters;
|
import org.apache.dolphinscheduler.plugin.task.api.parameters.DependentParameters;
|
||||||
import org.apache.dolphinscheduler.plugin.task.api.utils.DependentUtils;
|
import org.apache.dolphinscheduler.plugin.task.api.utils.DependentUtils;
|
||||||
import org.apache.dolphinscheduler.server.utils.DependentExecute;
|
import org.apache.dolphinscheduler.server.master.utils.DependentExecute;
|
||||||
import org.apache.dolphinscheduler.server.utils.LogUtils;
|
import org.apache.dolphinscheduler.server.utils.LogUtils;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
@ -27,8 +27,8 @@ import org.apache.dolphinscheduler.plugin.task.api.enums.ExecutionStatus;
|
|||||||
import org.apache.dolphinscheduler.plugin.task.api.model.Property;
|
import org.apache.dolphinscheduler.plugin.task.api.model.Property;
|
||||||
import org.apache.dolphinscheduler.plugin.task.api.model.SwitchResultVo;
|
import org.apache.dolphinscheduler.plugin.task.api.model.SwitchResultVo;
|
||||||
import org.apache.dolphinscheduler.plugin.task.api.parameters.SwitchParameters;
|
import org.apache.dolphinscheduler.plugin.task.api.parameters.SwitchParameters;
|
||||||
|
import org.apache.dolphinscheduler.server.master.utils.SwitchTaskUtils;
|
||||||
import org.apache.dolphinscheduler.server.utils.LogUtils;
|
import org.apache.dolphinscheduler.server.utils.LogUtils;
|
||||||
import org.apache.dolphinscheduler.server.utils.SwitchTaskUtils;
|
|
||||||
|
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
@ -30,7 +30,7 @@ import org.apache.dolphinscheduler.plugin.task.api.TaskExecutionContext;
|
|||||||
import org.apache.dolphinscheduler.plugin.task.api.enums.ExecutionStatus;
|
import org.apache.dolphinscheduler.plugin.task.api.enums.ExecutionStatus;
|
||||||
import org.apache.dolphinscheduler.remote.command.TaskKillRequestCommand;
|
import org.apache.dolphinscheduler.remote.command.TaskKillRequestCommand;
|
||||||
import org.apache.dolphinscheduler.remote.utils.Host;
|
import org.apache.dolphinscheduler.remote.utils.Host;
|
||||||
import org.apache.dolphinscheduler.server.builder.TaskExecutionContextBuilder;
|
import org.apache.dolphinscheduler.server.master.builder.TaskExecutionContextBuilder;
|
||||||
import org.apache.dolphinscheduler.server.master.config.MasterConfig;
|
import org.apache.dolphinscheduler.server.master.config.MasterConfig;
|
||||||
import org.apache.dolphinscheduler.server.master.dispatch.exceptions.ExecuteException;
|
import org.apache.dolphinscheduler.server.master.dispatch.exceptions.ExecuteException;
|
||||||
import org.apache.dolphinscheduler.server.master.dispatch.executor.NettyExecutorManager;
|
import org.apache.dolphinscheduler.server.master.dispatch.executor.NettyExecutorManager;
|
||||||
|
@ -28,7 +28,7 @@ import org.apache.dolphinscheduler.dao.entity.ProcessInstance;
|
|||||||
import org.apache.dolphinscheduler.dao.entity.TaskInstance;
|
import org.apache.dolphinscheduler.dao.entity.TaskInstance;
|
||||||
import org.apache.dolphinscheduler.plugin.task.api.TaskExecutionContext;
|
import org.apache.dolphinscheduler.plugin.task.api.TaskExecutionContext;
|
||||||
import org.apache.dolphinscheduler.plugin.task.api.enums.ExecutionStatus;
|
import org.apache.dolphinscheduler.plugin.task.api.enums.ExecutionStatus;
|
||||||
import org.apache.dolphinscheduler.server.builder.TaskExecutionContextBuilder;
|
import org.apache.dolphinscheduler.server.master.builder.TaskExecutionContextBuilder;
|
||||||
import org.apache.dolphinscheduler.server.master.cache.ProcessInstanceExecCacheManager;
|
import org.apache.dolphinscheduler.server.master.cache.ProcessInstanceExecCacheManager;
|
||||||
import org.apache.dolphinscheduler.server.master.config.MasterConfig;
|
import org.apache.dolphinscheduler.server.master.config.MasterConfig;
|
||||||
import org.apache.dolphinscheduler.server.master.event.StateEvent;
|
import org.apache.dolphinscheduler.server.master.event.StateEvent;
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.apache.dolphinscheduler.server.utils;
|
package org.apache.dolphinscheduler.server.master.utils;
|
||||||
|
|
||||||
import static org.apache.dolphinscheduler.plugin.task.api.TaskConstants.TASK_TYPE_DATA_QUALITY;
|
import static org.apache.dolphinscheduler.plugin.task.api.TaskConstants.TASK_TYPE_DATA_QUALITY;
|
||||||
|
|
@ -15,7 +15,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.apache.dolphinscheduler.server.utils;
|
package org.apache.dolphinscheduler.server.master.utils;
|
||||||
|
|
||||||
import org.apache.dolphinscheduler.common.Constants;
|
import org.apache.dolphinscheduler.common.Constants;
|
||||||
import org.apache.dolphinscheduler.dao.entity.ProcessInstance;
|
import org.apache.dolphinscheduler.dao.entity.ProcessInstance;
|
@ -15,7 +15,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.apache.dolphinscheduler.server.utils;
|
package org.apache.dolphinscheduler.server.master.utils;
|
||||||
|
|
||||||
import javax.script.ScriptEngine;
|
import javax.script.ScriptEngine;
|
||||||
import javax.script.ScriptEngineManager;
|
import javax.script.ScriptEngineManager;
|
@ -26,7 +26,7 @@ import org.apache.dolphinscheduler.plugin.task.api.TaskExecutionContext;
|
|||||||
import org.apache.dolphinscheduler.remote.command.Command;
|
import org.apache.dolphinscheduler.remote.command.Command;
|
||||||
import org.apache.dolphinscheduler.remote.command.TaskDispatchCommand;
|
import org.apache.dolphinscheduler.remote.command.TaskDispatchCommand;
|
||||||
import org.apache.dolphinscheduler.remote.utils.Host;
|
import org.apache.dolphinscheduler.remote.utils.Host;
|
||||||
import org.apache.dolphinscheduler.server.builder.TaskExecutionContextBuilder;
|
import org.apache.dolphinscheduler.server.master.builder.TaskExecutionContextBuilder;
|
||||||
import org.apache.dolphinscheduler.server.master.dispatch.context.ExecutionContext;
|
import org.apache.dolphinscheduler.server.master.dispatch.context.ExecutionContext;
|
||||||
import org.apache.dolphinscheduler.server.master.dispatch.enums.ExecutorType;
|
import org.apache.dolphinscheduler.server.master.dispatch.enums.ExecutorType;
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ import org.apache.dolphinscheduler.remote.command.Command;
|
|||||||
import org.apache.dolphinscheduler.remote.command.TaskDispatchCommand;
|
import org.apache.dolphinscheduler.remote.command.TaskDispatchCommand;
|
||||||
import org.apache.dolphinscheduler.remote.config.NettyServerConfig;
|
import org.apache.dolphinscheduler.remote.config.NettyServerConfig;
|
||||||
import org.apache.dolphinscheduler.remote.utils.Host;
|
import org.apache.dolphinscheduler.remote.utils.Host;
|
||||||
import org.apache.dolphinscheduler.server.builder.TaskExecutionContextBuilder;
|
import org.apache.dolphinscheduler.server.master.builder.TaskExecutionContextBuilder;
|
||||||
import org.apache.dolphinscheduler.server.master.dispatch.context.ExecutionContext;
|
import org.apache.dolphinscheduler.server.master.dispatch.context.ExecutionContext;
|
||||||
import org.apache.dolphinscheduler.server.master.dispatch.enums.ExecutorType;
|
import org.apache.dolphinscheduler.server.master.dispatch.enums.ExecutorType;
|
||||||
import org.apache.dolphinscheduler.server.master.dispatch.exceptions.ExecuteException;
|
import org.apache.dolphinscheduler.server.master.dispatch.exceptions.ExecuteException;
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
package org.apache.dolphinscheduler.server.master.processor;
|
package org.apache.dolphinscheduler.server.master.processor;
|
||||||
|
|
||||||
import org.apache.dolphinscheduler.server.utils.DataQualityResultOperator;
|
import org.apache.dolphinscheduler.server.master.utils.DataQualityResultOperator;
|
||||||
|
|
||||||
import org.mockito.Mockito;
|
import org.mockito.Mockito;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
|
@ -24,10 +24,9 @@ import org.apache.dolphinscheduler.remote.command.TaskExecuteResultCommand;
|
|||||||
import org.apache.dolphinscheduler.remote.command.TaskExecuteRunningCommand;
|
import org.apache.dolphinscheduler.remote.command.TaskExecuteRunningCommand;
|
||||||
import org.apache.dolphinscheduler.server.master.cache.impl.ProcessInstanceExecCacheManagerImpl;
|
import org.apache.dolphinscheduler.server.master.cache.impl.ProcessInstanceExecCacheManagerImpl;
|
||||||
import org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteThreadPool;
|
import org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteThreadPool;
|
||||||
import org.apache.dolphinscheduler.server.utils.DataQualityResultOperator;
|
import org.apache.dolphinscheduler.server.master.utils.DataQualityResultOperator;
|
||||||
import org.apache.dolphinscheduler.service.process.ProcessService;
|
import org.apache.dolphinscheduler.service.process.ProcessService;
|
||||||
|
|
||||||
import java.net.InetSocketAddress;
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
import org.junit.After;
|
import org.junit.After;
|
||||||
@ -36,7 +35,6 @@ import org.junit.Test;
|
|||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
import org.mockito.InjectMocks;
|
import org.mockito.InjectMocks;
|
||||||
import org.mockito.Mock;
|
import org.mockito.Mock;
|
||||||
import org.mockito.Mockito;
|
|
||||||
import org.mockito.junit.MockitoJUnitRunner;
|
import org.mockito.junit.MockitoJUnitRunner;
|
||||||
|
|
||||||
import io.netty.channel.Channel;
|
import io.netty.channel.Channel;
|
||||||
|
Loading…
Reference in New Issue
Block a user