<s> from __future__ import print_function <EOL> from . import docker_run <EOL> import argparse <EOL> import os <EOL> import sys <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> actual_args = sys . argv [ <NUM_LIT:2> : ] <EOL> zk_ambassador_args = None <EOL> storm_nimbus_args = None <EOL> try : <EOL> nimbus_args_after_this_idx = actual_args . index ( "<STR_LIT>" ) <EOL> zk_ambassador_args = actual_args [ : nimbus_args_after_this_idx ] <EOL> storm_nimbus_args = actual_args [ nimbus_args_after_this_idx + <NUM_LIT:1> : ] <EOL> except ValueError : <EOL> zk_ambassador_args = actual_args <EOL> storm_config = docker_run . get_storm_config ( ) <EOL> if zk_ambassador_args is not None : <EOL> servers = storm_config [ "<STR_LIT>" ] <EOL> storm_yaml_config = storm_config [ "<STR_LIT>" ] <EOL> zk_server = servers [ storm_yaml_config [ "<STR_LIT>" ] [ <NUM_LIT:0> ] ] <EOL> zk_port = storm_yaml_config [ "<STR_LIT>" ] <EOL> zk_follower_port = storm_config [ "<STR_LIT>" ] [ "<STR_LIT>" ] <EOL> zk_election_port = storm_config [ "<STR_LIT>" ] [ "<STR_LIT>" ] <EOL> zk_port_and_env_args = [ <EOL> "<STR_LIT>" . format ( zk_port ) , <EOL> "<STR_LIT>" . format ( zk_follower_port ) , <EOL> "<STR_LIT>" . format ( zk_election_port ) , <EOL> "<STR_LIT>" . format ( zk_port , zk_server , zk_port ) , <EOL> "<STR_LIT>" . format ( <EOL> zk_follower_port , zk_server , zk_follower_port <EOL> ) , <EOL> "<STR_LIT>" . format ( <EOL> zk_follower_port , zk_server , zk_follower_port <EOL> ) , <EOL> "<STR_LIT>" . format ( <EOL> zk_election_port , zk_server , zk_election_port <EOL> ) , <EOL> ] <EOL> zk_ambassador_docker_run_cmd = "<STR_LIT>" . format ( <EOL> port_and_env_args = "<STR_LIT:U+0020>" . join ( zk_port_and_env_args ) , <EOL> zk_ambassador_args = "<STR_LIT:U+0020>" . join ( zk_ambassador_args ) <EOL> ) <EOL> print ( zk_ambassador_docker_run_cmd ) <EOL> os . system ( zk_ambassador_docker_run_cmd ) <EOL> if storm_nimbus_args is not None : <EOL> docker_run . main ( storm_nimbus_args ) </s>
