List<String> keys = Splitter.on(",").omitEmptyStrings().trimResults() .splitToList(properties.getProperty(ConfigurationKeys.METRICS_REPORTING_EVENTS_KAFKAPUSHERKEYS)); kafkaAvroEventKeyValueReporterBuilder.withKeys(keys); kafkaAvroEventKeyValueReporterBuilder.withSchemaRegistry(new KafkaAvroSchemaRegistry(properties));
public T withSchemaRegistry(KafkaAvroSchemaRegistry registry) { this.registry = Optional.of(registry); return self(); }
@Override public KafkaEventReporter.Builder<? extends KafkaEventReporter.Builder> getBuilder(MetricContext context, Pusher pusher) { KafkaAvroEventKeyValueReporter.Builder<?> builder = KafkaAvroEventKeyValueReporter.Factory.forContext(context); return builder.withKafkaPusher(pusher).withKeys(Lists.newArrayList("k1", "k2", "k3")); }