def run(command, *args): """ run command """ # show all clusters if command == 'clusters': return clusters.run(command, *args) # show topologies elif command == 'topologies': return topologies.run(command, *args) # physical plan elif command == 'containers': return physicalplan.run_containers(command, *args) elif command == 'metrics': return physicalplan.run_metrics(command, *args) # logical plan elif command == 'components': return logicalplan.run_components(command, *args) elif command == 'spouts': return logicalplan.run_spouts(command, *args) elif command == 'bolts': return logicalplan.run_bolts(command, *args) # help elif command == 'help': return help.run(command, *args) # version elif command == 'version': return version.run(command, *args) return 1
def run(command, *args): """ run command """ # show all clusters if command == 'clusters': return clusters.run(command, *args) # show topologies if command == 'topologies': return topologies.run(command, *args) # physical plan if command == 'containers': return physicalplan.run_containers(command, *args) if command == 'metrics': return physicalplan.run_metrics(command, *args) # logical plan if command == 'components': return logicalplan.run_components(command, *args) if command == 'spouts': return logicalplan.run_spouts(command, *args) if command == 'bolts': return logicalplan.run_bolts(command, *args) # help if command == 'help': return help.run(command, *args) # version if command == 'version': return version.run(command, *args) return 1
def run(command, *args): """ run command """ # show all clusters if command == "clusters": return clusters.run(command, *args) # show topologies elif command == "topologies": return topologies.run(command, *args) # physical plan elif command == "containers": return physicalplan.run_containers(command, *args) elif command == "metrics": return physicalplan.run_metrics(command, *args) # logical plan elif command == "components": return logicalplan.run_components(command, *args) elif command == "spouts": return logicalplan.run_spouts(command, *args) elif command == "bolts": return logicalplan.run_bolts(command, *args) # help elif command == "help": return help.run(command, *args) # version elif command == "version": return version.run(command, *args) return 1
def containers( config_path: str, cre: str, tracker_url: str, topology: str, container_id: int, ) -> None: tracker.tracker_url = tracker_url cluster = config.get_heron_cluster(cre) cluster_config_path = config.get_heron_cluster_conf_dir(cluster, config_path) cluster, role, environment = config.parse_cluster_role_env(cre, cluster_config_path) physicalplan.run_containers( cluster=cluster, role=role, environment=environment, container_id=container_id, topology=topology, )