|
|
@ -32,7 +32,6 @@ import org.apache.dolphinscheduler.plugin.task.api.parameters.AbstractParameters |
|
|
|
import org.apache.dolphinscheduler.plugin.task.api.parser.ParamUtils; |
|
|
|
import org.apache.dolphinscheduler.plugin.task.api.parser.ParamUtils; |
|
|
|
import org.apache.dolphinscheduler.plugin.task.api.parser.ParameterUtils; |
|
|
|
import org.apache.dolphinscheduler.plugin.task.api.parser.ParameterUtils; |
|
|
|
import org.apache.dolphinscheduler.plugin.task.api.utils.MapUtils; |
|
|
|
import org.apache.dolphinscheduler.plugin.task.api.utils.MapUtils; |
|
|
|
import org.apache.dolphinscheduler.plugin.task.api.utils.OSUtils; |
|
|
|
|
|
|
|
import org.apache.dolphinscheduler.spi.datasource.BaseConnectionParam; |
|
|
|
import org.apache.dolphinscheduler.spi.datasource.BaseConnectionParam; |
|
|
|
import org.apache.dolphinscheduler.spi.enums.DbType; |
|
|
|
import org.apache.dolphinscheduler.spi.enums.DbType; |
|
|
|
import org.apache.dolphinscheduler.spi.enums.Flag; |
|
|
|
import org.apache.dolphinscheduler.spi.enums.Flag; |
|
|
@ -41,6 +40,7 @@ import org.apache.dolphinscheduler.spi.utils.StringUtils; |
|
|
|
|
|
|
|
|
|
|
|
import org.apache.commons.collections4.CollectionUtils; |
|
|
|
import org.apache.commons.collections4.CollectionUtils; |
|
|
|
import org.apache.commons.io.FileUtils; |
|
|
|
import org.apache.commons.io.FileUtils; |
|
|
|
|
|
|
|
import org.apache.commons.lang3.SystemUtils; |
|
|
|
|
|
|
|
|
|
|
|
import java.io.File; |
|
|
|
import java.io.File; |
|
|
|
import java.nio.charset.StandardCharsets; |
|
|
|
import java.nio.charset.StandardCharsets; |
|
|
@ -382,7 +382,7 @@ public class DataxTask extends AbstractTaskExecutor { |
|
|
|
String fileName = String.format("%s/%s_node.%s", |
|
|
|
String fileName = String.format("%s/%s_node.%s", |
|
|
|
taskExecutionContext.getExecutePath(), |
|
|
|
taskExecutionContext.getExecutePath(), |
|
|
|
taskExecutionContext.getTaskAppId(), |
|
|
|
taskExecutionContext.getTaskAppId(), |
|
|
|
OSUtils.isWindows() ? "bat" : "sh"); |
|
|
|
SystemUtils.IS_OS_WINDOWS ? "bat" : "sh"); |
|
|
|
|
|
|
|
|
|
|
|
Path path = new File(fileName).toPath(); |
|
|
|
Path path = new File(fileName).toPath(); |
|
|
|
|
|
|
|
|
|
|
@ -408,7 +408,7 @@ public class DataxTask extends AbstractTaskExecutor { |
|
|
|
Set<PosixFilePermission> perms = PosixFilePermissions.fromString(RWXR_XR_X); |
|
|
|
Set<PosixFilePermission> perms = PosixFilePermissions.fromString(RWXR_XR_X); |
|
|
|
FileAttribute<Set<PosixFilePermission>> attr = PosixFilePermissions.asFileAttribute(perms); |
|
|
|
FileAttribute<Set<PosixFilePermission>> attr = PosixFilePermissions.asFileAttribute(perms); |
|
|
|
|
|
|
|
|
|
|
|
if (OSUtils.isWindows()) { |
|
|
|
if (SystemUtils.IS_OS_WINDOWS) { |
|
|
|
Files.createFile(path); |
|
|
|
Files.createFile(path); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
Files.createFile(path, attr); |
|
|
|
Files.createFile(path, attr); |
|
|
|