提交 289ae6ac 编写于 作者: Z zhukai 提交者: qiaozhanwei

Implements the spark and flink type task, now they can be cache the previous input. (#1795)

上级 24f362de
......@@ -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
},
......
......@@ -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 () {
......
......@@ -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
......@@ -232,6 +235,12 @@
_onResourcesData (a) {
this.resourceList = a
},
/**
* cache resourceList
*/
_onCacheResourcesData (a) {
this.cacheResourceList = a
},
/**
* 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
......
......@@ -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
......@@ -264,6 +267,12 @@
_onResourcesData (a) {
this.resourceList = a
},
/**
* cache resourceList
*/
_onCacheResourcesData (a) {
this.cacheResourceList = a
},
/**
* 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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册