use of org.apache.beam.sdk.extensions.sql.impl.BeamTableStatistics in project beam by apache.
the class BeamKafkaTableStatisticsTest method testOrderedArrivalMultiplePartitionsRate.
@Test
public void testOrderedArrivalMultiplePartitionsRate() {
KafkaTestTable table = testTable(3);
for (int i = 0; i < 100; i++) {
table.addRecord(createKafkaTestRecord("k" + i, i, 500L * i));
}
BeamTableStatistics stats = table.getTableStatistics(null);
Assert.assertEquals(2d, stats.getRate(), 0.001);
}
Aggregations