[ 
https://issues.apache.org/jira/browse/TEZ-3810?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16290112#comment-16290112
 ] 

Zhiyuan Yang commented on TEZ-3810:
-----------------------------------

I think this may be not necessary
{code}
} else if (idleStartTime != 0) {
        shuffleIdleTime.increment(Time.monotonicNow() - idleStartTime);
        idleStartTime = 0;
      }
{code}
since number of fetchers won't increase within this loop anyway.
{code}
while ((runningFetchers.size() >= numFetchers || pendingHosts.isEmpty())
              && numCompletedInputs.get() < numInputs) {
{code}

Also the test make this counter look like a timestamp, although the code works.
{code}
long startTime = 
inputContext.getCounters().findCounter(TaskCounter.SHUFFLE_IDLE_TIME).getValue();
long endTime = 
inputContext.getCounters().findCounter(TaskCounter.SHUFFLE_IDLE_TIME).getValue();
assertTrue("ShuffleIdleTime counter was: "+ (endTime - startTime) + "ms", 
endTime - startTime >= 5000);
{code}

> TezCounter for idle time in shuffle phase
> -----------------------------------------
>
>                 Key: TEZ-3810
>                 URL: https://issues.apache.org/jira/browse/TEZ-3810
>             Project: Apache Tez
>          Issue Type: Improvement
>            Reporter: Ashwin Ramesh
>         Attachments: TEZ-3810-001.patch, TEZ-3810.002.patch, 
> TEZ-3810.003.patch, TEZ-3810.004.patch
>
>
>  A task attempt counter that tracks how much time was spent waiting for 
> inputs in the shuffle phase. We can use this to quickly identify jobs that 
> are wasting a lot of time on the grid with idle reducer tasks instead of 
> shuffling/merging.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to