(subparsers)
| 497 | |
| 498 | |
| 499 | def initialize_kill_subcommand(subparsers): |
| 500 | command_help = """Kills the topology with the name topology-name. Storm will |
| 501 | first deactivate the topology's spouts for the duration of |
| 502 | the topology's message timeout to allow all messages currently |
| 503 | being processed to finish processing. Storm will then shutdown |
| 504 | the workers and clean up their state. |
| 505 | """ |
| 506 | sub_parser = subparsers.add_parser("kill", help=command_help, formatter_class=SortingHelpFormatter) |
| 507 | |
| 508 | sub_parser.add_argument("topology-name") |
| 509 | |
| 510 | sub_parser.add_argument( |
| 511 | "-w", "--wait-time-secs", |
| 512 | help="""override the length of time Storm waits between deactivation and shutdown""", |
| 513 | default=None, type=check_non_negative |
| 514 | ) |
| 515 | |
| 516 | sub_parser.set_defaults(func=kill) |
| 517 | add_common_options(sub_parser) |
| 518 | |
| 519 | |
| 520 | def check_non_negative(value): |
no test coverage detected