Search in sources :

Example 1 with SamzaMetricsContainer

use of org.apache.beam.runners.samza.metrics.SamzaMetricsContainer in project beam by apache.

the class UnboundedSourceSystemTest method createConsumer.

private static UnboundedSourceSystem.Consumer<String, TestCheckpointMark> createConsumer(TestUnboundedSource<String> source, int splitNum) {
    SamzaPipelineOptions pipelineOptions = PipelineOptionsFactory.as(SamzaPipelineOptions.class);
    // emit immediately
    pipelineOptions.setWatermarkInterval(0L);
    pipelineOptions.setMaxSourceParallelism(splitNum);
    return new UnboundedSourceSystem.Consumer<>(source, pipelineOptions, new SamzaMetricsContainer(new MetricsRegistryMap()), "test-step");
}
Also used : SystemConsumer(org.apache.samza.system.SystemConsumer) SamzaMetricsContainer(org.apache.beam.runners.samza.metrics.SamzaMetricsContainer) MetricsRegistryMap(org.apache.samza.metrics.MetricsRegistryMap) SamzaPipelineOptions(org.apache.beam.runners.samza.SamzaPipelineOptions)

Example 2 with SamzaMetricsContainer

use of org.apache.beam.runners.samza.metrics.SamzaMetricsContainer in project beam by apache.

the class BoundedSourceSystemTest method createConsumer.

private static BoundedSourceSystem.Consumer<String> createConsumer(BoundedSource<String> source, int splitNum) {
    SamzaPipelineOptions pipelineOptions = PipelineOptionsFactory.as(SamzaPipelineOptions.class);
    pipelineOptions.setMaxSourceParallelism(splitNum);
    return new BoundedSourceSystem.Consumer<>(source, pipelineOptions, new SamzaMetricsContainer(new MetricsRegistryMap()), "test-step");
}
Also used : SystemConsumer(org.apache.samza.system.SystemConsumer) SamzaMetricsContainer(org.apache.beam.runners.samza.metrics.SamzaMetricsContainer) MetricsRegistryMap(org.apache.samza.metrics.MetricsRegistryMap) SamzaPipelineOptions(org.apache.beam.runners.samza.SamzaPipelineOptions)

Aggregations

SamzaPipelineOptions (org.apache.beam.runners.samza.SamzaPipelineOptions)2 SamzaMetricsContainer (org.apache.beam.runners.samza.metrics.SamzaMetricsContainer)2 MetricsRegistryMap (org.apache.samza.metrics.MetricsRegistryMap)2 SystemConsumer (org.apache.samza.system.SystemConsumer)2