phet commented on code in PR #3805:
URL: https://github.com/apache/gobblin/pull/3805#discussion_r1370689487
##########
gobblin-service/src/main/java/org/apache/gobblin/service/monitoring/DagActionStoreChangeMonitor.java:
##########
@@ -219,10 +218,11 @@ protected void submitFlowToDagManagerHelper(String
flowGroup, String flowName) {
protected void createMetrics() {
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++) {
+ 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.DAG_ACTION_STORE_MONITOR_PREFIX + "." +
Review Comment:
couldn't we just define a method:
```
protected String getMetricsPrefix()
```
and have `super.createMetrics()` call that to make this minor adjustment,
rather than basically copying and pasting the def w/ only a slight change?
##########
gobblin-runtime/src/main/java/org/apache/gobblin/runtime/kafka/HighLevelConsumer.java:
##########
@@ -130,7 +129,7 @@ public HighLevelConsumer(String topic, Config config, int
numThreads) {
this.consumerExecutor =
Executors.newSingleThreadScheduledExecutor(ExecutorsUtils.newThreadFactory(Optional.of(log),
Optional.of("HighLevelConsumerThread")));
this.queueExecutor = Executors.newFixedThreadPool(this.numThreads,
ExecutorsUtils.newThreadFactory(Optional.of(log),
Optional.of("QueueProcessor-%d")));
this.queues = new LinkedBlockingQueue[numThreads];
- for(int i=0; i<queues.length; i++) {
+ for(int i = 0; i<queues.length; i++) {
Review Comment:
now we have spaces issue w/ `i < queues.length`
--
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]