-
Notifications
You must be signed in to change notification settings - Fork 10
Add a command to list operation's predecessors #246
Copy link
Copy link
Open
Description
This use case is for debug. For example I want to run manually an operation (a.k.a. Ansible playbook). In order to run this operation I must run all DAG operation predecessors.
With the tdp deploy --targets ... command we can run a deployment to a list of targets so we only need direct operation's predecessors, not all, only direct ones. To get them we can use the pred property of networkx.
Here an example snippet to print a tdp deploy command with all ranger_admin_config direct operation's predecessors:
dag = Dag(...)
tdp_deploy_command = "tdp deploy --targets "
pred_operations = dag.graph.pred["ranger_admin_config"]
print(tdp_deploy_command + ','.join(pred_operations))Outputs:
tdp deploy --targets tdp-cluster_config,hadoop_client_config,ranger_kerberos_install,ranger_ssl-tls_install
After running this tdp deploy command we can run manually, with ansible-playbook command, the ranger_admin_config playbook.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels