Search in sources :

Example 1 with Table

use of org.apache.samza.table.Table in project samza by apache.

the class TestRemoteTableDescriptor method doTestDeserializeReadFunctionAndLimiter.

private void doTestDeserializeReadFunctionAndLimiter(boolean rateOnly, boolean rlGets, boolean rlPuts) {
    int numRateLimitOps = (rlGets ? 1 : 0) + (rlPuts ? 1 : 0);
    RemoteTableDescriptor<String, String, String> desc = new RemoteTableDescriptor("1").withReadFunction(createMockTableReadFunction()).withReadRetryPolicy(new TableRetryPolicy().withRetryPredicate((ex) -> false)).withWriteFunction(createMockTableWriteFunction()).withAsyncCallbackExecutorPoolSize(10);
    if (rateOnly) {
        if (rlGets) {
            desc.withReadRateLimit(1000);
        } else {
            desc.withReadRateLimiterDisabled();
        }
        if (rlPuts) {
            desc.withWriteRateLimit(2000);
        } else {
            desc.withWriteRateLimiterDisabled();
        }
    } else {
        if (numRateLimitOps > 0) {
            Map<String, Integer> tagCredits = new HashMap<>();
            if (rlGets) {
                tagCredits.put(RemoteTableDescriptor.RL_READ_TAG, 1000);
            } else {
                desc.withReadRateLimiterDisabled();
            }
            if (rlPuts) {
                tagCredits.put(RemoteTableDescriptor.RL_WRITE_TAG, 2000);
            } else {
                desc.withWriteRateLimiterDisabled();
            }
            // Spy the rate limiter to verify call count
            RateLimiter rateLimiter = spy(new EmbeddedTaggedRateLimiter(tagCredits));
            desc.withRateLimiter(rateLimiter, new CountingCreditFunction(), new CountingCreditFunction());
        } else {
            desc.withRateLimiterDisabled();
        }
    }
    RemoteTableProvider provider = new RemoteTableProvider(desc.getTableId());
    provider.init(createMockContext(desc));
    Table table = provider.getTable();
    Assert.assertTrue(table instanceof RemoteTable);
    RemoteTable rwTable = (RemoteTable) table;
    AsyncReadWriteUpdateTable delegate = TestUtils.getFieldValue(rwTable, "asyncTable");
    Assert.assertTrue(delegate instanceof AsyncRetriableTable);
    if (rlGets || rlPuts) {
        delegate = TestUtils.getFieldValue(delegate, "table");
        Assert.assertTrue(delegate instanceof AsyncRateLimitedTable);
    }
    delegate = TestUtils.getFieldValue(delegate, "table");
    Assert.assertTrue(delegate instanceof AsyncRemoteTable);
    if (numRateLimitOps > 0) {
        TableRateLimiter readRateLimiter = TestUtils.getFieldValue(rwTable, "readRateLimiter");
        TableRateLimiter writeRateLimiter = TestUtils.getFieldValue(rwTable, "writeRateLimiter");
        Assert.assertTrue(!rlGets || readRateLimiter != null);
        Assert.assertTrue(!rlPuts || writeRateLimiter != null);
    }
    ThreadPoolExecutor callbackExecutor = TestUtils.getFieldValue(rwTable, "callbackExecutor");
    Assert.assertEquals(10, callbackExecutor.getCorePoolSize());
}
Also used : ThreadPoolExecutor(java.util.concurrent.ThreadPoolExecutor) TableDescriptor(org.apache.samza.table.descriptors.TableDescriptor) TaskModel(org.apache.samza.job.model.TaskModel) HashMap(java.util.HashMap) Mockito.spy(org.mockito.Mockito.spy) TableReadFunction(org.apache.samza.table.remote.TableReadFunction) CreditFunction(org.apache.samza.table.remote.TableRateLimiter.CreditFunction) TestUtils(org.apache.samza.testUtils.TestUtils) RemoteTable(org.apache.samza.table.remote.RemoteTable) Counter(org.apache.samza.metrics.Counter) AsyncRetriableTable(org.apache.samza.table.retry.AsyncRetriableTable) Map(java.util.Map) TableWriteFunction(org.apache.samza.table.remote.TableWriteFunction) MapConfig(org.apache.samza.config.MapConfig) Mockito.anyString(org.mockito.Mockito.anyString) JobModel(org.apache.samza.job.model.JobModel) Table(org.apache.samza.table.Table) AsyncRateLimitedTable(org.apache.samza.table.ratelimit.AsyncRateLimitedTable) TaskName(org.apache.samza.container.TaskName) EmbeddedTaggedRateLimiter(org.apache.samza.util.EmbeddedTaggedRateLimiter) ImmutableMap(com.google.common.collect.ImmutableMap) JobContext(org.apache.samza.context.JobContext) Timer(org.apache.samza.metrics.Timer) ContainerContext(org.apache.samza.context.ContainerContext) TableRetryPolicy(org.apache.samza.table.retry.TableRetryPolicy) Test(org.junit.Test) Mockito.times(org.mockito.Mockito.times) JavaTableConfig(org.apache.samza.config.JavaTableConfig) MetricsRegistry(org.apache.samza.metrics.MetricsRegistry) Mockito.when(org.mockito.Mockito.when) AsyncRemoteTable(org.apache.samza.table.remote.AsyncRemoteTable) Mockito.verify(org.mockito.Mockito.verify) Context(org.apache.samza.context.Context) ContainerModel(org.apache.samza.job.model.ContainerModel) RateLimiter(org.apache.samza.util.RateLimiter) RemoteTableProvider(org.apache.samza.table.remote.RemoteTableProvider) Config(org.apache.samza.config.Config) TablePart(org.apache.samza.table.remote.TablePart) Mockito.withSettings(org.mockito.Mockito.withSettings) TaskContextImpl(org.apache.samza.context.TaskContextImpl) AsyncReadWriteUpdateTable(org.apache.samza.table.AsyncReadWriteUpdateTable) Assert(org.junit.Assert) Mockito.any(org.mockito.Mockito.any) RemoteTableDescriptor(org.apache.samza.table.descriptors.RemoteTableDescriptor) TableRateLimiter(org.apache.samza.table.remote.TableRateLimiter) Mockito.mock(org.mockito.Mockito.mock) RemoteTable(org.apache.samza.table.remote.RemoteTable) AsyncRetriableTable(org.apache.samza.table.retry.AsyncRetriableTable) Table(org.apache.samza.table.Table) AsyncRateLimitedTable(org.apache.samza.table.ratelimit.AsyncRateLimitedTable) AsyncRemoteTable(org.apache.samza.table.remote.AsyncRemoteTable) AsyncReadWriteUpdateTable(org.apache.samza.table.AsyncReadWriteUpdateTable) AsyncRemoteTable(org.apache.samza.table.remote.AsyncRemoteTable) HashMap(java.util.HashMap) TableRetryPolicy(org.apache.samza.table.retry.TableRetryPolicy) RemoteTableDescriptor(org.apache.samza.table.descriptors.RemoteTableDescriptor) Mockito.anyString(org.mockito.Mockito.anyString) RemoteTableProvider(org.apache.samza.table.remote.RemoteTableProvider) EmbeddedTaggedRateLimiter(org.apache.samza.util.EmbeddedTaggedRateLimiter) RateLimiter(org.apache.samza.util.RateLimiter) TableRateLimiter(org.apache.samza.table.remote.TableRateLimiter) EmbeddedTaggedRateLimiter(org.apache.samza.util.EmbeddedTaggedRateLimiter) AsyncRetriableTable(org.apache.samza.table.retry.AsyncRetriableTable) TableRateLimiter(org.apache.samza.table.remote.TableRateLimiter) RemoteTable(org.apache.samza.table.remote.RemoteTable) AsyncRemoteTable(org.apache.samza.table.remote.AsyncRemoteTable) AsyncReadWriteUpdateTable(org.apache.samza.table.AsyncReadWriteUpdateTable) ThreadPoolExecutor(java.util.concurrent.ThreadPoolExecutor) AsyncRateLimitedTable(org.apache.samza.table.ratelimit.AsyncRateLimitedTable)

