def initialize(self):
create_folders = Command('<STR_LIT>' % self.log_dir, self.shell_env)<EOL>self.run_command_or_exit(create_folders)<EOL>chmod_logs_dir = Command('<STR_LIT>' % self.log_dir, self.shell_env)<EOL>self.run_command_or_exit(chmod_logs_dir)<EOL>chmod_x_binaries = [self.tmaster_binary, self.stmgr_binary, self.heron_shell_binary]<EOL>for binary in chmod_x_binaries:<EOL><INDENT>stat_result = os.stat(binary)[stat.ST_MODE]<EOL>if not stat_result & stat.S_IXOTH:<EOL><INDENT>chmod_binary = Command('<STR_LIT>' % binary, self.shell_env)<EOL>self.run_command_or_exit(chmod_binary)<EOL><DEDENT><DEDENT>log_pid_for_process(get_heron_executor_process_name(self.shard), os.getpid())<EOL>
Initialize the environment. Done with a method call outside of the constructor for 2 reasons:
1. Unit tests probably won't want/need to do this
2. We don't initialize the logger (also something unit tests don't want) until after the
constructor