arjun4084346 commented on a change in pull request #3351:
URL: https://github.com/apache/gobblin/pull/3351#discussion_r694422827
##########
File path:
gobblin-service/src/main/java/org/apache/gobblin/service/monitoring/KafkaAvroJobStatusMonitor.java
##########
@@ -165,6 +179,30 @@ public GobblinTrackingEvent
deserializeEvent(DecodeableKafkaRecord<byte[],byte[]
break;
case TimingEvent.JOB_COMPLETION_PERCENTAGE:
properties.put(TimingEvent.JOB_LAST_PROGRESS_EVENT_TIME,
properties.getProperty(TimingEvent.METADATA_END_TIME));
+ break;
+ case JobEvent.WORK_UNITS_CREATED:
+ Long numWorkUnits =
Long.parseLong(properties.getProperty(CountEventBuilder.COUNT_KEY));
+ String workUnitCountName =
MetricRegistry.name(ServiceMetricNames.GOBBLIN_SERVICE_PREFIX,
+
properties.getProperty(TimingEvent.FlowEventConstants.FLOW_GROUP_FIELD),
+
properties.getProperty(TimingEvent.FlowEventConstants.FLOW_NAME_FIELD),
+ JobEvent.WORK_UNITS_CREATED);
+
+ MetricFilter filter = new MetricFilter() {
+ @Override public boolean matches(String name, Metric metric) {
+ return name.equals(workUnitCountName);
+ }
+ };
+ SortedMap<String, Gauge> existingGauges =
this.getMetricContext().getGauges(filter);
Review comment:
*nit
SortedMap<String, Gauge> existingGauges =
this.getMetricContext().getGauges((name, metric) ->
name.equals(workUnitCountName));
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]