コード例 #1
0
 def __init__(self, config):
     ConfigurablePlugin.__init__(self, config)
     self.setState(src=None, protocol={})
     # Resync settings:
     self._interactive = config.getBool('resync interactive',
                                        False,
                                        onChange=None)
     #   behaviour in case of event size changes
     self._mode_removed = config.getEnum('resync mode removed',
                                         ResyncMode,
                                         ResyncMode.complete,
                                         subset=ResyncMode.noChanged)
     self._mode_expanded = config.getEnum('resync mode expand', ResyncMode,
                                          ResyncMode.changed)
     self._mode_shrunken = config.getEnum('resync mode shrink', ResyncMode,
                                          ResyncMode.changed)
     self._mode_new = config.getEnum(
         'resync mode new',
         ResyncMode,
         ResyncMode.complete,
         subset=[ResyncMode.complete, ResyncMode.ignore])
     #   behaviour in case of metadata changes
     self._metaOpts = {}
     for meta in config.getList('resync metadata', [], onChange=None):
         self._metaOpts[meta] = config.getEnum('resync mode %s' % meta,
                                               ResyncMode,
                                               ResyncMode.complete,
                                               subset=ResyncMode.noChanged)
     #   behaviour in case of job changes - disable changed jobs, preserve job number of changed jobs or reorder
     self._resyncOrder = config.getEnum('resync jobs', ResyncOrder,
                                        ResyncOrder.append)
     self._initConfig(config)
コード例 #2
0
ファイル: gui.py プロジェクト: nils-braun/grid-control
	def __init__(self, config, workflow):
		ConfigurablePlugin.__init__(self, config)
		self._workflow = workflow
		self._reportOpts = config.get('report options', '', onChange = None)
		self._report = config.getCompositePlugin('report', 'BasicReport', 'MultiReport',
			cls = Report, onChange = None, pargs = (workflow.jobManager.jobDB,
			workflow.task), pkwargs = {'configString': self._reportOpts})
コード例 #3
0
    def __init__(self, config, datasetExpr, datasetNick=None):
        ConfigurablePlugin.__init__(self, config)
        self._log = logging.getLogger('dataset.provider')
        (self._datasetExpr, self._datasetNick) = (datasetExpr, datasetNick)
        (self._cache_block, self._cache_dataset) = (None, None)
        self._dataset_query_interval = config.getTime(
            'dataset default query interval', 60, onChange=None)

        triggerDataResync = triggerResync(['datasets', 'parameters'])
        self._stats = DataProcessor.createInstance(
            'SimpleStatsDataProcessor', config, triggerDataResync, self._log,
            ' * Dataset %s:\n\tcontains ' % repr(datasetNick or datasetExpr))
        self._nickProducer = config.getPlugin('nickname source',
                                              'SimpleNickNameProducer',
                                              cls=DataProcessor,
                                              pargs=(triggerDataResync, ),
                                              onChange=triggerDataResync)
        self._datasetProcessor = config.getCompositePlugin(
            'dataset processor',
            'NickNameConsistencyProcessor EntriesConsistencyDataProcessor URLDataProcessor URLCountDataProcessor '
            +
            'EntriesCountDataProcessor EmptyDataProcessor UniqueDataProcessor LocationDataProcessor',
            'MultiDataProcessor',
            cls=DataProcessor,
            pargs=(triggerDataResync, ),
            onChange=triggerDataResync)
コード例 #4
0
ファイル: job_db.py プロジェクト: whahmad/grid-control
 def __init__(self, config, jobLimit=-1, jobSelector=None):
     ConfigurablePlugin.__init__(self, config)
     self._log = logging.getLogger('jobs')
     self._dbPath = config.getWorkPath('jobs')
     self._jobMap = self.readJobs(jobLimit)
     if jobLimit < 0 and len(self._jobMap) > 0:
         jobLimit = max(self._jobMap) + 1
     (self.jobLimit, self.alwaysSelector) = (jobLimit, jobSelector)
コード例 #5
0
ファイル: matcher_base.py プロジェクト: Fra-nk/grid-control
	def __init__(self, config, option_prefix, case_override = None, **kwargs):
		ConfigurablePlugin.__init__(self, config)
		self._case = case_override
		if case_override is None:
			self._case = config.getBool(appendOption(option_prefix, 'case sensitive'), default = True, **kwargs)
		self._log = logging.getLogger('matcher.%s' % option_prefix)
		if not self._log.isEnabledFor(logging.DEBUG1):
			self._log = None
コード例 #6
0
ファイル: job_db.py プロジェクト: artus-analysis/grid-control
	def __init__(self, config, jobLimit = -1, jobSelector = None):
		ConfigurablePlugin.__init__(self, config)
		self._log = logging.getLogger('jobs')
		self._dbPath = config.getWorkPath('jobs')
		self._jobMap = self.readJobs(jobLimit)
		if jobLimit < 0 and len(self._jobMap) > 0:
			jobLimit = max(self._jobMap) + 1
		(self.jobLimit, self.alwaysSelector) = (jobLimit, jobSelector)
コード例 #7
0
	def __init__(self, config, datasource_name):
		ConfigurablePlugin.__init__(self, config)
		self._datasource_name = datasource_name
		self._log = logging.getLogger('%s.provider.processor' % datasource_name)
		self._log_debug = None
		if self._log.isEnabledFor(logging.DEBUG):
			self._log_debug = self._log
		self._disabled = False
コード例 #8
0
ファイル: dproc_base.py プロジェクト: jolange/grid-control
 def __init__(self, config, datasource_name):
     ConfigurablePlugin.__init__(self, config)
     self._datasource_name = datasource_name
     self._log = logging.getLogger('%s.provider.processor' %
                                   datasource_name)
     self._log_debug = None
     if self._log.isEnabledFor(logging.DEBUG):
         self._log_debug = self._log
     self._disabled = False
コード例 #9
0
	def __init__(self, config, datasource_name, resync_handler_name='DefaultPartitionResyncHandler'):
		ConfigurablePlugin.__init__(self, config)
		self._datasource_name = datasource_name
		self._partition_source = None
		self._resync_handler = PartitionResyncHandler.create_instance(resync_handler_name, config)

		self._dp_ds_prop_list = []
		for prop in ['Dataset', 'BlockName', 'Nickname', 'Locations']:
			self._dp_ds_prop_list.append((getattr(DataProvider, prop), getattr(DataSplitter, prop)))
コード例 #10
0
ファイル: matcher_base.py プロジェクト: mschnepf/grid-control
	def __init__(self, config, option_prefix, case_override=None, **kwargs):
		ConfigurablePlugin.__init__(self, config)
		self._case = case_override
		if case_override is None:
			self._case = config.get_bool(join_config_locations(option_prefix, 'case sensitive'),
				default=True, **kwargs)
		self._log = logging.getLogger('matcher.%s.%s' % (self.__class__.__name__,
			option_prefix[0].replace(' ', '_')))
		if not self._log.isEnabledFor(logging.DEBUG1):
			self._log = None
コード例 #11
0
 def __init__(self, config, option_prefix, case_override=None, **kwargs):
     ConfigurablePlugin.__init__(self, config)
     self._case = case_override
     if case_override is None:
         self._case = config.getBool(appendOption(option_prefix,
                                                  'case sensitive'),
                                     default=True,
                                     **kwargs)
     self._log = logging.getLogger('matcher.%s' % option_prefix)
     if not self._log.isEnabledFor(logging.DEBUG1):
         self._log = None
コード例 #12
0
	def __init__(self, config, datasetExpr, datasetNick = None, datasetID = 0):
		ConfigurablePlugin.__init__(self, config)
		self._log = logging.getLogger('user.dataprovider')
		(self._datasetExpr, self._datasetNick, self._datasetID) = (datasetExpr, datasetNick, datasetID)
		(self._cache_block, self._cache_dataset, self._passthrough) = (None, None, False)

		self._stats = DataProcessor.createInstance('StatsDataProcessor', config)
		self._nickProducer = config.getPlugin('nickname source', 'SimpleNickNameProducer', cls = DataProcessor)
		self._datasetProcessor = config.getCompositePlugin('dataset processor',
			'EntriesConsistencyDataProcessor URLDataProcessor URLCountDataProcessor ' +
			'EntriesCountDataProcessor EmptyDataProcessor UniqueDataProcessor LocationDataProcessor',
			'MultiDataProcessor', cls = DataProcessor)
コード例 #13
0
	def __init__(self, config, datasetExpr, datasetNick = None, datasetID = 0):
		ConfigurablePlugin.__init__(self, config)
		self._log = logging.getLogger('user.dataprovider')
		(self._datasetExpr, self._datasetNick, self._datasetID) = (datasetExpr, datasetNick, datasetID)
		(self._cache_block, self._cache_dataset, self._passthrough) = (None, None, False)

		self._stats = DataProcessor.createInstance('StatsDataProcessor', config)
		self._nickProducer = config.getPlugin('nickname source', 'SimpleNickNameProducer', cls = DataProcessor)
		self._datasetProcessor = config.getCompositePlugin('dataset processor',
			'EntriesConsistencyDataProcessor URLDataProcessor URLCountDataProcessor ' +
			'EntriesCountDataProcessor EmptyDataProcessor UniqueDataProcessor LocationDataProcessor',
			'MultiDataProcessor', cls = DataProcessor, onChange = triggerResync(['datasets', 'parameters']))
コード例 #14
0
 def __init__(self, config, option_prefix, case_override=None, **kwargs):
     ConfigurablePlugin.__init__(self, config)
     self._case = case_override
     if case_override is None:
         self._case = config.get_bool(join_config_locations(
             option_prefix, 'case sensitive'),
                                      default=True,
                                      **kwargs)
     self._log = logging.getLogger(
         'matcher.%s.%s' %
         (self.__class__.__name__, option_prefix[0].replace(' ', '_')))
     if not self._log.isEnabledFor(logging.DEBUG1):
         self._log = None
コード例 #15
0
ファイル: provider_base.py プロジェクト: Fra-nk/grid-control
	def __init__(self, config, datasetExpr, datasetNick = None):
		ConfigurablePlugin.__init__(self, config)
		self._log = logging.getLogger('dataset.provider')
		(self._datasetExpr, self._datasetNick) = (datasetExpr, datasetNick)
		(self._cache_block, self._cache_dataset) = (None, None)
		self._dataset_query_interval = config.getTime('dataset default query interval', 60, onChange = None)

		triggerDataResync = triggerResync(['datasets', 'parameters'])
		self._stats = DataProcessor.createInstance('SimpleStatsDataProcessor', config, triggerDataResync, self._log,
			' * Dataset %s:\n\tcontains ' % repr(datasetNick or datasetExpr))
		self._nickProducer = config.getPlugin('nickname source', 'SimpleNickNameProducer',
			cls = DataProcessor, pargs = (triggerDataResync,), onChange = triggerDataResync)
		self._datasetProcessor = config.getCompositePlugin('dataset processor',
			'NickNameConsistencyProcessor EntriesConsistencyDataProcessor URLDataProcessor URLCountDataProcessor ' +
			'EntriesCountDataProcessor EmptyDataProcessor UniqueDataProcessor LocationDataProcessor', 'MultiDataProcessor',
			cls = DataProcessor, pargs = (triggerDataResync,), onChange = triggerDataResync)
コード例 #16
0
ファイル: splitter_base.py プロジェクト: Fra-nk/grid-control
	def __init__(self, config):
		ConfigurablePlugin.__init__(self, config)
		self.setState(src = None, protocol = {})
		# Resync settings:
		self._interactive = config.isInteractive('partition resync', False)
		#   behaviour in case of event size changes
		self._mode_removed = config.getEnum('resync mode removed', ResyncMode, ResyncMode.complete, subset = ResyncMode.noChanged)
		self._mode_expanded = config.getEnum('resync mode expand', ResyncMode, ResyncMode.changed)
		self._mode_shrunken = config.getEnum('resync mode shrink', ResyncMode, ResyncMode.changed)
		self._mode_new = config.getEnum('resync mode new', ResyncMode, ResyncMode.complete, subset = [ResyncMode.complete, ResyncMode.ignore])
		#   behaviour in case of metadata changes
		self._metaOpts = {}
		for meta in config.getList('resync metadata', [], onChange = None):
			self._metaOpts[meta] = config.getEnum('resync mode %s' % meta, ResyncMode, ResyncMode.complete, subset = ResyncMode.noChanged)
		#   behaviour in case of job changes - disable changed jobs, preserve job number of changed jobs or reorder
		self._resyncOrder = config.getEnum('resync jobs', ResyncOrder, ResyncOrder.append)
		self._initConfig(config)
