Search in sources :

Example 1 with NullMetricsFactory

use of software.amazon.kinesis.metrics.NullMetricsFactory in project aws-glue-schema-registry by awslabs.

the class GlueSchemaRegistryKinesisIntegrationTest method startConsumingWithKCL.

private Scheduler startConsumingWithKCL(GlueSchemaRegistryConfiguration gsrConfig, RecordProcessor recordProcessor) throws InterruptedException {
    GlueSchemaRegistryRecordProcessorFactory glueSchemaRegistryRecordProcessorFactory = new GlueSchemaRegistryRecordProcessorFactory(recordProcessor, glueSchemaRegistryDeserializerFactory, gsrConfig);
    ConfigsBuilder configsBuilder = new ConfigsBuilder(streamName, streamName, kinesisClient, dynamoClient, cloudWatchClient, streamName, glueSchemaRegistryRecordProcessorFactory);
    RetrievalConfig retrievalConfig = configsBuilder.retrievalConfig().retrievalSpecificConfig(new PollingConfig(streamName, kinesisClient));
    Scheduler scheduler = new Scheduler(configsBuilder.checkpointConfig(), configsBuilder.coordinatorConfig(), configsBuilder.leaseManagementConfig(), configsBuilder.lifecycleConfig(), configsBuilder.metricsConfig().metricsFactory(new NullMetricsFactory()), configsBuilder.processorConfig(), retrievalConfig);
    new Thread(scheduler).start();
    TimeUnit.SECONDS.sleep(KCL_SCHEDULER_START_UP_WAIT_TIME_SECONDS);
    return scheduler;
}
Also used : NullMetricsFactory(software.amazon.kinesis.metrics.NullMetricsFactory) ConfigsBuilder(software.amazon.kinesis.common.ConfigsBuilder) Scheduler(software.amazon.kinesis.coordinator.Scheduler) RetrievalConfig(software.amazon.kinesis.retrieval.RetrievalConfig) PollingConfig(software.amazon.kinesis.retrieval.polling.PollingConfig)

Aggregations

ConfigsBuilder (software.amazon.kinesis.common.ConfigsBuilder)1 Scheduler (software.amazon.kinesis.coordinator.Scheduler)1 NullMetricsFactory (software.amazon.kinesis.metrics.NullMetricsFactory)1 RetrievalConfig (software.amazon.kinesis.retrieval.RetrievalConfig)1 PollingConfig (software.amazon.kinesis.retrieval.polling.PollingConfig)1