def kafka_config(self):
<EOL>config_obj = self.configure[self.args.config[<NUM_LIT:1>]]<EOL>kafka_ports = config_obj.get('<STR_LIT>')<EOL>if not kafka_ports:<EOL><INDENT>kafka_ports_arr = ['<STR_LIT>']<EOL><DEDENT>else:<EOL><INDENT>kafka_ports_arr = kafka_ports.replace('<STR_LIT:U+0020>', '<STR_LIT>').split('<STR_LIT:U+002C>')<EOL><DEDENT>sudo('<STR_LIT>'.format(<EOL>user=config_obj.get('<STR_LIT:user>'),<EOL>path=bigdata_conf.project_root<EOL>))<EOL>sudo('<STR_LIT>'.format(bigdata_conf.kafka_home))<EOL>self.systemctl_autostart(<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>'<EOL>)<EOL>with cd('<STR_LIT>'.format(bigdata_conf.kafka_home)):<EOL><INDENT>for idx, k_port in enumerate(kafka_ports_arr):<EOL><INDENT>conf_file = '<STR_LIT>'.format(k_port)<EOL>run('<STR_LIT>'.format(conf_file))<EOL>sed(conf_file, '<STR_LIT>', '<STR_LIT>'.format(idx))<EOL>uncomment(conf_file, '<STR_LIT>')<EOL>sed(conf_file, '<STR_LIT>', '<STR_LIT>'.format(<EOL>env.host_string, k_port<EOL>))<EOL>sed(conf_file, '<STR_LIT>',<EOL>'<STR_LIT>'.format(k_port))<EOL>self.systemctl_autostart(<EOL>'<STR_LIT>'.format(k_port),<EOL>'<STR_LIT>'.format(conf_file),<EOL>'<STR_LIT>'.format(conf_file)<EOL>)<EOL><DEDENT><DEDENT>
kafka config
:return: