Skip to content

Commit ffc1d6d

Browse files
committed
fix: 去除冗余代码#AI Commit#
1 parent 4981112 commit ffc1d6d

File tree

6 files changed

+5
-467
lines changed

6 files changed

+5
-467
lines changed

dss-orchestrator/orchestrators/dss-workflow/dss-flow-execution-server/src/main/scala/com/webank/wedatasphere/dss/flow/execution/entrance/node/BranchNodeRunner.scala

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,17 +101,18 @@ class BranchNodeRunner(flow: Workflow) extends NodeRunner with Logging {
101101
val parsedRules = BranchExpressionUtils.parseBranchRules(branchRuleText)
102102
logInfo(s"Branch node ${node.getName} parsed rules: ${parsedRules.map(rule => s"${rule.condition}=>success=${rule.targetName.getOrElse("")},failure=${rule.onFailureTarget.getOrElse("")}").mkString(", ")}")
103103
val selectedEdge = selectEdgeByRules(outgoingEdges, parsedRules, context)
104+
val selectedTarget = selectedEdge.map(_.getTarget).orNull
104105
if (selectedEdge.isEmpty) {
105-
throw new IllegalStateException(s"No branch rule matched for node ${node.getName}.")
106+
logInfo(s"Branch node ${node.getName} selected no downstream target.")
107+
} else {
108+
logInfo(s"Branch node ${node.getName} selected target id: ${Option(selectedTarget).getOrElse("")}")
106109
}
107-
val selectedTarget = selectedEdge.map(_.getTarget).orNull
108-
logInfo(s"Branch node ${node.getName} selected target id: ${Option(selectedTarget).getOrElse("")}")
109110
getNodeRunnerListener match {
110111
case flowEntranceJob: FlowEntranceJob =>
111112
flowEntranceJob.recordBranchSelection(currentNodeId, selectedTarget)
112113
case _ =>
113114
}
114-
this.executedInfo = Option(selectedTarget).getOrElse("default")
115+
this.executedInfo = Option(selectedTarget).getOrElse("")
115116
this.transitionState(NodeExecutionState.Succeed)
116117
} catch {
117118
case t: Throwable =>

plugins/azkaban/linkis-jobtype/src/main/java/com/webank/wedatasphere/dss/plugins/azkaban/linkis/jobtype/conf/LinkisJobTypeConf.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,6 @@ public class LinkisJobTypeConf {
4444
public static final String LINKIS_TYPE_KEY = "linkistype";
4545
public static final String FLOW_VARIABLE_PREFIX = "flow.variable.";
4646

47-
public static final String BRANCH_ROUTE_LINKIS_TYPE = "linkis.appconn.branch.route";
48-
public static final String BRANCH_ROUTE_NODE_ID = "wds.branch.route.node.id";
49-
public static final String BRANCH_ROUTE_NODE_NAME = "wds.branch.route.node.name";
50-
public static final String BRANCH_ROUTE_RULE_TEXT = "wds.branch.route.rule.text";
51-
public static final String BRANCH_ROUTE_TARGETS = "wds.branch.route.targets";
52-
public static final String BRANCH_GUARD_RULES = "wds.branch.guard.rules";
5347
public static final String BRANCH_OUTPUT_MAPPING = "node.conf.special.branch.output.mapping";
5448
public static final String BRANCH_OUTPUT_MAPPING_ALIAS = "node.conf.special.branchOutputMapping";
5549

plugins/azkaban/linkis-jobtype/src/main/java/com/webank/wedatasphere/dss/plugins/azkaban/linkis/jobtype/job/BranchExpressionUtils.java

Lines changed: 0 additions & 203 deletions
This file was deleted.

plugins/azkaban/linkis-jobtype/src/main/java/com/webank/wedatasphere/dss/plugins/azkaban/linkis/jobtype/job/BranchGuardExecutor.java

Lines changed: 0 additions & 80 deletions
This file was deleted.

0 commit comments

Comments
 (0)