Beispiel #1
0
 def configure_xdcr_settings(self):
     xdcr_cluster_settings = self.test_config.xdcr_cluster_settings
     if self.dynamic_infra:
         return
     for master in self.cluster_spec.masters:
         for parameter, value in xdcr_cluster_settings.items():
             self.rest.set_xdcr_cluster_settings(
                 master, {parameter: maybe_atoi(value)})
Beispiel #2
0
 def configure_internal_settings(self):
     internal_settings = self.test_config.internal_settings
     for master in self.cluster_spec.masters:
         for parameter, value in internal_settings.items():
             if self.dynamic_infra:
                 raise Exception(
                     'not supported for dynamic infrastructure yet')
             else:
                 self.rest.set_internal_settings(
                     master, {parameter: maybe_atoi(value)})
Beispiel #3
0
    def __init__(self, options: dict):
        self.indexes = {}
        if options.get('indexes') is not None:
            for index_def in options.get('indexes').split(','):
                name, field = index_def.split(':')
                if field.startswith('"'):
                    field = field.replace('"', '\\\"')
                else:
                    field = ','.join(field.split(' '))
                self.indexes[name] = field

        self.cbindexperf_configfile = options.get('cbindexperf_configfile',
                                                  self.CBINDEXPERF_CONFIGFILE)
        self.cbindexperf_configfiles = options.get(
            'cbindexperf_configfiles', self.CBINDEXPERF_CONFIGFILES)
        self.run_recovery_test = int(
            options.get('run_recovery_test', self.RUN_RECOVERY_TEST))
        self.incremental_only = int(
            options.get('incremental_only', self.INCREMENTAL_ONLY))
        self.incremental_load_iterations = int(
            options.get('incremental_load_iterations',
                        self.INCREMENTAL_LOAD_ITERATIONS))
        self.scan_time = int(options.get('scan_time', self.SCAN_TIME))
        self.report_initial_build_time = int(
            options.get('report_initial_build_time',
                        self.REPORT_INITIAL_BUILD_TIME))

        self.settings = {}
        for option in options:
            if option.startswith(('indexer', 'projector', 'queryport')):
                value = options.get(option)
                if '.' in value:
                    self.settings[option] = maybe_atoi(value, t=float)
                else:
                    self.settings[option] = maybe_atoi(value, t=int)

        if self.settings:
            if self.settings['indexer.settings.storage_mode'] == 'forestdb' or \
                    self.settings['indexer.settings.storage_mode'] == 'plasma':
                self.storage = self.settings['indexer.settings.storage_mode']
            else:
                self.storage = 'memdb'
Beispiel #4
0
    def __init__(self, options: dict):
        self.indexes = {}
        if options.get('indexes') is not None:
            for index_def in options.get('indexes').split(','):
                name, field = index_def.split(':')
                if field.startswith('"'):
                    field = field.replace('"', '\\\"')
                else:
                    field = ','.join(field.split(' '))
                self.indexes[name] = field

        self.cbindexperf_configfile = options.get('cbindexperf_configfile',
                                                  self.CBINDEXPERF_CONFIGFILE)
        self.cbindexperf_configfiles = options.get('cbindexperf_configfiles',
                                                   self.CBINDEXPERF_CONFIGFILES)
        self.run_recovery_test = int(options.get('run_recovery_test',
                                                 self.RUN_RECOVERY_TEST))
        self.incremental_only = int(options.get('incremental_only',
                                                self.INCREMENTAL_ONLY))
        self.incremental_load_iterations = int(options.get('incremental_load_iterations',
                                                           self.INCREMENTAL_LOAD_ITERATIONS))
        self.scan_time = int(options.get('scan_time', self.SCAN_TIME))

        self.settings = {}
        for option in options:
            if option.startswith(('indexer', 'projector', 'queryport')):
                value = options.get(option)
                if '.' in value:
                    self.settings[option] = maybe_atoi(value, t=float)
                else:
                    self.settings[option] = maybe_atoi(value, t=int)

        if self.settings:
            if self.settings['indexer.settings.storage_mode'] == 'forestdb' or \
                    self.settings['indexer.settings.storage_mode'] == 'plasma':
                self.storage = self.settings['indexer.settings.storage_mode']
            else:
                self.storage = 'memdb'
Beispiel #5
0
 def __init__(self, options: dict):
     self.cbq_settings = {
         option: maybe_atoi(value)
         for option, value in options.items()
     }
Beispiel #6
0
 def configure_internal_settings(self):
     internal_settings = self.test_config.internal_settings
     for master in self.cluster_spec.masters:
         for parameter, value in internal_settings.items():
             self.rest.set_internal_settings(master,
                                             {parameter: maybe_atoi(value)})
Beispiel #7
0
 def configure_xdcr_settings(self):
     xdcr_cluster_settings = self.test_config.xdcr_cluster_settings
     for master in self.cluster_spec.masters:
         for parameter, value in xdcr_cluster_settings.items():
             self.rest.set_xdcr_cluster_settings(master,
                                                 {parameter: maybe_atoi(value)})
Beispiel #8
0
 def __init__(self, options: dict):
     self.cbq_settings = {
         option: maybe_atoi(value) for option, value in options.items()
     }