pub fn make_ingester_data(two_partitions: bool, loc: DataLocation) -> IngesterData {
    // Whatever data because they won't be used in the tests
    let metrics: Arc<metric::Registry> = Default::default();
    let catalog: Arc<dyn Catalog> = Arc::new(MemCatalog::new(Arc::clone(&metrics)));
    let object_store = Arc::new(InMemory::new());
    let exec = Arc::new(iox_query::exec::Executor::new(1));

    // Make data for one sequencer/shard and two tables
    let seq_id = SequencerId::new(1);
    let empty_table_id = TableId::new(1);
    let data_table_id = TableId::new(2);

    // Make partitions per requested
    let partitions = make_partitions(two_partitions, loc, seq_id, data_table_id, TEST_TABLE);

    // Two tables: one empty and one with data of one or two partitions
    let mut tables = BTreeMap::new();
    let empty_tbl = Arc::new(tokio::sync::RwLock::new(TableData::new(
        empty_table_id,
        None,
    )));
    let data_tbl = Arc::new(tokio::sync::RwLock::new(TableData::new_for_test(
        data_table_id,
        None,
        partitions,
    )));
    tables.insert(TEST_TABLE_EMPTY.to_string(), empty_tbl);
    tables.insert(TEST_TABLE.to_string(), data_tbl);

    // Two namespaces: one empty and one with data of 2 tables
    let mut namespaces = BTreeMap::new();
    let empty_ns = Arc::new(NamespaceData::new(NamespaceId::new(1), &*metrics));
    let data_ns = Arc::new(NamespaceData::new_for_test(NamespaceId::new(2), tables));
    namespaces.insert(TEST_NAMESPACE_EMPTY.to_string(), empty_ns);
    namespaces.insert(TEST_NAMESPACE.to_string(), data_ns);

    // One sequencer/shard that contains 2 namespaces
    let kafka_partition = KafkaPartition::new(0);
    let seq_data = SequencerData::new_for_test(kafka_partition, namespaces);
    let mut sequencers = BTreeMap::new();
    sequencers.insert(seq_id, seq_data);

    // Ingester data that includes one sequencer/shard
    IngesterData::new(
        object_store,
        catalog,
        sequencers,
        Arc::new(DefaultPartitioner::default()),
        exec,
        backoff::BackoffConfig::default(),
    )
}
/// This function produces one scenario but with the parameter combination (2*7),
/// you will be able to produce 14 scenarios by calling it in 2 loops
This function produces one scenario but with the parameter combination (2*7),
you will be able to produce 14 scenarios by calling it in 2 loops
This function produces one scenario but with the parameter combination ( 2 * 7 ) you will be able to produce 14 scenarios by calling it in 2 loops
pub fn make_ingester_data(two_partitions: bool, loc: DataLocation) -> IngesterData {
    // Whatever data because they won't be used in the tests
    let metrics: Arc<metric::Registry> = Default::default();
    let catalog: Arc<dyn Catalog> = Arc::new(MemCatalog::new(Arc::clone(&metrics)));
    let object_store = Arc::new(InMemory::new());
    let exec = Arc::new(iox_query::exec::Executor::new(1));
    // Make data for one sequencer/shard and two tables
    let seq_id = SequencerId::new(1);
    let empty_table_id = TableId::new(1);
    let data_table_id = TableId::new(2);
    // Make partitions per requested
    let partitions = make_partitions(two_partitions, loc, seq_id, data_table_id, TEST_TABLE);
    // Two tables: one empty and one with data of one or two partitions
    let mut tables = BTreeMap::new();
    let empty_tbl = Arc::new(tokio::sync::RwLock::new(TableData::new(
        empty_table_id,
        None,
    )));
    let data_tbl = Arc::new(tokio::sync::RwLock::new(TableData::new_for_test(
        data_table_id,
        None,
        partitions,
    )));
    tables.insert(TEST_TABLE_EMPTY.to_string(), empty_tbl);
    tables.insert(TEST_TABLE.to_string(), data_tbl);
    // Two namespaces: one empty and one with data of 2 tables
    let mut namespaces = BTreeMap::new();
    let empty_ns = Arc::new(NamespaceData::new(NamespaceId::new(1), &*metrics));
    let data_ns = Arc::new(NamespaceData::new_for_test(NamespaceId::new(2), tables));
    namespaces.insert(TEST_NAMESPACE_EMPTY.to_string(), empty_ns);
    namespaces.insert(TEST_NAMESPACE.to_string(), data_ns);
    // One sequencer/shard that contains 2 namespaces
    let kafka_partition = KafkaPartition::new(0);
    let seq_data = SequencerData::new_for_test(kafka_partition, namespaces);
    let mut sequencers = BTreeMap::new();
    sequencers.insert(seq_id, seq_data);
    // Ingester data that includes one sequencer/shard
    IngesterData::new(
        object_store,
        catalog,
        sequencers,
        Arc::new(DefaultPartitioner::default()),
        exec,
        backoff::BackoffConfig::default(),
    )
}
pub fn make_ingester_data ( two_partitions : bool , loc : DataLocation ) -> IngesterData { // Whatever data because they won't be used in the tests let metrics : Arc < metric :: Registry > = Default :: default ( ) ; let catalog : Arc < dyn Catalog > = Arc :: new ( MemCatalog :: new ( Arc :: clone ( & metrics ) ) ) ; let object_store = Arc :: new ( InMemory :: new ( ) ) ; let exec = Arc :: new ( iox_query :: exec :: Executor :: new ( 1 ) ) ; // Make data for one sequencer/shard and two tables let seq_id = SequencerId :: new ( 1 ) ; let empty_table_id = TableId :: new ( 1 ) ; let data_table_id = TableId :: new ( 2 ) ; // Make partitions per requested let partitions = make_partitions ( two_partitions , loc , seq_id , data_table_id , TEST_TABLE ) ; // Two tables: one empty and one with data of one or two partitions let mut tables = BTreeMap :: new ( ) ; let empty_tbl = Arc :: new ( tokio :: sync :: RwLock :: new ( TableData :: new ( empty_table_id , None , ) ) ) ; let data_tbl = Arc :: new ( tokio :: sync :: RwLock :: new ( TableData :: new_for_test ( data_table_id , None , partitions , ) ) ) ; tables . insert ( TEST_TABLE_EMPTY . to_string ( ) , empty_tbl ) ; tables . insert ( TEST_TABLE . to_string ( ) , data_tbl ) ; // Two namespaces: one empty and one with data of 2 tables let mut namespaces = BTreeMap :: new ( ) ; let empty_ns = Arc :: new ( NamespaceData :: new ( NamespaceId :: new ( 1 ) , & * metrics ) ) ; let data_ns = Arc :: new ( NamespaceData :: new_for_test ( NamespaceId :: new ( 2 ) , tables ) ) ; namespaces . insert ( TEST_NAMESPACE_EMPTY . to_string ( ) , empty_ns ) ; namespaces . insert ( TEST_NAMESPACE . to_string ( ) , data_ns ) ; // One sequencer/shard that contains 2 namespaces let kafka_partition = KafkaPartition :: new ( 0 ) ; let seq_data = SequencerData :: new_for_test ( kafka_partition , namespaces ) ; let mut sequencers = BTreeMap :: new ( ) ; sequencers . insert ( seq_id , seq_data ) ; // Ingester data that includes one sequencer/shard IngesterData :: new ( object_store , catalog , sequencers , Arc :: new ( DefaultPartitioner :: default ( ) ) , exec , backoff :: BackoffConfig :: default ( ) , ) }
This function produces one scenario but with the parameter combination (2*7),
you will be able to produce 14 scenarios by calling it in 2 loops
This function produces one scenario but with the parameter combination ( 2 * 7 ) you will be able to produce 14 scenarios by calling it in 2 loops
two_partitions
bool
loc
DataLocation
two_partitions
bool
loc
DataLocation