def start_cluster(cl_args):
roles = read_and_parse_roles(cl_args)<EOL>masters = roles[Role.MASTERS]<EOL>slaves = roles[Role.SLAVES]<EOL>zookeepers = roles[Role.ZOOKEEPERS]<EOL>Log.info("<STR_LIT>")<EOL>Log.info("<STR_LIT>" % list(masters))<EOL>Log.info("<STR_LIT>" % list(slaves))<EOL>Log.info("<STR_LIT>" % list(zookeepers))<EOL>if not masters:<EOL><INDENT>Log.error("<STR_LIT>")<EOL>sys.exit(-<NUM_LIT:1>)<EOL><DEDENT>if not slaves:<EOL><INDENT>Log.error("<STR_LIT>")<EOL>sys.exit(-<NUM_LIT:1>)<EOL><DEDENT>if not zookeepers:<EOL><INDENT>Log.error("<STR_LIT>")<EOL>sys.exit(-<NUM_LIT:1>)<EOL><DEDENT>update_config_files(cl_args)<EOL>dist_nodes = list(masters.union(slaves))<EOL>if not (len(dist_nodes) == <NUM_LIT:1> and is_self(dist_nodes[<NUM_LIT:0>])):<EOL><INDENT>distribute_package(roles, cl_args)<EOL><DEDENT>start_master_nodes(masters, cl_args)<EOL>start_slave_nodes(slaves, cl_args)<EOL>start_api_server(masters, cl_args)<EOL>start_heron_tools(masters, cl_args)<EOL>Log.info("<STR_LIT>")<EOL>
Start a Heron standalone cluster