Search in sources :

Example 1 with NoOpWindowStore

use of org.apache.kafka.streams.state.NoOpWindowStore in project apache-kafka-on-k8s by banzaicloud.

the class WrappingStoreProviderTest method before.

@Before
public void before() {
    final StateStoreProviderStub stubProviderOne = new StateStoreProviderStub(false);
    final StateStoreProviderStub stubProviderTwo = new StateStoreProviderStub(false);
    stubProviderOne.addStore("kv", StateStoreTestUtils.newKeyValueStore("kv", "app-id", String.class, String.class));
    stubProviderOne.addStore("window", new NoOpWindowStore());
    stubProviderTwo.addStore("kv", StateStoreTestUtils.newKeyValueStore("kv", "app-id", String.class, String.class));
    stubProviderTwo.addStore("window", new NoOpWindowStore());
    wrappingStoreProvider = new WrappingStoreProvider(Arrays.<StateStoreProvider>asList(stubProviderOne, stubProviderTwo));
}
Also used : NoOpWindowStore(org.apache.kafka.streams.state.NoOpWindowStore) StateStoreProviderStub(org.apache.kafka.test.StateStoreProviderStub) Before(org.junit.Before)

Example 2 with NoOpWindowStore

use of org.apache.kafka.streams.state.NoOpWindowStore in project kafka by apache.

the class WrappingStoreProviderTest method before.

@Before
public void before() {
    final StateStoreProviderStub stubProviderOne = new StateStoreProviderStub(false);
    final StateStoreProviderStub stubProviderTwo = new StateStoreProviderStub(false);
    for (int partition = 0; partition < numStateStorePartitions; partition++) {
        stubProviderOne.addStore("kv", partition, Stores.keyValueStoreBuilder(Stores.inMemoryKeyValueStore("kv"), Serdes.serdeFrom(String.class), Serdes.serdeFrom(String.class)).build());
        stubProviderOne.addStore("window", partition, new NoOpWindowStore());
        wrappingStoreProvider = new WrappingStoreProvider(Arrays.asList(stubProviderOne, stubProviderTwo), StoreQueryParameters.fromNameAndType("kv", QueryableStoreTypes.keyValueStore()));
    }
}
Also used : NoOpWindowStore(org.apache.kafka.streams.state.NoOpWindowStore) StateStoreProviderStub(org.apache.kafka.test.StateStoreProviderStub) Before(org.junit.Before)

Example 3 with NoOpWindowStore

use of org.apache.kafka.streams.state.NoOpWindowStore in project apache-kafka-on-k8s by banzaicloud.

the class QueryableStoreProviderTest method before.

@Before
public void before() {
    final StateStoreProviderStub theStoreProvider = new StateStoreProviderStub(false);
    theStoreProvider.addStore(keyValueStore, new NoOpReadOnlyStore<>());
    theStoreProvider.addStore(windowStore, new NoOpWindowStore());
    globalStateStores = new HashMap<>();
    storeProvider = new QueryableStoreProvider(Collections.<StateStoreProvider>singletonList(theStoreProvider), new GlobalStateStoreProvider(globalStateStores));
}
Also used : NoOpWindowStore(org.apache.kafka.streams.state.NoOpWindowStore) StateStoreProviderStub(org.apache.kafka.test.StateStoreProviderStub) Before(org.junit.Before)

Example 4 with NoOpWindowStore

use of org.apache.kafka.streams.state.NoOpWindowStore in project kafka by apache.

the class QueryableStoreProviderTest method before.

@Before
public void before() {
    final StateStoreProviderStub theStoreProvider = new StateStoreProviderStub(false);
    for (int partition = 0; partition < numStateStorePartitions; partition++) {
        theStoreProvider.addStore(keyValueStore, partition, new NoOpReadOnlyStore<>());
        theStoreProvider.addStore(windowStore, partition, new NoOpWindowStore());
    }
    globalStateStores = new HashMap<>();
    storeProvider = new QueryableStoreProvider(new GlobalStateStoreProvider(globalStateStores));
    storeProvider.addStoreProviderForThread("thread1", theStoreProvider);
}
Also used : NoOpWindowStore(org.apache.kafka.streams.state.NoOpWindowStore) StateStoreProviderStub(org.apache.kafka.test.StateStoreProviderStub) Before(org.junit.Before)

Aggregations

NoOpWindowStore (org.apache.kafka.streams.state.NoOpWindowStore)4 StateStoreProviderStub (org.apache.kafka.test.StateStoreProviderStub)4 Before (org.junit.Before)4