Commit a4f29e47 authored by sml's avatar sml

代码提交

parent 2a9c340d
...@@ -557,7 +557,7 @@ ...@@ -557,7 +557,7 @@
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId> <artifactId>spring-boot-maven-plugin</artifactId>
<configuration> <configuration>
<mainClass>com.jz.DmpApplication</mainClass> <mainClass>com.jz.dmp.cmdexectool.ApiApplication</mainClass>
</configuration> </configuration>
<!--<dependencies> <!--<dependencies>
<dependency> <dependency>
......
...@@ -243,6 +243,7 @@ public class TaskExecutionContext implements Serializable { ...@@ -243,6 +243,7 @@ public class TaskExecutionContext implements Serializable {
this.setTaskParams(JSONObject.toJSONString(shellParameters)); this.setTaskParams(JSONObject.toJSONString(shellParameters));
this.setTaskAppId(shellParameters.getTaskAppId()); this.setTaskAppId(shellParameters.getTaskAppId());
this.setParameters(shellParameters); this.setParameters(shellParameters);
this.tenantCode = "root";
} }
public TaskExecutionContext(SqlParameters sqlParameters, DmpProjectConfigInfoDto configInfoDto) { public TaskExecutionContext(SqlParameters sqlParameters, DmpProjectConfigInfoDto configInfoDto) {
...@@ -251,6 +252,7 @@ public class TaskExecutionContext implements Serializable { ...@@ -251,6 +252,7 @@ public class TaskExecutionContext implements Serializable {
this.setTaskParams(JSONObject.toJSONString(sqlParameters)); this.setTaskParams(JSONObject.toJSONString(sqlParameters));
this.setTaskAppId(sqlParameters.getTaskAppId()); this.setTaskAppId(sqlParameters.getTaskAppId());
this.setParameters(sqlParameters); this.setParameters(sqlParameters);
this.tenantCode = "root";
} }
public TaskExecutionContext(FtpParameters ftpParameters, DmpProjectConfigInfoDto configInfoDto) { public TaskExecutionContext(FtpParameters ftpParameters, DmpProjectConfigInfoDto configInfoDto) {
...@@ -259,6 +261,7 @@ public class TaskExecutionContext implements Serializable { ...@@ -259,6 +261,7 @@ public class TaskExecutionContext implements Serializable {
this.setTaskParams(JSONObject.toJSONString(ftpParameters)); this.setTaskParams(JSONObject.toJSONString(ftpParameters));
this.setTaskAppId(ftpParameters.getTaskAppId()); this.setTaskAppId(ftpParameters.getTaskAppId());
this.setParameters(ftpParameters); this.setParameters(ftpParameters);
this.tenantCode = "root";
} }
public TaskExecutionContext(UnzipfileParameters unzipfileParameters, DmpProjectConfigInfoDto configInfoDto) { public TaskExecutionContext(UnzipfileParameters unzipfileParameters, DmpProjectConfigInfoDto configInfoDto) {
...@@ -267,6 +270,7 @@ public class TaskExecutionContext implements Serializable { ...@@ -267,6 +270,7 @@ public class TaskExecutionContext implements Serializable {
this.setTaskParams(JSONObject.toJSONString(unzipfileParameters)); this.setTaskParams(JSONObject.toJSONString(unzipfileParameters));
this.setTaskAppId(unzipfileParameters.getTaskAppId()); this.setTaskAppId(unzipfileParameters.getTaskAppId());
this.setParameters(unzipfileParameters); this.setParameters(unzipfileParameters);
this.tenantCode = "root";
} }
public TaskExecutionContext(DoctransParameters doctransParameters, DmpProjectConfigInfoDto configInfoDto) { public TaskExecutionContext(DoctransParameters doctransParameters, DmpProjectConfigInfoDto configInfoDto) {
...@@ -275,6 +279,7 @@ public class TaskExecutionContext implements Serializable { ...@@ -275,6 +279,7 @@ public class TaskExecutionContext implements Serializable {
this.setTaskParams(JSONObject.toJSONString(doctransParameters)); this.setTaskParams(JSONObject.toJSONString(doctransParameters));
this.setTaskAppId(doctransParameters.getTaskAppId()); this.setTaskAppId(doctransParameters.getTaskAppId());
this.setParameters(doctransParameters); this.setParameters(doctransParameters);
this.tenantCode = "root";
} }
public TaskExecutionContext(HdfsParameters hdfsParameters, DmpProjectConfigInfoDto configInfoDto) { public TaskExecutionContext(HdfsParameters hdfsParameters, DmpProjectConfigInfoDto configInfoDto) {
...@@ -283,6 +288,7 @@ public class TaskExecutionContext implements Serializable { ...@@ -283,6 +288,7 @@ public class TaskExecutionContext implements Serializable {
this.setTaskParams(JSONObject.toJSONString(hdfsParameters)); this.setTaskParams(JSONObject.toJSONString(hdfsParameters));
this.setTaskAppId(hdfsParameters.getTaskAppId()); this.setTaskAppId(hdfsParameters.getTaskAppId());
this.setParameters(hdfsParameters); this.setParameters(hdfsParameters);
this.tenantCode = "root";
} }
public TaskExecutionContext(SyncParameters syncParameters, DmpProjectConfigInfoDto configInfoDto) { public TaskExecutionContext(SyncParameters syncParameters, DmpProjectConfigInfoDto configInfoDto) {
...@@ -291,6 +297,7 @@ public class TaskExecutionContext implements Serializable { ...@@ -291,6 +297,7 @@ public class TaskExecutionContext implements Serializable {
this.setTaskParams(JSONObject.toJSONString(syncParameters)); this.setTaskParams(JSONObject.toJSONString(syncParameters));
this.setTaskAppId(syncParameters.getTaskAppId()); this.setTaskAppId(syncParameters.getTaskAppId());
this.setParameters(syncParameters); this.setParameters(syncParameters);
this.tenantCode = "root";
} }
public int getTaskInstanceId() { public int getTaskInstanceId() {
......
...@@ -154,6 +154,7 @@ public abstract class AbstractCommandExecutor { ...@@ -154,6 +154,7 @@ public abstract class AbstractCommandExecutor {
command.add(commandFile); command.add(commandFile);
// setting commands // setting commands
logger.info("executor shell command【{}】", command);
processBuilder.command(command); processBuilder.command(command);
process = processBuilder.start(); process = processBuilder.start();
} }
......
...@@ -108,7 +108,7 @@ public class FtpTask extends AbstractTask { ...@@ -108,7 +108,7 @@ public class FtpTask extends AbstractTask {
*/ */
private String buildCommand() throws Exception { private String buildCommand() throws Exception {
// generate scripts // generate scripts
String fileName = String.format("%s/%s_node.%s", taskExecutionContext.getExecutePath(), String fileName = String.format("%s/%s_node2.%s", taskExecutionContext.getExecutePath(),
taskExecutionContext.getTaskAppId(), OSUtils.isWindows() ? "bat" : "sh"); taskExecutionContext.getTaskAppId(), OSUtils.isWindows() ? "bat" : "sh");
Path path = new File(fileName).toPath(); Path path = new File(fileName).toPath();
......
# 测试环境配置 # 测试环境配置
server: server:
port: 7181 port: 7183
#contextPath: /resource #contextPath: /resource
management: management:
port: 54001 port: 54003
health: health:
mail: mail:
enabled: false enabled: false
......
#!/bin/bash
# sftp 服务器IP地址 # sftp 服务器IP地址
ip=${ip!} ip=${ip!}
# sftp 服务器端口号 # sftp 服务器端口号
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment