You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2021/01/28 23:13:24 UTC

[GitHub] [incubator-pinot] jackjlli commented on a change in pull request #6502: Adding cron scheduler metrics reporting

jackjlli commented on a change in pull request #6502:
URL: https://github.com/apache/incubator-pinot/pull/6502#discussion_r566470241



##########
File path: pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/minion/PinotTaskManager.java
##########
@@ -220,6 +218,8 @@ private void updateCronTaskScheduler(String tableWithType, Map<String, String> t
         if (!taskToCronExpressionMap.containsKey(existingTaskType)) {
           try {
             _scheduledExecutorService.deleteJob(JobKey.jobKey(tableWithType, existingTaskType));
+            _controllerMetrics.addMeteredTableValue(getCronJobName(tableWithType, existingTaskType),
+                ControllerMeter.CRON_SCHEDULER_JOB_SCHEDULED, -11L);

Review comment:
       What's the meaning of `-11L` here?

##########
File path: pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/minion/CronJobScheduleJob.java
##########
@@ -42,11 +45,17 @@ public void execute(JobExecutionContext jobExecutionContext)
             .get(PinotTaskManager.LEAD_CONTROLLER_MANAGER_KEY);
     String table = jobExecutionContext.getJobDetail().getKey().getName();
     String taskType = jobExecutionContext.getJobDetail().getKey().getGroup();
+    pinotTaskManager.getControllerMetrics().addMeteredTableValue(PinotTaskManager.getCronJobName(table, taskType),
+        ControllerMeter.CRON_SCHEDULER_JOB_TRIGGERED, 1);

Review comment:
       nit: use `1L` here

##########
File path: pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/minion/PinotTaskManager.java
##########
@@ -290,6 +290,9 @@ private void scheduleJob(String tableWithType, String taskType, String cronExprS
               .build();
       try {
         _scheduledExecutorService.scheduleJob(jobDetail, trigger);
+        _controllerMetrics

Review comment:
       Might be good to log a message here?




----------------------------------------------------------------
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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org