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 17
17
package com .webank .wedatasphere .linkis .manager .engineplugin .appconn .executor
18
18
19
19
import java .util
20
+ import java .util .Map
20
21
21
22
import com .webank .wedatasphere .dss .appconn .core .AppConn
22
23
import com .webank .wedatasphere .dss .appconn .core .ext .OnlyDevelopmentAppConn
23
24
import 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
25
27
import com .webank .wedatasphere .dss .standard .app .development .listener .common .{AsyncExecutionRequestRef , CompletedExecutionResponseRef }
26
28
import com .webank .wedatasphere .dss .standard .app .development .ref .ExecutionRequestRef
27
29
import com .webank .wedatasphere .dss .standard .app .sso .Workspace
@@ -123,7 +125,12 @@ class AppConnEngineConnExecutor(val id: Int) extends ComputationExecutor {
123
125
}
124
126
125
127
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)));
127
134
if (appInstanceList != null && appInstanceList.size() > 0 ) {
128
135
return Some (appInstanceList.get(0 ))
129
136
}
You can’t perform that action at this time.
0 commit comments