def _get_streaming_processes(self):
retval = {}<EOL>instance_plans = self._get_instance_plans(self.packing_plan, self.shard)<EOL>instance_info = []<EOL>for instance_plan in instance_plans:<EOL><INDENT>global_task_id = instance_plan.task_id<EOL>component_index = instance_plan.component_index<EOL>component_name = instance_plan.component_name<EOL>instance_id = "<STR_LIT>" % (str(self.shard), component_name, global_task_id)<EOL>instance_info.append((instance_id, component_name, global_task_id, component_index))<EOL><DEDENT>stmgr_cmd_lst = [<EOL>self.stmgr_binary,<EOL>'<STR_LIT>' % self.topology_name,<EOL>'<STR_LIT>' % self.topology_id,<EOL>'<STR_LIT>' % self.topology_defn_file,<EOL>'<STR_LIT>' % self.state_manager_connection,<EOL>'<STR_LIT>' % self.state_manager_root,<EOL>'<STR_LIT>' % self.stmgr_ids[self.shard],<EOL>'<STR_LIT>' % '<STR_LIT:U+002C>'.join([x[<NUM_LIT:0>] for x in instance_info]),<EOL>'<STR_LIT>' % self.master_host,<EOL>'<STR_LIT>' % str(self.master_port),<EOL>'<STR_LIT>' % str(self.tmaster_controller_port),<EOL>'<STR_LIT>' % str(self.metrics_manager_port),<EOL>'<STR_LIT>' % str(self.shell_port),<EOL>'<STR_LIT>' % self.heron_internals_config_file,<EOL>'<STR_LIT>' % self.override_config_file,<EOL>'<STR_LIT>' % str(self.checkpoint_manager_port),<EOL>'<STR_LIT>' % self.ckptmgr_ids[self.shard],<EOL>'<STR_LIT>' % self.metricscache_manager_mode.lower()]<EOL>stmgr_env = self.shell_env.copy() if self.shell_env is not None else {}<EOL>stmgr_cmd = Command(stmgr_cmd_lst, stmgr_env)<EOL>if os.environ.get('<STR_LIT>') is not None:<EOL><INDENT>stmgr_cmd.env.update({<EOL>'<STR_LIT>': "<STR_LIT>",<EOL>'<STR_LIT>': "<STR_LIT>"<EOL>})<EOL><DEDENT>retval[self.stmgr_ids[self.shard]] = stmgr_cmd<EOL>retval[self.metricsmgr_ids[self.shard]] = self._get_metricsmgr_cmd(<EOL>self.metricsmgr_ids[self.shard],<EOL>self.metrics_sinks_config_file,<EOL>self.metrics_manager_port<EOL>)<EOL>if self.is_stateful_topology:<EOL><INDENT>retval.update(self._get_ckptmgr_process())<EOL><DEDENT>if self.pkg_type == '<STR_LIT>' or self.pkg_type == '<STR_LIT>':<EOL><INDENT>retval.update(self._get_java_instance_cmd(instance_info))<EOL><DEDENT>elif self.pkg_type == '<STR_LIT>':<EOL><INDENT>retval.update(self._get_python_instance_cmd(instance_info))<EOL><DEDENT>elif self.pkg_type == '<STR_LIT>':<EOL><INDENT>retval.update(self._get_cpp_instance_cmd(instance_info))<EOL><DEDENT>elif self.pkg_type == '<STR_LIT>':<EOL><INDENT>retval.update(self._get_cpp_instance_cmd(instance_info))<EOL><DEDENT>else:<EOL><INDENT>raise ValueError("<STR_LIT>" % self.pkg_type)<EOL><DEDENT>return retval<EOL>
Returns the processes to handle streams, including the stream-mgr and the user code containing
the stream logic of the topology