Example 2 with Table

use of org.apache.samza.table.Table in project samza by apache.

the class TestExecutionPlanner method createStreamGraphWithStreamTableJoinWithSideInputs.

private StreamApplicationDescriptorImpl createStreamGraphWithStreamTableJoinWithSideInputs() {
    /**
     * Example stream-table join where table t is configured with input1 (64) as a side-input stream.
     *
     *                                   join-table t -> output1 (8)
     *                                        |
     *    input2 (16) -> partitionBy ("64") __|
     */
    return new StreamApplicationDescriptorImpl(appDesc -> {
        MessageStream<KV<Object, Object>> messageStream2 = appDesc.getInputStream(input2Descriptor);
        OutputStream<KV<Object, Object>> output1 = appDesc.getOutputStream(output1Descriptor);
        TableDescriptor tableDescriptor = new TestLocalTableDescriptor.MockLocalTableDescriptor("table-id", new KVSerde(new StringSerde(), new StringSerde())).withSideInputs(Arrays.asList("input1")).withSideInputsProcessor(mock(SideInputsProcessor.class));
        Table table = appDesc.getTable(tableDescriptor);
        messageStream2.partitionBy(m -> m.key, m -> m.value, mock(KVSerde.class), "p1").join(table, mock(StreamTableJoinFunction.class)).sendTo(output1);
    }, config);
}
Also used : KVSerde(org.apache.samza.serializers.KVSerde) StringSerde(org.apache.samza.serializers.StringSerde) Table(org.apache.samza.table.Table) StreamApplicationDescriptorImpl(org.apache.samza.application.descriptors.StreamApplicationDescriptorImpl) KV(org.apache.samza.operators.KV) TableDescriptor(org.apache.samza.table.descriptors.TableDescriptor) TestLocalTableDescriptor(org.apache.samza.table.descriptors.TestLocalTableDescriptor) SideInputsProcessor(org.apache.samza.storage.SideInputsProcessor)

Example 3 with Table

use of org.apache.samza.table.Table in project samza by apache.

the class TestExecutionPlanner method createStreamGraphWithInvalidStreamTableJoinWithSideInputs.

private StreamApplicationDescriptorImpl createStreamGraphWithInvalidStreamTableJoinWithSideInputs() {
    /**
     * Example stream-table join that is invalid due to disagreement in partition count between the
     * stream behind table t and another joined stream. Table t is configured with input2 (16) as
     * side-input stream.
     *
     *                   join-table t -> output1 (8)
     *                         |
     *    input1 (64) —————————
     */
    return new StreamApplicationDescriptorImpl(appDesc -> {
        MessageStream<KV<Object, Object>> messageStream1 = appDesc.getInputStream(input1Descriptor);
        OutputStream<KV<Object, Object>> output1 = appDesc.getOutputStream(output1Descriptor);
        TableDescriptor tableDescriptor = new TestLocalTableDescriptor.MockLocalTableDescriptor("table-id", new KVSerde(new StringSerde(), new StringSerde())).withSideInputs(Arrays.asList("input2")).withSideInputsProcessor(mock(SideInputsProcessor.class));
        Table table = appDesc.getTable(tableDescriptor);
        messageStream1.join(table, mock(StreamTableJoinFunction.class)).sendTo(output1);
    }, config);
}
Also used : KVSerde(org.apache.samza.serializers.KVSerde) StringSerde(org.apache.samza.serializers.StringSerde) Table(org.apache.samza.table.Table) StreamApplicationDescriptorImpl(org.apache.samza.application.descriptors.StreamApplicationDescriptorImpl) KV(org.apache.samza.operators.KV) TableDescriptor(org.apache.samza.table.descriptors.TableDescriptor) TestLocalTableDescriptor(org.apache.samza.table.descriptors.TestLocalTableDescriptor) SideInputsProcessor(org.apache.samza.storage.SideInputsProcessor)

