Skip to content

Commit

Permalink
[GOBBLIN-347] Ensure KafkaPusher is registered with the closer
Browse files Browse the repository at this point in the history
Closes #2206 from beeramsunitha/master
  • Loading branch information
sunithabeeram authored and htran1 committed Dec 14, 2017
1 parent 1fbe700 commit 9a05b70
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ public KafkaEventReporter(Builder<?> builder) throws IOException {
String pusherClassName = builder.pusherClassName.or(PusherUtils.DEFAULT_KAFKA_PUSHER_CLASS_NAME);
this.kafkaPusher = PusherUtils.getPusher(pusherClassName, builder.brokers, builder.topic, builder.config);
}
this.closer.register(this.kafkaPusher);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ protected KafkaReporter(Builder<?> builder, Config config) throws IOException {

this.kafkaPusher = PusherUtils.getPusher(pusherClassName, builder.brokers, builder.topic, Optional.of(kafkaConfig));
}
this.closer.register(this.kafkaPusher);
}

protected AvroSerializer<MetricReport> createSerializer(SchemaVersionWriter schemaVersionWriter) throws IOException {
Expand Down

0 comments on commit 9a05b70

Please sign in to comment.