Get the App
SLTechnology News&Howtos  ›  Servers  › 

How FlowRunner pushes Graph forward

Shulou Source: shulou.com Published: 2022-05-31 18:01:58 10月02日 Update

This article introduces how FlowRunner promotes the progress of Graph. The content is very detailed. Interested friends can use it for reference. I hope it will be helpful to you.

Now that we know the execution process of a job, then the whole flow is a diagram, how does the diagram move forward, and how does the next job execute? This is the problem to be solved in this section!

Jdb azkaban.execapp.AzkabanExecutorServer-conf / root/azkb/azkaban_3.0.0_debug/conf

Stop in azkaban.execapp.FlowRunner.progressGraph

This can be solved by using the algorithm of the graph. Let's look at the end of flow.

Stop in azkaban.execapp.FlowRunner.finishExecutableNode

Azkaban.execapp.FlowRunnerManager-listener of flow

@ Override

Public void handleEvent (Event event) {

If (event.getType ()) = = Event.Type.FLOW_FINISHED) {

FlowRunner flowRunner = (FlowRunner) event.getRunner ()

ExecutableFlow flow = flowRunner.getExecutableFlow ()

RecentlyFinishedFlows.put (flow.getExecutionId (), flow)

Logger.info ("Flow" + flow.getExecutionId () + "is finished. Adding it to recently finished flows list.")

RunningFlows.remove (flow.getExecutionId ())

}

}

This is very simple!

So, the question is, how does a Flow end? The finishing touches should be done well.

If (outNodeIds.isEmpty ()) {

/ /

/ / There's no outnodes means it's the end of a flow, so we

/ / finalize

/ / and fire an event.

FinalizeFlow (parentFlow)

And then in this function,

/ / If the finalized flow is actually the top level flow, than we finish

/ / the main loop.

If (flow instanceof ExecutableFlow) {

FlowFinished = true

}

This sets flowFinished = true

= jump out of the for loop

Private void runFlow () throws Exception {

Logger.info ("Starting flows")

RunReadyJob (this.flow)

UpdateFlow ()

/ / jump out of this cycle

While (! flowFinished) {

After popping up, execute

Logger.info ("Finishing up flow. Awaiting Termination")

ExecutorService.shutdown ()

UpdateFlow ()

Logger.info ("Finished Flow")

Close the current process, the entire flowRunner this task will be over, smooth!

So much for sharing about how FlowRunner promotes the progress of Graph. I hope the above content can be helpful to you and learn more knowledge. If you think the article is good, you can share it for more people to see.

Tags: Content more questions help loops good interests functions guys buddies that is articles knowledge algorithms articles processes parts references work Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple Huawei Microsoft Shulou Information macOS