|
|
@ -59,6 +59,8 @@ import org.apache.dolphinscheduler.dao.mapper.TaskDefinitionMapper; |
|
|
|
import org.apache.dolphinscheduler.server.config.PythonGatewayConfig; |
|
|
|
import org.apache.dolphinscheduler.server.config.PythonGatewayConfig; |
|
|
|
import org.apache.dolphinscheduler.spi.enums.ResourceType; |
|
|
|
import org.apache.dolphinscheduler.spi.enums.ResourceType; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import org.apache.commons.collections.CollectionUtils; |
|
|
|
|
|
|
|
|
|
|
|
import java.net.InetAddress; |
|
|
|
import java.net.InetAddress; |
|
|
|
import java.net.UnknownHostException; |
|
|
|
import java.net.UnknownHostException; |
|
|
|
import java.util.Date; |
|
|
|
import java.util.Date; |
|
|
@ -66,7 +68,6 @@ import java.util.HashMap; |
|
|
|
import java.util.List; |
|
|
|
import java.util.List; |
|
|
|
import java.util.Map; |
|
|
|
import java.util.Map; |
|
|
|
import java.util.Objects; |
|
|
|
import java.util.Objects; |
|
|
|
import java.util.TimeZone; |
|
|
|
|
|
|
|
import java.util.stream.Collectors; |
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
|
|
|
|
import javax.annotation.PostConstruct; |
|
|
|
import javax.annotation.PostConstruct; |
|
|
@ -74,7 +75,6 @@ import javax.annotation.PostConstruct; |
|
|
|
import org.slf4j.Logger; |
|
|
|
import org.slf4j.Logger; |
|
|
|
import org.slf4j.LoggerFactory; |
|
|
|
import org.slf4j.LoggerFactory; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.beans.factory.annotation.Value; |
|
|
|
|
|
|
|
import org.springframework.boot.SpringApplication; |
|
|
|
import org.springframework.boot.SpringApplication; |
|
|
|
import org.springframework.boot.autoconfigure.SpringBootApplication; |
|
|
|
import org.springframework.boot.autoconfigure.SpringBootApplication; |
|
|
|
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; |
|
|
|
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; |
|
|
@ -82,8 +82,6 @@ import org.springframework.context.annotation.ComponentScan; |
|
|
|
|
|
|
|
|
|
|
|
import py4j.GatewayServer; |
|
|
|
import py4j.GatewayServer; |
|
|
|
|
|
|
|
|
|
|
|
import org.apache.commons.collections.CollectionUtils; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@SpringBootApplication |
|
|
|
@SpringBootApplication |
|
|
|
@ComponentScan(value = "org.apache.dolphinscheduler") |
|
|
|
@ComponentScan(value = "org.apache.dolphinscheduler") |
|
|
|
public class PythonGatewayServer extends SpringBootServletInitializer { |
|
|
|
public class PythonGatewayServer extends SpringBootServletInitializer { |
|
|
@ -148,14 +146,6 @@ public class PythonGatewayServer extends SpringBootServletInitializer { |
|
|
|
@Autowired |
|
|
|
@Autowired |
|
|
|
private ProjectUserMapper projectUserMapper; |
|
|
|
private ProjectUserMapper projectUserMapper; |
|
|
|
|
|
|
|
|
|
|
|
@Value("${spring.jackson.time-zone:UTC}") |
|
|
|
|
|
|
|
private String timezone; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@PostConstruct |
|
|
|
|
|
|
|
public void init() { |
|
|
|
|
|
|
|
TimeZone.setDefault(TimeZone.getTimeZone(timezone)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// TODO replace this user to build in admin user if we make sure build in one could not be change
|
|
|
|
// TODO replace this user to build in admin user if we make sure build in one could not be change
|
|
|
|
private final User dummyAdminUser = new User() { |
|
|
|
private final User dummyAdminUser = new User() { |
|
|
|
{ |
|
|
|
{ |
|
|
@ -266,6 +256,7 @@ public class PythonGatewayServer extends SpringBootServletInitializer { |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* get process definition |
|
|
|
* get process definition |
|
|
|
|
|
|
|
* |
|
|
|
* @param user user who create or update schedule |
|
|
|
* @param user user who create or update schedule |
|
|
|
* @param projectCode project which process definition belongs to |
|
|
|
* @param projectCode project which process definition belongs to |
|
|
|
* @param processDefinitionName process definition name |
|
|
|
* @param processDefinitionName process definition name |
|
|
|