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 289ae6a  Implements the spark and flink type task, now they can be 
cache the previous input. (#1795)
289ae6a is described below

commit 289ae6ac96857dc965a05f37285def8cbc4a5b34
Author: zhukai <[email protected]>
AuthorDate: Mon Jan 13 10:18:43 2020 +0800

    Implements the spark and flink type task, now they can be cache the 
previous input. (#1795)
---
 .../home/pages/dag/_source/formModel/formModel.vue |  4 +++
 .../_source/formModel/tasks/_source/resources.vue  |  7 +++++
 .../pages/dag/_source/formModel/tasks/flink.vue    | 35 +++++++++++++++++++++
 .../pages/dag/_source/formModel/tasks/spark.vue    | 36 ++++++++++++++++++++++
 4 files changed, 82 insertions(+)

diff --git 
a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/formModel.vue
 
b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/formModel.vue
index bca4eec..43ed9a1 100644
--- 
a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/formModel.vue
+++ 
b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/formModel.vue
@@ -152,12 +152,14 @@
         <m-spark
           v-if="taskType === 'SPARK'"
           @on-params="_onParams"
+          @on-cache-params="_onCacheParams"
           ref="SPARK"
           :backfill-item="backfillItem">
         </m-spark>
         <m-flink
           v-if="taskType === 'FLINK'"
           @on-params="_onParams"
+          @on-cache-params="_onCacheParams"
           ref="FLINK"
           :backfill-item="backfillItem">
         </m-flink>
@@ -511,6 +513,8 @@
             this.workerGroupId = o.workerGroupId
           }
 
+        this.params = o.params || {};
+
       }
       this.isContentBox = true
     },
diff --git 
a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/resources.vue
 
b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/resources.vue
index 64543fc..8b578c7 100644
--- 
a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/resources.vue
+++ 
b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/resources.vue
@@ -66,6 +66,13 @@
       // Listening data source
       resourceList (a) {
         this.value = _.map(_.cloneDeep(a), v => v.res)
+      },
+      value (val) {
+        this.$emit('on-cache-resourcesData', _.map(val, v => {
+          return {
+            res: v
+          }
+        }))
       }
     },
     created () {
diff --git 
a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/flink.vue
 
b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/flink.vue
index a71c8d7..f0d69ec 100644
--- 
a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/flink.vue
+++ 
b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/flink.vue
@@ -154,6 +154,7 @@
         <m-resources
                 ref="refResources"
                 @on-resourcesData="_onResourcesData"
+                @on-cache-resourcesData="_onCacheResourcesData"
                 :resource-list="resourceList">
         </m-resources>
       </div>
@@ -193,6 +194,8 @@
         deployMode: 'cluster',
         // Resource(list)
         resourceList: [],
+        // Cache ResourceList
+        cacheResourceList: [],
         // Custom function
         localParams: [],
         // Driver Number of cores
@@ -233,6 +236,12 @@
         this.resourceList = a
       },
       /**
+       * cache resourceList
+       */
+      _onCacheResourcesData (a) {
+        this.cacheResourceList = a
+      },
+      /**
        * verification
        */
       _verification () {
@@ -336,6 +345,31 @@
         if (type === 'PYTHON') {
           this.mainClass = ''
         }
+      },
+      //Watch the cacheParams
+      cacheParams (val) {
+        this.$emit('on-cache-params', val);
+      }
+    },
+    computed: {
+      cacheParams () {
+        return {
+          mainClass: this.mainClass,
+          mainJar: {
+            res: this.mainJar
+          },
+          deployMode: this.deployMode,
+          resourceList: this.cacheResourceList,
+          localParams: this.localParams,
+          slot: this.slot,
+          taskManager: this.taskManager,
+          jobManagerMemory: this.jobManagerMemory,
+          taskManagerMemory: this.taskManagerMemory,
+          executorCores: this.executorCores,
+          mainArgs: this.mainArgs,
+          others: this.others,
+          programType: this.programType
+        }
       }
     },
     created () {
@@ -360,6 +394,7 @@
           let resourceList = o.params.resourceList || []
           if (resourceList.length) {
             this.resourceList = resourceList
+            this.cacheResourceList = resourceList
           }
 
           // backfill localParams
diff --git 
a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/spark.vue
 
b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/spark.vue
index 2457a23..66a89a4 100644
--- 
a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/spark.vue
+++ 
b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/spark.vue
@@ -182,6 +182,7 @@
         <m-resources
                 ref="refResources"
                 @on-resourcesData="_onResourcesData"
+                @on-cache-resourcesData="_onCacheResourcesData"
                 :resource-list="resourceList">
         </m-resources>
       </div>
@@ -221,6 +222,8 @@
         deployMode: 'cluster',
         // Resource(list)
         resourceList: [],
+        // Cache ResourceList
+        cacheResourceList: [],
         // Custom function
         localParams: [],
         // Driver Number of cores
@@ -265,6 +268,12 @@
         this.resourceList = a
       },
       /**
+       * cache resourceList
+       */
+      _onCacheResourcesData (a) {
+        this.cacheResourceList = a
+      },
+      /**
        * verification
        */
       _verification () {
@@ -368,6 +377,32 @@
         if (type === 'PYTHON') {
           this.mainClass = ''
         }
+      },
+      //Watch the cacheParams
+      cacheParams (val) {
+        this.$emit('on-cache-params', val)
+      }
+    },
+    computed: {
+      cacheParams () {
+        return {
+          mainClass: this.mainClass,
+          mainJar: {
+            res: this.mainJar
+          },
+          deployMode: this.deployMode,
+          resourceList: this.cacheResourceList,
+          localParams: this.localParams,
+          driverCores: this.driverCores,
+          driverMemory: this.driverMemory,
+          numExecutors: this.numExecutors,
+          executorMemory: this.executorMemory,
+          executorCores: this.executorCores,
+          mainArgs: this.mainArgs,
+          others: this.others,
+          programType: this.programType,
+          sparkVersion: this.sparkVersion
+        }
       }
     },
     created () {
@@ -393,6 +428,7 @@
           let resourceList = o.params.resourceList || []
           if (resourceList.length) {
             this.resourceList = resourceList
+            this.cacheResourceList = resourceList
           }
 
           // backfill localParams

Reply via email to