[
https://issues.apache.org/jira/browse/GOBBLIN-1934?focusedWorklogId=887058&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-887058
]
ASF GitHub Bot logged work on GOBBLIN-1934:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 24/Oct/23 18:28
Start Date: 24/Oct/23 18:28
Worklog Time Spent: 10m
Work Description: phet commented on code in PR #3805:
URL: https://github.com/apache/gobblin/pull/3805#discussion_r1370655818
##########
gobblin-service/src/main/java/org/apache/gobblin/service/monitoring/DagActionStoreChangeMonitor.java:
##########
@@ -29,12 +29,12 @@
import com.typesafe.config.Config;
import com.typesafe.config.ConfigValueFactory;
+import java.util.concurrent.atomic.AtomicIntegerArray;
Review Comment:
also looks unused
##########
gobblin-service/src/main/java/org/apache/gobblin/service/monitoring/DagActionStoreChangeMonitor.java:
##########
@@ -217,7 +217,16 @@ protected void submitFlowToDagManagerHelper(String
flowGroup, String flowName) {
@Override
protected void createMetrics() {
- super.messagesRead =
this.getMetricContext().counter(ServiceMetricNames.GOBBLIN_SERVICE_PREFIX +
RuntimeMetrics.GOBBLIN_KAFKA_HIGH_LEVEL_CONSUMER_MESSAGES_READ);
+ super.messagesRead =
this.getMetricContext().counter(RuntimeMetrics.DAG_ACTION_STORE_MONITOR_PREFIX
+ "." + RuntimeMetrics.GOBBLIN_KAFKA_HIGH_LEVEL_CONSUMER_MESSAGES_READ);
+ super.queueSizeGauges = new ContextAwareGauge[super.numThreads];
+ for (int i=0; i < numThreads; i++) {
+ // An 'effectively' final variable is needed inside the lambda
expression below
+ int finalI = i;
+ this.queueSizeGauges[i] = this.getMetricContext().newContextAwareGauge(
+ RuntimeMetrics.GOBBLIN_KAFKA_HIGH_LEVEL_CONSUMER_QUEUE_SIZE_PREFIX +
"-" + i,
+ () -> super.queues[finalI].size());
+ }
Review Comment:
this may not be clicking for me... but why can't this all be replaced by
`super.createMetrics()`?
##########
gobblin-runtime/src/main/java/org/apache/gobblin/runtime/kafka/HighLevelConsumer.java:
##########
@@ -197,6 +200,14 @@ protected void shutdownMetrics() throws IOException {
*/
protected void createMetrics() {
this.messagesRead =
this.metricContext.counter(RuntimeMetrics.GOBBLIN_KAFKA_HIGH_LEVEL_CONSUMER_MESSAGES_READ);
+ this.queueSizeGauges = new ContextAwareGauge[numThreads];
+ for (int i=0; i < numThreads; i++) {
Review Comment:
I forget... don't we need spaces in `i = 0`?
##########
gobblin-runtime/src/main/java/org/apache/gobblin/runtime/kafka/HighLevelConsumer.java:
##########
@@ -32,6 +32,7 @@
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
+import java.util.concurrent.atomic.AtomicIntegerArray;
Review Comment:
unused now?
Issue Time Tracking
-------------------
Worklog Id: (was: 887058)
Time Spent: 1h 20m (was: 1h 10m)
> Monitor High Level Consumer queue size
> --------------------------------------
>
> Key: GOBBLIN-1934
> URL: https://issues.apache.org/jira/browse/GOBBLIN-1934
> Project: Apache Gobblin
> Issue Type: Improvement
> Components: gobblin-service
> Reporter: Urmi Mustafi
> Assignee: Abhishek Tiwari
> Priority: Major
> Time Spent: 1h 20m
> Remaining Estimate: 0h
>
> We suspect that the HighLevelConsumer class may be dropping Kafka messages if
> the thread for a particular consumption queue is interrupted or stalled.
> Before changing how these queues are handled, we want to verify that blocked
> or dropped queues is the reason for missed messages by emitting metrics about
> each queue's size.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)