You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@gobblin.apache.org by GitBox <gi...@apache.org> on 2021/04/15 17:56:01 UTC

[GitHub] [gobblin] vikrambohra commented on a change in pull request #3259: [GOBBLIN-1423] Add config to Event reporter to control queue capacity…

vikrambohra commented on a change in pull request #3259:
URL: https://github.com/apache/gobblin/pull/3259#discussion_r614242250



##########
File path: gobblin-metrics-libs/gobblin-metrics-base/src/main/java/org/apache/gobblin/metrics/reporter/EventReporter.java
##########
@@ -189,13 +212,20 @@ public void run() {
     protected MetricFilter filter;
     protected TimeUnit rateUnit;
     protected TimeUnit durationUnit;
+    protected Config config;
 
     protected Builder(MetricContext context) {
       this.context = context;
       this.name = "MetricReportReporter";
       this.rateUnit = TimeUnit.SECONDS;
       this.durationUnit = TimeUnit.MILLISECONDS;
       this.filter = MetricFilter.ALL;
+      this.config = ConfigFactory.empty();
+    }
+
+    public T withConfig(Config config) {

Review comment:
       That's an option, however we call builder.withConfig at 4 places in KafkaReportingFormats.java that means we will have to parse and set queue capacity and timeout at 4 places (and more for future requests).
   The config keys and fallback logic to queue capacity and timeout should be contained in EventReporter IMO




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org