Skip to content

Commit

Permalink
fix spark yarn cluster mode bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ChengJie1053 committed Aug 24, 2023
1 parent a94c876 commit 743b417
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,16 @@ class CallbackEngineConnHook extends EngineConnHook with Logging {
newMap.put("spring.mvc.servlet.path", ServerConfiguration.BDP_SERVER_RESTFUL_URI.getValue)
DataWorkCloudApplication.main(DWCArgumentsParser.formatSpringOptions(newMap.toMap))

val engineConnIdentifierCallback = new EngineConnIdentifierCallback()
Utils.tryAndError(engineConnIdentifierCallback.callback())
logger.info("<--------------------SpringBoot App init succeed-------------------->")
}

override def beforeExecutionExecute(
engineCreationContext: EngineCreationContext,
engineConn: EngineConn
): Unit = {}
): Unit = {
val engineConnIdentifierCallback = new EngineConnIdentifierCallback()
Utils.tryAndError(engineConnIdentifierCallback.callback())
}

override def afterExecutionExecute(
engineCreationContext: EngineCreationContext,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ public void dealPid(ResponseEngineConnPid protocol) {
protocol.pid(),
protocol.ticketId());

EngineNode engineNode = defaultEngineNodeManager.getEngineNode(protocol.serviceInstance());
EngineNode engineNode =
defaultEngineNodeManager.getEngineNodeInfoByTicketId(protocol.ticketId());
if (engineNode == null) {
logger.error(
"DefaultEngineConnPidCallbackService dealPid failed, engineNode is null, serviceInstance:{}",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,7 @@ public ResultResource requestResource(List<Label<?>> labels, NodeResource resour
engineNode.setServiceInstance(
ServiceInstance.apply(labelContainer.getEngineServiceName(), tickedId));
engineNode.setNodeResource(resource);
engineNode.setTicketId(tickedId);

nodeManagerPersistence.addEngineNode(engineNode);

Expand Down

0 comments on commit 743b417

Please sign in to comment.