コード例 #17
0
ファイル: provider_base.py プロジェクト: tolange/grid-control
    def __init__(self,
                 config,
                 datasource_name,
                 dataset_expr,
                 dataset_nick=None,
                 dataset_proc=None):
        ConfigurablePlugin.__init__(self, config)
        self._log = logging.getLogger('%s.provider' % datasource_name)
        (self._datasource_name, self._dataset_expr) = (datasource_name,
                                                       dataset_expr)
        self._dataset_nick_override = dataset_nick
        (self._cache_block, self._cache_dataset) = (None, None)
        self._dataset_query_interval = config.get_time(
            '%s default query interval' % datasource_name, 60, on_change=None)

        self._stats = dataset_proc or DataProcessor.create_instance(
            'SimpleStatsDataProcessor', config, datasource_name, self._log,
            ' * Dataset %s:\n\tcontains ' % repr(dataset_nick or dataset_expr))

        dataset_config = config.change_view(
            default_on_change=TriggerResync(['datasets', 'parameters']))
        self._nick_producer = dataset_config.get_plugin(
            ['nickname source',
             '%s nickname source' % datasource_name],
            'SimpleNickNameProducer',
            cls=DataProcessor,
            pargs=(datasource_name, ))
        self._dataset_processor = dataset_proc or dataset_config.get_composited_plugin(
            '%s processor' % datasource_name,
            'NickNameConsistencyProcessor EntriesConsistencyDataProcessor URLDataProcessor '
            +
            'URLCountDataProcessor EntriesCountDataProcessor EmptyDataProcessor UniqueDataProcessor '
            + 'LocationDataProcessor',
            'MultiDataProcessor',
            cls=DataProcessor,
            pargs=(datasource_name, ))
コード例 #18
0
ファイル: job_db.py プロジェクト: mschnepf/grid-control
	def __init__(self, config, job_limit=-1, job_selector=None):
		ConfigurablePlugin.__init__(self, config)
		self._log = logging.getLogger('jobs.db')
		(self._job_limit, self._always_selector, self._default_job_obj) = (job_limit, job_selector, Job())
コード例 #19
0
	def __init__(self, config, datasource_name):
		ConfigurablePlugin.__init__(self, config)
		self._datasource_name = datasource_name
		self._log = logging.getLogger('%s.partition.processor' % datasource_name)
コード例 #20
0
	def __init__(self, config, task):
		ConfigurablePlugin.__init__(self, config)
		self._task = task
コード例 #21
0
ファイル: scanner_base.py プロジェクト: Fra-nk/grid-control
	def __init__(self, config):
		ConfigurablePlugin.__init__(self, config)
		self._log = logging.getLogger('dataset.provider.infoscanner')
コード例 #22
0
ファイル: gui.py プロジェクト: mschnepf/grid-control
	def __init__(self, config, workflow):
		ConfigurablePlugin.__init__(self, config)
コード例 #23
0
 def __init__(self, config, datasource_name):
     ConfigurablePlugin.__init__(self, config)
     self._datasource_name = datasource_name
     self._log = logging.getLogger('%s.partition.processor' %
                                   datasource_name)
コード例 #24
0
ファイル: job_db.py プロジェクト: jolange/grid-control
 def __init__(self, config, job_limit=-1, job_selector=None):
     ConfigurablePlugin.__init__(self, config)
     self._log = logging.getLogger('jobs.db')
     (self._job_limit, self._always_selector,
      self._default_job_obj) = (job_limit, job_selector, Job())
コード例 #25
0
 def __init__(self, config, repository):
     ConfigurablePlugin.__init__(self, config)
     self._repository = repository
コード例 #26
0
ファイル: pproc_base.py プロジェクト: nils-braun/grid-control
 def __init__(self, config):
     ConfigurablePlugin.__init__(self, config)
     self._log = logging.getLogger('dataset.partition.processor')
