You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2020/10/24 09:24:48 UTC

[GitHub] [incubator-dolphinscheduler] CalvinKirs commented on a change in pull request #3957: [Fix-#3956][Master] When running a task, the resource file is lost

CalvinKirs commented on a change in pull request #3957:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/3957#discussion_r511360415



##########
File path: dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/VarPoolUtils.java
##########
@@ -62,11 +39,20 @@ public static void setTaskNodeLocalParams(TaskNode taskNode, String prop, Object
      */
     public static void setTaskNodeLocalParams(TaskNode taskNode, Map<String, Object> propToValue) {
         String taskParamsJson = taskNode.getParams();
-        TaskParams taskParams = JSONUtils.parseObject(taskParamsJson, TaskParams.class);
-        if (taskParams == null) {
-            return;
+        Map<String,Object> taskParams = JSONUtils.parseObject(taskParamsJson, HashMap.class);
+
+        Object localParamsObject = taskParams.get(LOCALPARAMS);
+        if (null != localParamsObject && null != propToValue && propToValue.size() > 0) {
+            ArrayList<Object> localParams = (ArrayList)localParamsObject;

Review comment:
        no need to use list




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org