[ https://issues.apache.org/jira/browse/HIVE-21740?focusedWorklogId=245428&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-245428 ]
ASF GitHub Bot logged work on HIVE-21740: ----------------------------------------- Author: ASF GitHub Bot Created on: 20/May/19 18:34 Start Date: 20/May/19 18:34 Worklog Time Spent: 10m Work Description: odraese commented on pull request #633: HIVE-21740: Collect LLAP execution latency metrics URL: https://github.com/apache/hive/pull/633#discussion_r285709679 ########## File path: llap-tez/src/java/org/apache/hadoop/hive/llap/tezplugins/LlapTaskSchedulerService.java ########## @@ -3154,4 +3165,28 @@ public void taskInfoUpdated(TezTaskAttemptID attemptId, boolean isGuaranteed) { + attemptId + ", " + newState); sendUpdateMessageAsync(ti, newState); } + + private void updateMetrics(TaskAttemptImpl taskAttempt) { + // Only do it for map tasks + if (!isMapTask(taskAttempt)) { + return; + } + // Check if this task was already assigned to a node + NodeInfo nodeInfo = knownTasks.get(taskAttempt).assignedNode; + if (nodeInfo == null) { + return; + } + + metrics.addTaskLatency(nodeInfo.shortStringBase, taskAttempt.getFinishTime() - taskAttempt.getLaunchTime()); + } + + private boolean isMapTask(TaskAttemptImpl taskAttempt) { + boolean isMapTask = false; + for(TezCounter counter : taskAttempt.getCounters().getGroup("HIVE")) { + if(counter.getName().startsWith("RECORDS_IN_Map")) { + isMapTask = true; Review comment: ....and if you prefer to iterate the group, you should break here instead of comparing all counters to the end. ---------------------------------------------------------------- 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: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 245428) Time Spent: 50m (was: 40m) > Collect LLAP execution latency metrics > -------------------------------------- > > Key: HIVE-21740 > URL: https://issues.apache.org/jira/browse/HIVE-21740 > Project: Hive > Issue Type: New Feature > Reporter: Peter Vary > Assignee: Peter Vary > Priority: Major > Labels: pull-request-available > Attachments: HIVE-21740.2.patch, HIVE-21740.patch > > Time Spent: 50m > Remaining Estimate: 0h > > Collect metrics for LLAP task execution times -- This message was sent by Atlassian JIRA (v7.6.3#76005)