Browse Source

1. change windows new line 'CR' to linux new line 'LF'
2. Format code

simon824 4 years ago
parent
commit
f643981f48

File diff suppressed because it is too large
+ 133 - 1
dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/command/TaskExecuteAckCommand.java


File diff suppressed because it is too large
+ 67 - 1
dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/command/TaskExecuteRequestCommand.java


File diff suppressed because it is too large
+ 129 - 1
dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/command/TaskExecuteResponseCommand.java


+ 1 - 2
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/runner/TaskExecuteThread.java

@@ -153,8 +153,7 @@ public class TaskExecuteThread implements Runnable {
         // global params string
         String globalParamsStr = taskExecutionContext.getGlobalParams();
         if (globalParamsStr != null) {
-            List<Property> globalParamsList = new ArrayList<>();
-            globalParamsList = JSONUtils.toList(globalParamsStr, Property.class);
+            List<Property> globalParamsList = JSONUtils.toList(globalParamsStr, Property.class);
             globalParamsMap.putAll(globalParamsList.stream().collect(Collectors.toMap(Property::getProp, Property::getValue)));
         }
         return globalParamsMap;

+ 1 - 2
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java

@@ -207,14 +207,13 @@ public class ProcessService {
 
         if(cmdTypeMap.containsKey(commandType)){
             ObjectNode cmdParamObj = JSONUtils.parseObject(command.getCommandParam());
-            ObjectNode tempObj;
             int processInstanceId = cmdParamObj.path(CMDPARAM_RECOVER_PROCESS_ID_STRING).asInt();
 
             List<Command> commands = commandMapper.selectList(null);
             // for all commands
             for (Command tmpCommand:commands){
                 if(cmdTypeMap.containsKey(tmpCommand.getCommandType())){
-                    tempObj = JSONUtils.parseObject(tmpCommand.getCommandParam());
+                    ObjectNode tempObj = JSONUtils.parseObject(tmpCommand.getCommandParam());
                     if(tempObj != null && processInstanceId == tempObj.path(CMDPARAM_RECOVER_PROCESS_ID_STRING).asInt()){
                         isNeedCreate = false;
                         break;