File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
dss-appconn/linkis-appconn-engineplugin/src/main/scala/com/webank/wedatasphere/linkis/manager/engineplugin/appconn/executor Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 1717package com .webank .wedatasphere .linkis .manager .engineplugin .appconn .executor
1818
1919import java .util
20+ import java .util .Map
2021
2122import com .webank .wedatasphere .dss .appconn .core .AppConn
2223import com .webank .wedatasphere .dss .appconn .core .ext .OnlyDevelopmentAppConn
2324import com .webank .wedatasphere .dss .appconn .manager .AppConnManager
24- import com .webank .wedatasphere .dss .common .label .EnvDSSLabel
25+ import com .webank .wedatasphere .dss .common .label .{EnvDSSLabel , LabelKeyConvertor }
26+ import com .webank .wedatasphere .dss .common .utils .DSSCommonUtils
2527import com .webank .wedatasphere .dss .standard .app .development .listener .common .{AsyncExecutionRequestRef , CompletedExecutionResponseRef }
2628import com .webank .wedatasphere .dss .standard .app .development .ref .ExecutionRequestRef
2729import com .webank .wedatasphere .dss .standard .app .sso .Workspace
@@ -123,7 +125,12 @@ class AppConnEngineConnExecutor(val id: Int) extends ComputationExecutor {
123125 }
124126
125127 private def getAppInstanceByLabels (labels : String , appConn : AppConn ): Option [AppInstance ] = {
126- def appInstanceList = appConn.getAppDesc.getAppInstancesByLabels(util.Arrays .asList(new EnvDSSLabel (labels)));
128+ var labelStr = labels
129+ if (labels.contains(LabelKeyConvertor .ROUTE_LABEL_KEY )) {
130+ val labelMap = DSSCommonUtils .COMMON_GSON .fromJson(labels, classOf [util.Map [_, _]])
131+ labelStr = labelMap.get(LabelKeyConvertor .ROUTE_LABEL_KEY ).asInstanceOf [String ]
132+ }
133+ val appInstanceList = appConn.getAppDesc.getAppInstancesByLabels(util.Arrays .asList(new EnvDSSLabel (labelStr)));
127134 if (appInstanceList != null && appInstanceList.size() > 0 ) {
128135 return Some (appInstanceList.get(0 ))
129136 }
You can’t perform that action at this time.
0 commit comments