Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
  • Loading branch information
adithyachakilam committed Nov 12, 2024
1 parent a255269 commit 795b086
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -207,16 +207,16 @@ protected void possiblyResetDataSourceMetadata(
}

@Override
public void scheduleIOTimeReporting(RecordSupplier recordSupplier, ServiceEmitter emitter)
public void scheduleNonIOTimeReporting(RecordSupplier recordSupplier, ServiceEmitter emitter)
{
Execs.scheduledSingleThreaded("KafkaIOTimeReporter-%d")
.scheduleAtFixedRate(() -> reportIOTime(recordSupplier, emitter), 1, 1, TimeUnit.MINUTES);
Execs.scheduledSingleThreaded("KafkaNonIOTimeReporter-%d")
.scheduleAtFixedRate(() -> reportNonIOTimePct(recordSupplier, emitter), 1, 1, TimeUnit.MINUTES);
}

private void reportIOTime(RecordSupplier recordSupplier, ServiceEmitter emitter) {
private void reportNonIOTimePct(RecordSupplier recordSupplier, ServiceEmitter emitter) {
double result = recordSupplier.pctIOTimeSpent();
if (result > 0) {
task.emitMetric(emitter, "kafka/io/time/pct", result);
task.emitMetric(emitter, "time/non-io/pct", 100.0 * (1 - result));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ private TaskStatus runInternal(TaskToolbox toolbox) throws Exception
toolbox.getDataSegmentServerAnnouncer().announce();
toolbox.getDruidNodeAnnouncer().announce(discoveryDruidNode);
}
scheduleIOTimeReporting(recordSupplier, toolbox.getEmitter());
scheduleNonIOTimeReporting(recordSupplier, toolbox.getEmitter());
appenderator = task.newAppenderator(toolbox, segmentGenerationMetrics, rowIngestionMeters, parseExceptionHandler);
driver = task.newDriver(appenderator, toolbox, segmentGenerationMetrics);

Expand Down Expand Up @@ -2020,7 +2020,7 @@ protected abstract void possiblyResetDataSourceMetadata(
throw new UnsupportedOperationException("Method not supported");
}

public void scheduleIOTimeReporting(RecordSupplier recordSupplier, ServiceEmitter emitter)
public void scheduleNonIOTimeReporting(RecordSupplier recordSupplier, ServiceEmitter emitter)
{
log.debug("No IO time reporting configured");
}
Expand Down

0 comments on commit 795b086

Please sign in to comment.