コード例 #27
0
ファイル: scanner_base.py プロジェクト: jolange/grid-control
	def __init__(self, config, datasource_name):
		ConfigurablePlugin.__init__(self, config)
		self._log = logging.getLogger('%s.provider.infoscanner' % datasource_name)
		self._datasource_name = datasource_name
コード例 #28
0
 def __init__(self, config):
     ConfigurablePlugin.__init__(self, config)
     self._log = logging.getLogger('dataset.provider.infoscanner')
コード例 #29
0
ファイル: job_db.py プロジェクト: nils-braun/grid-control
 def __init__(self, config, jobLimit=-1, jobSelector=None):
     ConfigurablePlugin.__init__(self, config)
     self._log = logging.getLogger('jobs.db')
     (self._jobLimit, self._alwaysSelector) = (jobLimit, jobSelector)
     (self._defaultJob, self._workPath) = (Job(), config.getWorkPath())
コード例 #30
0
ファイル: stream_base.py プロジェクト: jolange/grid-control
 def __init__(self, config, stream, register_callback=False):
     ConfigurablePlugin.__init__(self, config)
     self._msg_len_max = config.get_int('activity max length',
                                        75,
                                        on_change=None)
     (self._stream, self._register_cb) = (stream, register_callback)
コード例 #31
0
ファイル: dproc_base.py プロジェクト: nils-braun/grid-control
 def __init__(self, config, onChange):
     ConfigurablePlugin.__init__(self, config)
     self._log = logging.getLogger('dataset.provider.processor')
     self._log_debug = None
     if self._log.isEnabledFor(logging.DEBUG):
         self._log_debug = self._log
コード例 #32
0
	def __init__(self, config, source):
		ConfigurablePlugin.__init__(self, config)
		self._log = logging.getLogger('padapter')
		self._source = source
コード例 #33
0
	def __init__(self, config, datasource_name):
		ConfigurablePlugin.__init__(self, config)
		self._log = logging.getLogger('%s.provider.infoscanner' % datasource_name)
		self._datasource_name = datasource_name
コード例 #34
0
 def __init__(self, config, task):
     ConfigurablePlugin.__init__(self, config)
     self._task = task
コード例 #35
0
	def __init__(self, config):
		ConfigurablePlugin.__init__(self, config)
		self._log = None
コード例 #36
0
	def __init__(self, config, option_prefix, *kwargs):
		ConfigurablePlugin.__init__(self, config)
		self._case = config.getBool(appendOption(option_prefix, 'case sensitive'), default = True)
コード例 #37
0
ファイル: dproc_base.py プロジェクト: Fra-nk/grid-control
	def __init__(self, config, onChange):
		ConfigurablePlugin.__init__(self, config)
		self._log = logging.getLogger('dataset.provider.processor')
		self._log_debug = None
		if self._log.isEnabledFor(logging.DEBUG):
			self._log_debug = self._log
コード例 #38
0
ファイル: scanner_base.py プロジェクト: whahmad/grid-control
	def __init__(self, config):
		ConfigurablePlugin.__init__(self, config)
		self._log = logging.getLogger('infoscanner')
コード例 #39
0
ファイル: pproc_base.py プロジェクト: Fra-nk/grid-control
	def __init__(self, config):
		ConfigurablePlugin.__init__(self, config)
		self._log = logging.getLogger('dataset.partition.processor')
コード例 #40
0
 def __init__(self, config, option_prefix, *kwargs):
     ConfigurablePlugin.__init__(self, config)
     self._case = config.getBool(appendOption(option_prefix,
                                              'case sensitive'),
                                 default=True)
コード例 #41
0
	def __init__(self, config):
		ConfigurablePlugin.__init__(self, config)
		self._log = logging.getLogger('partproc')
コード例 #42
0
ファイル: gui.py プロジェクト: shyambhiogade/grid-control
 def __init__(self, config, workflow):
     ConfigurablePlugin.__init__(self, config)
コード例 #43
0
	def __init__(self, config, stream, register_callback=False):
		ConfigurablePlugin.__init__(self, config)
		self._msg_len_max = config.get_int('activity max length', 75, on_change=None)
		(self._stream, self._register_cb) = (stream, register_callback)