def start_slaves(self, num_slaves, num_executors_per_slave=1, start_port=None, **extra_conf_vals): """ Start slave services for this cluster. :param num_slaves: The number of slave services to start :type num_slaves: int :param num_executors_per_slave: The number of executors that each slave will be configured to use :type num_executors_per_slave: int :param start_port: The port number of the first slave to launch. If None, default to the current counter. Subsequent slaves will be started on subsequent port numbers. :type start_port: int | None :return: A list of API client objects through which API calls to each slave can be made :rtype: list[ClusterSlaveAPIClient] """ new_slaves = self._start_slave_processes(num_slaves, num_executors_per_slave, start_port, **extra_conf_vals) return [ ClusterSlaveAPIClient(base_api_url=slave.url) for slave in new_slaves ]
def start_slaves(self, num_slaves, num_executors_per_slave=1): """ Start slave services for this cluster. :param num_slaves: The number of slave services to start :type num_slaves: int :param num_executors_per_slave: The number of executors that each slave will be configured to use :type num_executors_per_slave: int :return: A list of API client objects through which API calls to each slave can be made :rtype: list[ClusterSlaveAPIClient] """ new_slaves = self._start_slave_processes(num_slaves, num_executors_per_slave) return [ClusterSlaveAPIClient(base_api_url=slave.url) for slave in new_slaves]
def slave_api_clients(self): return [ClusterSlaveAPIClient(base_api_url=slave.url) for slave in self.slaves]