Example 4 with Table

use of org.apache.samza.table.Table in project samza by apache.

the class TestCouchbaseRemoteTableEndToEnd method testEndToEnd.

@Test
public void testEndToEnd() {
    Bucket inputBucket = cluster.openBucket(inputBucketName);
    inputBucket.upsert(ByteArrayDocument.create("Alice", "20".getBytes()));
    inputBucket.upsert(ByteArrayDocument.create("Bob", "30".getBytes()));
    inputBucket.upsert(ByteArrayDocument.create("Chris", "40".getBytes()));
    inputBucket.upsert(ByteArrayDocument.create("David", "50".getBytes()));
    inputBucket.close();
    List<String> users = Arrays.asList("Alice", "Bob", "Chris", "David");
    final StreamApplication app = appDesc -> {
        DelegatingSystemDescriptor inputSystemDescriptor = new DelegatingSystemDescriptor("test");
        GenericInputDescriptor<String> inputDescriptor = inputSystemDescriptor.getInputDescriptor("User", new NoOpSerde<>());
        CouchbaseTableReadFunction<String> readFunction = new CouchbaseTableReadFunction<>(inputBucketName, String.class, "couchbase://127.0.0.1").withBootstrapCarrierDirectPort(couchbaseMock.getCarrierPort(inputBucketName)).withBootstrapHttpDirectPort(couchbaseMock.getHttpPort()).withSerde(new StringSerde());
        CouchbaseTableWriteFunction<JsonObject> writeFunction = new CouchbaseTableWriteFunction<>(outputBucketName, JsonObject.class, "couchbase://127.0.0.1").withBootstrapCarrierDirectPort(couchbaseMock.getCarrierPort(outputBucketName)).withBootstrapHttpDirectPort(couchbaseMock.getHttpPort());
        RemoteTableDescriptor inputTableDesc = new RemoteTableDescriptor<String, String, Void>("input-table").withReadFunction(readFunction).withRateLimiterDisabled();
        Table<KV<String, String>> inputTable = appDesc.getTable(inputTableDesc);
        RemoteTableDescriptor outputTableDesc = new RemoteTableDescriptor<String, JsonObject, Object>("output-table").withReadFunction(new NoOpTableReadFunction<>()).withWriteFunction(writeFunction).withRateLimiterDisabled();
        Table<KV<String, JsonObject>> outputTable = appDesc.getTable(outputTableDesc);
        appDesc.getInputStream(inputDescriptor).map(k -> KV.of(k, k)).join(inputTable, new JoinFunction()).sendTo(outputTable);
    };
    InMemorySystemDescriptor isd = new InMemorySystemDescriptor("test");
    InMemoryInputDescriptor<TestTableData.PageView> inputDescriptor = isd.getInputDescriptor("User", new NoOpSerde<>());
    TestRunner.of(app).addInputStream(inputDescriptor, users).run(Duration.ofSeconds(10));
    Bucket outputBucket = cluster.openBucket(outputBucketName);
    Assert.assertEquals("{\"name\":\"Alice\",\"age\":\"20\"}", outputBucket.get("Alice").content().toString());
    Assert.assertEquals("{\"name\":\"Bob\",\"age\":\"30\"}", outputBucket.get("Bob").content().toString());
    Assert.assertEquals("{\"name\":\"Chris\",\"age\":\"40\"}", outputBucket.get("Chris").content().toString());
    Assert.assertEquals("{\"name\":\"David\",\"age\":\"50\"}", outputBucket.get("David").content().toString());
    outputBucket.close();
}
Also used : CouchbaseTableWriteFunction(org.apache.samza.table.remote.couchbase.CouchbaseTableWriteFunction) Arrays(java.util.Arrays) InMemorySystemDescriptor(org.apache.samza.test.framework.system.descriptors.InMemorySystemDescriptor) CouchbaseEnvironment(com.couchbase.client.java.env.CouchbaseEnvironment) CouchbaseTableReadFunction(org.apache.samza.table.remote.couchbase.CouchbaseTableReadFunction) GenericInputDescriptor(org.apache.samza.system.descriptors.GenericInputDescriptor) JsonObject(com.couchbase.client.java.document.json.JsonObject) BucketConfiguration(com.couchbase.mock.BucketConfiguration) ArrayList(java.util.ArrayList) StringSerde(org.apache.samza.serializers.StringSerde) DefaultCouchbaseEnvironment(com.couchbase.client.java.env.DefaultCouchbaseEnvironment) InMemoryInputDescriptor(org.apache.samza.test.framework.system.descriptors.InMemoryInputDescriptor) CouchbaseMock(com.couchbase.mock.CouchbaseMock) DelegatingSystemDescriptor(org.apache.samza.system.descriptors.DelegatingSystemDescriptor) Duration(java.time.Duration) After(org.junit.After) NoOpTableReadFunction(org.apache.samza.table.remote.NoOpTableReadFunction) KV(org.apache.samza.operators.KV) NoOpSerde(org.apache.samza.serializers.NoOpSerde) Before(org.junit.Before) Table(org.apache.samza.table.Table) ByteArrayDocument(com.couchbase.client.java.document.ByteArrayDocument) StreamTableJoinFunction(org.apache.samza.operators.functions.StreamTableJoinFunction) Test(org.junit.Test) TestRunner(org.apache.samza.test.framework.TestRunner) Bucket(com.couchbase.client.java.Bucket) List(java.util.List) CouchbaseCluster(com.couchbase.client.java.CouchbaseCluster) Cluster(com.couchbase.client.java.Cluster) StreamApplication(org.apache.samza.application.StreamApplication) Assert(org.junit.Assert) RemoteTableDescriptor(org.apache.samza.table.descriptors.RemoteTableDescriptor) StringSerde(org.apache.samza.serializers.StringSerde) Table(org.apache.samza.table.Table) StreamApplication(org.apache.samza.application.StreamApplication) JsonObject(com.couchbase.client.java.document.json.JsonObject) RemoteTableDescriptor(org.apache.samza.table.descriptors.RemoteTableDescriptor) InMemorySystemDescriptor(org.apache.samza.test.framework.system.descriptors.InMemorySystemDescriptor) DelegatingSystemDescriptor(org.apache.samza.system.descriptors.DelegatingSystemDescriptor) NoOpTableReadFunction(org.apache.samza.table.remote.NoOpTableReadFunction) GenericInputDescriptor(org.apache.samza.system.descriptors.GenericInputDescriptor) Bucket(com.couchbase.client.java.Bucket) CouchbaseTableWriteFunction(org.apache.samza.table.remote.couchbase.CouchbaseTableWriteFunction) StreamTableJoinFunction(org.apache.samza.operators.functions.StreamTableJoinFunction) NoOpSerde(org.apache.samza.serializers.NoOpSerde) CouchbaseTableReadFunction(org.apache.samza.table.remote.couchbase.CouchbaseTableReadFunction) Test(org.junit.Test)

