mqliang commented on a change in pull request #7099:
URL: https://github.com/apache/incubator-pinot/pull/7099#discussion_r660987487
##########
File path:
pinot-minion/src/main/java/org/apache/pinot/minion/taskfactory/TaskFactoryRegistry.java
##########
@@ -67,19 +71,31 @@ public TaskFactoryRegistry(TaskExecutorFactoryRegistry
taskExecutorFactoryRegist
private final TaskConfig _taskConfig = context.getTaskConfig();
private final PinotTaskExecutor _taskExecutor =
taskExecutorFactory.create();
private final MinionEventObserver _eventObserver =
eventObserverFactory.create();
+ private final MinionMetrics _minionMetrics =
MinionContext.getInstance().getMinionMetrics();
@Override
public TaskResult run() {
- MinionMetrics minionMetrics =
MinionContext.getInstance().getMinionMetrics();
+ HelixManager helixManager = context.getManager();
+ JobContext jobContext = TaskDriver.getJobContext(helixManager,
context.getJobConfig().getJobId());
+ // jobContext.getStartTime() return the time in milliseconds of
job being put into helix queue.
+ long jobInQueueTime = jobContext.getStartTime();
+ long jobDequeueTime = System.currentTimeMillis();
+ _minionMetrics.addPhaseTiming(taskType,
MinionQueryPhase.TASK_QUEUEING, jobDequeueTime - jobInQueueTime);
Review comment:
helix set the job start time in milliseconds. So if we wanner unify the
the granularity, the only option is change the granularity of TASK_EXECUTION as
milliseconds.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]