def get_client(self, destination_params, job_id, **kwargs): if job_id is None: raise Exception("Cannot generate Pulsar client for empty job_id.") destination_params = _parse_destination_params(destination_params) destination_params.update(**kwargs) if 'shell_plugin' in destination_params: shell = cli_factory.get_shell(destination_params) return MessageCLIJobClient(destination_params, job_id, self, shell) else: return MessageJobClient(destination_params, job_id, self)
def get_client(self, destination_params, job_id, **kwargs): if job_id is None: raise Exception("Cannot generate Pulsar client for empty job_id.") destination_params = _parse_destination_params(destination_params) destination_params.update(**kwargs) if "shell_plugin" in destination_params: shell = cli_factory.get_shell(destination_params) return MessageCLIJobClient(destination_params, job_id, self, shell) else: return MessageJobClient(destination_params, job_id, self)
def get_client(self, destination_params, job_id, **kwargs): if job_id is None: raise Exception("Cannot generate Pulsar client for empty job_id.") destination_params = _parse_destination_params(destination_params) destination_params.update(**kwargs) if 'shell_plugin' in destination_params: shell = cli_factory.get_shell(destination_params) return MessageCLIJobClient(destination_params, job_id, self, shell) elif destination_params.get('k8s_enabled', False): return MessageCoexecutionPodJobClient(destination_params, job_id, self) else: return MessageJobClient(destination_params, job_id, self)