Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Traverse dependency graphs in BFS order
Let’s assume that Flink is setup with YARN and HDFS as dependencies. I.e., the dependency graph looks like this: flink-1.7.2 -> yarn-3.1.1 flink-1.7.2 -> hdfs-3.1.1 hdfs-3.1.1 -> () yarn-3.1.1 -> () Do determine the order in which dependencies are setup, the graph is reversed. hdfs-3.1.1 -> flink-1.7.2 yarn-3.1.1 -> flink-1.7.2 flink-1.7.2 -> () The graph is then traversed by starting with the nodes with in-degree > 0 and adding their dependencies to the list of nodes to visit. If DFS order is used, the following activation order is possible: hdfs-3.1.1, flink-1.7.2, yarn-3.1.1 That is because the traversal starts with hdfs-3.1.1 and then follows the edge to flink-1.7.2 before continuing with yarn-3.1.1. However, if a Flink YARN session is used, then Flink needs to connect to YARN at startup. Therefore, all dependencies of Flink have to be activated before it. This is achieved by traversing the graph in BFS order.
- Loading branch information