def add_spark_slave(self, master, slave, configure):
<EOL>self.reset_server_env(master, configure)<EOL>with cd(bigdata_conf.spark_home):<EOL><INDENT>if not exists('<STR_LIT>'):<EOL><INDENT>sudo('<STR_LIT>')<EOL><DEDENT>spark_env = bigdata_conf.spark_env.format(<EOL>spark_home=bigdata_conf.spark_home,<EOL>hadoop_home=bigdata_conf.hadoop_home,<EOL>host=env.host_string,<EOL>SPARK_WORKER_MEMORY=configure[master].get(<EOL>'<STR_LIT>', '<STR_LIT>'<EOL>)<EOL>)<EOL>put(StringIO(spark_env), '<STR_LIT>', use_sudo=True)<EOL>if not exists('<STR_LIT>'):<EOL><INDENT>sudo('<STR_LIT>')<EOL><DEDENT><DEDENT>comment('<STR_LIT>'.format(bigdata_conf.spark_home),<EOL>'<STR_LIT:localhost>', use_sudo=True)<EOL>append('<STR_LIT>'.format(bigdata_conf.spark_home),<EOL>'<STR_LIT>'.format(configure[slave]['<STR_LIT:host>']), use_sudo=True)<EOL>run('<STR_LIT>'.format(<EOL>bigdata_conf.spark_home,<EOL>configure[slave]['<STR_LIT:user>'],<EOL>configure[slave]['<STR_LIT:host>']<EOL>))<EOL>self.reset_server_env(slave, configure)<EOL>append(bigdata_conf.global_env_home, '<STR_LIT>'.format(<EOL>configure[slave]['<STR_LIT:host>']<EOL>), use_sudo=True)<EOL>run('<STR_LIT>'.format(bigdata_conf.global_env_home))<EOL>self.reset_server_env(master, configure)<EOL>with cd(bigdata_conf.spark_home):<EOL><INDENT>run('<STR_LIT>')<EOL>run('<STR_LIT>')<EOL>run('<STR_LIT>')<EOL>run('<STR_LIT>')<EOL><DEDENT>
add spark slave
:return: