This is an automated email from the ASF dual-hosted git repository.
journey pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-dolphinscheduler.git
The following commit(s) were added to refs/heads/dev by this push:
new c531c88 [Feature] AbstractCommandExecutor.commandType difficult to
understand (#1833)
c531c88 is described below
commit c531c88e7e8d6a88c07fd09857b7c473d5ce35db
Author: gabry.wu <[email protected]>
AuthorDate: Thu Jan 16 11:27:22 2020 +0800
[Feature] AbstractCommandExecutor.commandType difficult to understand
(#1833)
issue: https://github.com/apache/incubator-dolphinscheduler/issues/1831
---
.../dolphinscheduler/server/worker/task/AbstractCommandExecutor.java | 4 ++--
.../dolphinscheduler/server/worker/task/PythonCommandExecutor.java | 2 +-
.../dolphinscheduler/server/worker/task/ShellCommandExecutor.java | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git
a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/task/AbstractCommandExecutor.java
b/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/task/AbstractCommandExecutor.java
index 7a14223..11934de 100644
---
a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/task/AbstractCommandExecutor.java
+++
b/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/task/AbstractCommandExecutor.java
@@ -207,7 +207,7 @@ public abstract class AbstractCommandExecutor {
// merge error information to standard output stream
processBuilder.redirectErrorStream(true);
// setting up user to run commands
- processBuilder.command("sudo", "-u", tenantCode, commandType(),
commandFile);
+ processBuilder.command("sudo", "-u", tenantCode, commandInterpreter(),
commandFile);
process = processBuilder.start();
@@ -561,7 +561,7 @@ public abstract class AbstractCommandExecutor {
protected abstract String buildCommandFilePath();
- protected abstract String commandType();
+ protected abstract String commandInterpreter();
protected abstract boolean checkFindApp(String line);
protected abstract void createCommandFileIfNotExists(String execCommand,
String commandFile) throws IOException;
}
diff --git
a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/task/PythonCommandExecutor.java
b/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/task/PythonCommandExecutor.java
index c1ff89d..c943e5d 100644
---
a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/task/PythonCommandExecutor.java
+++
b/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/task/PythonCommandExecutor.java
@@ -113,7 +113,7 @@ public class PythonCommandExecutor extends
AbstractCommandExecutor {
* @return python home
*/
@Override
- protected String commandType() {
+ protected String commandInterpreter() {
String pythonHome = getPythonHome(envFile);
if (StringUtils.isEmpty(pythonHome)){
return PYTHON;
diff --git
a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/task/ShellCommandExecutor.java
b/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/task/ShellCommandExecutor.java
index d1a7fa2..db46d0d 100644
---
a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/task/ShellCommandExecutor.java
+++
b/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/task/ShellCommandExecutor.java
@@ -74,7 +74,7 @@ public class ShellCommandExecutor extends
AbstractCommandExecutor {
* @return command type
*/
@Override
- protected String commandType() {
+ protected String commandInterpreter() {
return SH;
}