Skip to content

Commit a471367

Browse files
author
xlinliu
committed
eventchecker传入run_date到properties里
1 parent 9ac2bca commit a471367

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

dss-appconn/appconns/dss-eventchecker-appconn/src/main/scala/com/webank/wedatasphere/dss/appconn/eventchecker/execution/EventCheckerRefExecutionOperation.scala

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,14 @@
1717
package com.webank.wedatasphere.dss.appconn.eventchecker.execution
1818

1919
import java.util.{Properties, UUID}
20-
2120
import com.webank.wedatasphere.dss.appconn.eventchecker.entity.EventChecker
2221
import com.webank.wedatasphere.dss.standard.app.development.listener.common._
2322
import com.webank.wedatasphere.dss.standard.app.development.listener.core.{Killable, LongTermRefExecutionOperation, Procedure}
2423
import com.webank.wedatasphere.dss.standard.app.development.listener.ref.ExecutionResponseRef.ExecutionResponseRefBuilder
2524
import com.webank.wedatasphere.dss.standard.app.development.listener.ref.{AsyncExecutionResponseRef, ExecutionResponseRef, RefExecutionRequestRef}
2625
import org.apache.commons.io.IOUtils
2726
import org.apache.linkis.common.log.LogUtils
28-
import org.apache.linkis.common.utils.Utils
27+
import org.apache.linkis.common.utils.{Utils, VariableUtils}
2928
import org.apache.linkis.storage.LineRecord
3029

3130

@@ -77,6 +76,10 @@ class EventCheckerRefExecutionOperation
7776
val InstanceConfig = this.service.getAppInstance.getConfig
7877
val scalaParams: scala.collection.mutable.Map[String, Object] = requestRef.getExecutionRequestRefContext.getRuntimeMap
7978
val properties = new Properties()
79+
val variableParams: scala.collection.mutable.Map[String, Object] = requestRef.getRefJobContent.get("variable").asInstanceOf[java.util.Map[String, Object]]
80+
if (variableParams.exists(x => x._1.equalsIgnoreCase(VariableUtils.RUN_DATE))) {
81+
properties.put(VariableUtils.RUN_DATE, variableParams.get(VariableUtils.RUN_DATE))
82+
}
8083
InstanceConfig.foreach { record =>
8184
if(null == record._2) {
8285
properties.put(record._1, "")}

0 commit comments

Comments
 (0)