This is an automated email from the ASF dual-hosted git repository.
nwang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-heron.git
The following commit(s) were added to refs/heads/master by this push:
new f133e73 Update output message of restart command to include container
id (#3335)
f133e73 is described below
commit f133e73434c8b3cc6ddab0de43afbf30ecca2124
Author: Ning Wang <[email protected]>
AuthorDate: Thu Aug 29 14:21:23 2019 -0700
Update output message of restart command to include container id (#3335)
---
heron/tools/cli/src/python/restart.py | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/heron/tools/cli/src/python/restart.py
b/heron/tools/cli/src/python/restart.py
index 010c6f8..9b731fa 100644
--- a/heron/tools/cli/src/python/restart.py
+++ b/heron/tools/cli/src/python/restart.py
@@ -66,9 +66,13 @@ def run(command, parser, cl_args, unknown_args):
Log.debug("Restart Args: %s", cl_args)
container_id = cl_args['container-id']
+ message = "restart topology"
+ if container_id >= 0:
+ message = "restart container " + str(container_id) + " of topology"
+
if cl_args['deploy_mode'] == config.SERVER_MODE:
dict_extra_args = {"container_id": str(container_id)}
- return cli_helper.run_server(command, cl_args, "restart topology",
extra_args=dict_extra_args)
+ return cli_helper.run_server(command, cl_args, message,
extra_args=dict_extra_args)
else:
list_extra_args = ["--container_id", str(container_id)]
- return cli_helper.run_direct(command, cl_args, "restart topology",
extra_args=list_extra_args)
+ return cli_helper.run_direct(command, cl_args, message,
extra_args=list_extra_args)