Example 5 with Table

use of org.apache.samza.table.Table in project samza by apache.

the class TestRemoteTableWithBatchEndToEnd method doTestStreamTableJoinRemoteTable.

private void doTestStreamTableJoinRemoteTable(String testName, boolean batchRead, boolean batchWrite) throws Exception {
    final InMemoryWriteFunction writer = new InMemoryWriteFunction(testName);
    BATCH_READS.put(testName, new AtomicInteger());
    BATCH_WRITES.put(testName, new AtomicInteger());
    WRITTEN_RECORDS.put(testName, new HashMap<>());
    int count = 16;
    int batchSize = 4;
    String profiles = Base64Serializer.serialize(generateProfiles(count));
    final RateLimiter readRateLimiter = mock(RateLimiter.class, withSettings().serializable());
    final RateLimiter writeRateLimiter = mock(RateLimiter.class, withSettings().serializable());
    final TableRateLimiter.CreditFunction creditFunction = (k, v, args) -> 1;
    final StreamApplication app = appDesc -> {
        RemoteTableDescriptor<Integer, Profile, Void> inputTableDesc = new RemoteTableDescriptor<>("profile-table-1");
        inputTableDesc.withReadFunction(InMemoryReadFunction.getInMemoryReadFunction(testName, profiles)).withRateLimiter(readRateLimiter, creditFunction, null);
        if (batchRead) {
            inputTableDesc.withBatchProvider(new CompactBatchProvider().withMaxBatchSize(batchSize).withMaxBatchDelay(Duration.ofHours(1)));
        }
        // dummy reader
        TableReadFunction readFn = new MyReadFunction();
        RemoteTableDescriptor<Integer, EnrichedPageView, EnrichedPageView> outputTableDesc = new RemoteTableDescriptor<>("enriched-page-view-table-1");
        outputTableDesc.withReadFunction(readFn).withWriteFunction(writer).withRateLimiter(writeRateLimiter, creditFunction, creditFunction);
        if (batchWrite) {
            outputTableDesc.withBatchProvider(new CompactBatchProvider().withMaxBatchSize(batchSize).withMaxBatchDelay(Duration.ofHours(1)));
        }
        Table outputTable = appDesc.getTable(outputTableDesc);
        Table<KV<Integer, Profile>> inputTable = appDesc.getTable(inputTableDesc);
        DelegatingSystemDescriptor ksd = new DelegatingSystemDescriptor("test");
        GenericInputDescriptor<PageView> isd = ksd.getInputDescriptor("PageView", new NoOpSerde<>());
        appDesc.getInputStream(isd).map(pv -> new KV<>(pv.getMemberId(), pv)).join(inputTable, new PageViewToProfileJoinFunction()).map(m -> new KV<>(m.getMemberId(), m)).sendTo(outputTable);
    };
    InMemorySystemDescriptor isd = new InMemorySystemDescriptor("test");
    InMemoryInputDescriptor<PageView> inputDescriptor = isd.getInputDescriptor("PageView", new NoOpSerde<>());
    TestRunner.of(app).addInputStream(inputDescriptor, Arrays.asList(generatePageViewsWithDistinctKeys(count))).addConfig("task.max.concurrency", String.valueOf(count)).addConfig("task.async.commit", String.valueOf(true)).run(Duration.ofSeconds(10));
    Assert.assertEquals(count, WRITTEN_RECORDS.get(testName).size());
    Assert.assertNotNull(WRITTEN_RECORDS.get(testName).get(0));
    if (batchWrite) {
        Assert.assertEquals(count / batchSize, BATCH_WRITES.get(testName).get());
    }
}
Also used : Arrays(java.util.Arrays) UpdateMessage(org.apache.samza.operators.UpdateMessage) InMemorySystemDescriptor(org.apache.samza.test.framework.system.descriptors.InMemorySystemDescriptor) ObjectInputStream(java.io.ObjectInputStream) HashMap(java.util.HashMap) CompletableFuture(java.util.concurrent.CompletableFuture) GenericInputDescriptor(org.apache.samza.system.descriptors.GenericInputDescriptor) Function(java.util.function.Function) TableReadFunction(org.apache.samza.table.remote.TableReadFunction) Base64Serializer(org.apache.samza.test.util.Base64Serializer) InMemoryInputDescriptor(org.apache.samza.test.framework.system.descriptors.InMemoryInputDescriptor) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) TestTableData(org.apache.samza.test.table.TestTableData) DelegatingSystemDescriptor(org.apache.samza.system.descriptors.DelegatingSystemDescriptor) Duration(java.time.Duration) Map(java.util.Map) TableWriteFunction(org.apache.samza.table.remote.TableWriteFunction) KV(org.apache.samza.operators.KV) NoOpSerde(org.apache.samza.serializers.NoOpSerde) Table(org.apache.samza.table.Table) Collection(java.util.Collection) BaseTableFunction(org.apache.samza.table.remote.BaseTableFunction) IOException(java.io.IOException) Test(org.junit.Test) Collectors(java.util.stream.Collectors) SamzaException(org.apache.samza.SamzaException) TestRunner(org.apache.samza.test.framework.TestRunner) Mockito(org.mockito.Mockito) Entry(org.apache.samza.storage.kv.Entry) RateLimiter(org.apache.samza.util.RateLimiter) UpdateOptions(org.apache.samza.operators.UpdateOptions) CompactBatchProvider(org.apache.samza.table.batching.CompactBatchProvider) StreamApplication(org.apache.samza.application.StreamApplication) Assert(org.junit.Assert) CompleteBatchProvider(org.apache.samza.table.batching.CompleteBatchProvider) RemoteTableDescriptor(org.apache.samza.table.descriptors.RemoteTableDescriptor) TableRateLimiter(org.apache.samza.table.remote.TableRateLimiter) TableReadFunction(org.apache.samza.table.remote.TableReadFunction) InMemorySystemDescriptor(org.apache.samza.test.framework.system.descriptors.InMemorySystemDescriptor) GenericInputDescriptor(org.apache.samza.system.descriptors.GenericInputDescriptor) Table(org.apache.samza.table.Table) StreamApplication(org.apache.samza.application.StreamApplication) RemoteTableDescriptor(org.apache.samza.table.descriptors.RemoteTableDescriptor) RateLimiter(org.apache.samza.util.RateLimiter) TableRateLimiter(org.apache.samza.table.remote.TableRateLimiter) TableRateLimiter(org.apache.samza.table.remote.TableRateLimiter) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) DelegatingSystemDescriptor(org.apache.samza.system.descriptors.DelegatingSystemDescriptor) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) NoOpSerde(org.apache.samza.serializers.NoOpSerde) CompactBatchProvider(org.apache.samza.table.batching.CompactBatchProvider)

Aggregations

Table (org.apache.samza.table.Table)19 KV (org.apache.samza.operators.KV)17 Map (java.util.Map)13 TableDescriptor (org.apache.samza.table.descriptors.TableDescriptor)12 HashMap (java.util.HashMap)11 SamzaException (org.apache.samza.SamzaException)11 NoOpSerde (org.apache.samza.serializers.NoOpSerde)11 Test (org.junit.Test)11 Duration (java.time.Duration)10 ArrayList (java.util.ArrayList)10 List (java.util.List)10 Collectors (java.util.stream.Collectors)10 DelegatingSystemDescriptor (org.apache.samza.system.descriptors.DelegatingSystemDescriptor)10 GenericInputDescriptor (org.apache.samza.system.descriptors.GenericInputDescriptor)10 Assert (org.junit.Assert)10 Arrays (java.util.Arrays)9 StreamApplication (org.apache.samza.application.StreamApplication)9 TestRunner (org.apache.samza.test.framework.TestRunner)9 InMemoryInputDescriptor (org.apache.samza.test.framework.system.descriptors.InMemoryInputDescriptor)9 InMemorySystemDescriptor (org.apache.samza.test.framework.system.descriptors.InMemorySystemDescriptor)9