|
17 | 17 | package com.webank.wedatasphere.dss.orchestrator.server.service.impl;
|
18 | 18 |
|
19 | 19 | import com.google.common.collect.Lists;
|
| 20 | +import com.webank.wedatasphere.dss.appconn.core.AppConn; |
20 | 21 | import com.webank.wedatasphere.dss.common.constant.project.ProjectUserPrivEnum;
|
21 | 22 | import com.webank.wedatasphere.dss.common.exception.DSSErrorException;
|
22 | 23 | import com.webank.wedatasphere.dss.common.label.DSSLabel;
|
|
58 | 59 | import com.webank.wedatasphere.dss.standard.app.development.service.RefQueryService;
|
59 | 60 | import com.webank.wedatasphere.dss.standard.app.development.standard.DevelopmentIntegrationStandard;
|
60 | 61 | import com.webank.wedatasphere.dss.standard.app.sso.Workspace;
|
| 62 | +import com.webank.wedatasphere.dss.standard.common.desc.AppDesc; |
61 | 63 | import com.webank.wedatasphere.dss.standard.common.desc.AppInstance;
|
62 | 64 | import com.webank.wedatasphere.dss.standard.common.entity.ref.ResponseRef;
|
63 | 65 | import com.webank.wedatasphere.dss.standard.common.exception.operation.ExternalOperationWarnException;
|
@@ -123,7 +125,9 @@ public OrchestratorVo createOrchestrator(String userName,
|
123 | 125 | Map<String, Object> dssJobContent = MapUtils.newCommonMapBuilder()
|
124 | 126 | .put(OrchestratorRefConstant.DSS_ORCHESTRATOR_INFO_KEY, dssOrchestratorInfo)
|
125 | 127 | .put(OrchestratorRefConstant.ORCHESTRATOR_VERSION_KEY, version)
|
126 |
| - .put(OrchestratorRefConstant.ORCHESTRATION_SCHEDULER_APP_CONN, dssOrchestrator.getSchedulerAppConn().getAppDesc().getAppName()).build(); |
| 128 | + .put(OrchestratorRefConstant.ORCHESTRATION_SCHEDULER_APP_CONN, Optional.ofNullable(dssOrchestrator) |
| 129 | + .map(DSSOrchestrator::getSchedulerAppConn).map(AppConn::getAppDesc).map(AppDesc::getAppName) |
| 130 | + .map(Object::toString).orElse("NULL")).build(); |
127 | 131 | DSSJobContentRequestRef requestRef = (DSSJobContentRequestRef) developmentRequestRef;
|
128 | 132 | requestRef.setDSSJobContent(dssJobContent);
|
129 | 133 | return ((RefCreationOperation) developmentOperation).createRef(requestRef);
|
|
0 commit comments