directed-acyclic-graphs

Apache Airflow scheduler does not trigger DAG at schedule time

牧云@^-^@ 提交于 2019-11-28 14:15:20
When I schedule DAGs to run at a specific time everyday, the DAG execution does not take place at all. However, when I restart Airflow webserver and scheduler, the DAGs execute once on the scheduled time for that particular day and do not execute from the next day onwards. I am using Airflow version v1.7.1.3 with python 2.7.6. Here goes the DAG code: from airflow import DAG from airflow.operators.bash_operator import BashOperator from datetime import datetime, timedelta import time n=time.strftime("%Y,%m,%d") v=datetime.strptime(n,"%Y,%m,%d") default_args = { 'owner': 'airflow', 'depends_on

Longest path in a DAG

筅森魡賤 提交于 2019-11-28 10:03:22
To find the longest path in a DAG, I'm aware of 2 algorithms: algo 1: do a topological sort + use dynamic programming on the result of the sort ~ or ~ algo 2: enumerate all the paths in the DAG using DFS, and record the longest. It seems like enumerating all the paths with DFS has better complexity than algo 1. Is that true? dasblinkenlight Your second option is incorrect: DFS does not explore all possible paths, unless your graph is a tree or a forest, and you start from the roots. The second algorithm that I know is negating the weights and finding the shortest path, but it is somewhat

Airflow : ExternalTaskSensor doesn't trigger the task

你。 提交于 2019-11-28 08:32:15
问题 I have already seen this and this questions on SO and made the changes accordingly. However, my dependent DAG still gets stuck in poking state. Below is my master DAG: from airflow import DAG from airflow.operators.jdbc_operator import JdbcOperator from datetime import datetime from airflow.operators.bash_operator import BashOperator today = datetime.today() default_args = { 'depends_on_past': False, 'retries': 0, 'start_date': datetime(today.year, today.month, today.day), 'schedule_interval'

Algorithm to find lowest common ancestor in directed acyclic graph?

廉价感情. 提交于 2019-11-28 03:50:27
Imagine a directed acyclic graph as follows, where: "A" is the root (there is always exactly one root) each node knows its parent(s) the node names are arbitrary - nothing can be inferred from them we know from another source that the nodes were added to the tree in the order A to G (e.g. they are commits in a version control system) What algorithm could I use to determine the lowest common ancestor (LCA) of two arbitrary nodes, for example, the common ancestor of: B and E is B D and F is B Note: There is not necessarily a single path to a given node from the root (e.g. "G" has two paths), so

All possible paths from one node to another in a directed tree (igraph)

Deadly 提交于 2019-11-27 13:19:17
I use python binding to igraph to represent a directed tree. I would like to find all possible paths from one node in that graph to another one. Unfortunately, I couldn't find a ready to use function in igraph that performs this task? EDIT The concerns on infinite number of paths the graph I'm talking about is actually a directed acyclic graph (DAG) with a single root. It represents a unidirectional cascade of events that, on various levels of the cascade, can either split or join together. As I said, this is a unidirectional graph. It is also provided that the graph does not contain any

Apache Airflow scheduler does not trigger DAG at schedule time

落花浮王杯 提交于 2019-11-27 08:02:49
问题 When I schedule DAGs to run at a specific time everyday, the DAG execution does not take place at all. However, when I restart Airflow webserver and scheduler, the DAGs execute once on the scheduled time for that particular day and do not execute from the next day onwards. I am using Airflow version v1.7.1.3 with python 2.7.6. Here goes the DAG code: from airflow import DAG from airflow.operators.bash_operator import BashOperator from datetime import datetime, timedelta import time n=time

How do I check if a directed graph is acyclic?

╄→гoц情女王★ 提交于 2019-11-27 06:09:51
How do I check if a directed graph is acyclic? And how is the algorithm called? I would appreciate a reference. FryGuy I would try to sort the graph topologically , and if you can't, then it has cycles. Doing a simple depth-first-search is not good enough to find a cycle. It is possible to visit a node multiple times in a DFS without a cycle existing. Depending on where you start, you also might not visit the entire graph. You can check for cycles in a connected component of a graph as follows. Find a node which has only outgoing edges. If there is no such node, then there is a cycle. Start a

Longest path in a DAG

≯℡__Kan透↙ 提交于 2019-11-27 03:22:28
问题 To find the longest path in a DAG, I'm aware of 2 algorithms: algo 1: do a topological sort + use dynamic programming on the result of the sort ~ or ~ algo 2: enumerate all the paths in the DAG using DFS, and record the longest. It seems like enumerating all the paths with DFS has better complexity than algo 1. Is that true? 回答1: Your second option is incorrect: DFS does not explore all possible paths, unless your graph is a tree or a forest, and you start from the roots. The second algorithm

How DAG works under the covers in RDD?

青春壹個敷衍的年華 提交于 2019-11-27 02:30:11
The Spark research paper has prescribed a new distributed programming model over classic Hadoop MapReduce, claiming the simplification and vast performance boost in many cases specially on Machine Learning. However, the material to uncover the internal mechanics on Resilient Distributed Datasets with Directed Acyclic Graph seems lacking in this paper. Should it be better learned by investigating the source code? Sathish Even i have been looking in the web to learn about how spark computes the DAG from the RDD and subsequently executes the task. At high level, when any action is called on the

Algorithm to find lowest common ancestor in directed acyclic graph?

为君一笑 提交于 2019-11-27 00:11:10
问题 Imagine a directed acyclic graph as follows, where: "A" is the root (there is always exactly one root) each node knows its parent(s) the node names are arbitrary - nothing can be inferred from them we know from another source that the nodes were added to the tree in the order A to G (e.g. they are commits in a version control system) What algorithm could I use to determine the lowest common ancestor (LCA) of two arbitrary nodes, for example, the common ancestor of: B and E is B D and F is B