def __init__(self, worker_id, conf): super(MetricProcessor, self).__init__(worker_id, conf, conf.metricd.metric_processing_delay) self.coord, __ = utils.get_coordinator_and_start( conf.storage.coordination_url) self._tasks = [] self.group_state = None
def __init__(self, conf, coord=None): self.aggregation_workers_number = conf.aggregation_workers_number if self.aggregation_workers_number == 1: # NOTE(jd) Avoid using futures at all if we don't want any threads. self._map_in_thread = self._map_no_thread else: self._map_in_thread = self._map_in_futures_threads self.coord = (coord if coord else utils.get_coordinator_and_start(conf.coordination_url)) self.shared_coord = bool(coord)
def __init__(self, conf, incoming): super(CarbonaraBasedStorage, self).__init__(conf, incoming) self.aggregation_workers_number = conf.aggregation_workers_number if self.aggregation_workers_number == 1: # NOTE(jd) Avoid using futures at all if we don't want any threads. self._map_in_thread = self._map_no_thread else: self._map_in_thread = self._map_in_futures_threads self.coord, my_id = utils.get_coordinator_and_start( conf.coordination_url)
def __init__(self, worker_id, conf): super(MetricProcessor, self).__init__(worker_id, conf, conf.metricd.metric_processing_delay) self._coord, self._my_id = utils.get_coordinator_and_start( conf.storage.coordination_url)