Ejemplo n.º 1
0
  def _generate_test_vectors(self):
    """Generate test vector objects

    If the user has specified a set for table_formats, generate them, otherwise generate
    vectors for all table formats within the specified exploration strategy.
    """
    self._test_vectors = []
    if self.config.table_formats:
      dataset = get_dataset_from_workload(self.workload.name)
      for tf in self.config.table_formats:
        self._test_vectors.append(TableFormatInfo.create_from_string(dataset, tf))
    else:
      vectors = load_table_info_dimension(self.workload.name,
          self.config.exploration_strategy)
      self._test_vectors = [vector.value for vector in vectors]
Ejemplo n.º 2
0
  def __generate_test_vectors(self):
    """Generate test vector objects

    If the user has specified a set for table_formats, generate them, otherwise generate
    vectors for all table formats within the specified exploration strategy.
    """
    self.__test_vectors = []
    if self.config.table_formats:
      dataset = get_dataset_from_workload(self.workload.name)
      for tf in self.config.table_formats:
        self.__test_vectors.append(TableFormatInfo.create_from_string(dataset, tf))
    else:
      vectors = load_table_info_dimension(self.workload.name,
          self.config.exploration_strategy)
      self.__test_vectors = [vector.value for vector in vectors]
Ejemplo n.º 3
0
 def create_table_info_dimension(cls, exploration_strategy):
   # If the user has specified a specific set of table formats to run against, then
   # use those. Otherwise, load from the workload test vectors.
   if pytest.config.option.table_formats:
     table_formats = list()
     for tf in pytest.config.option.table_formats.split(','):
       dataset = get_dataset_from_workload(cls.get_workload())
       table_formats.append(TableFormatInfo.create_from_string(dataset, tf))
     tf_dimensions = ImpalaTestDimension('table_format', *table_formats)
   else:
     tf_dimensions = load_table_info_dimension(cls.get_workload(), exploration_strategy)
   # If 'skip_hbase' is specified or the filesystem is isilon, s3 or local, we don't
   # need the hbase dimension.
   if pytest.config.option.skip_hbase or TARGET_FILESYSTEM.lower() \
       in ['s3', 'isilon', 'local', 'abfs', 'adls']:
     for tf_dimension in tf_dimensions:
       if tf_dimension.value.file_format == "hbase":
         tf_dimensions.remove(tf_dimension)
         break
   return tf_dimensions
Ejemplo n.º 4
0
 def create_table_info_dimension(cls, exploration_strategy):
   # If the user has specified a specific set of table formats to run against, then
   # use those. Otherwise, load from the workload test vectors.
   if pytest.config.option.table_formats:
     table_formats = list()
     for tf in pytest.config.option.table_formats.split(','):
       dataset = get_dataset_from_workload(cls.get_workload())
       table_formats.append(TableFormatInfo.create_from_string(dataset, tf))
     tf_dimensions = TestDimension('table_format', *table_formats)
   else:
     tf_dimensions = load_table_info_dimension(cls.get_workload(), exploration_strategy)
   # If 'skip_hbase' is specified or the filesystem is isilon, s3 or local, we don't
   # need the hbase dimension.
   if pytest.config.option.skip_hbase or TARGET_FILESYSTEM.lower() \
       in ['s3', 'isilon', 'local']:
     for tf_dimension in tf_dimensions:
       if tf_dimension.value.file_format == "hbase":
         tf_dimensions.remove(tf_dimension)
         break
   return tf_dimensions