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

Hitesh Shah commented on TEZ-2392:
----------------------------------

Not sure I understand this change: 

{code}
boolean hasNext = recordReader.next(key, value);
 if (hasNext) {
      inputRecordCounter.increment(1);  
 } else {
      hasCompletedProcessing();
      completedProcessing = true;
 }
{code}

Why is the hasCompletedProcessing check being done after calling 
"recordReader.next()" ? Shouldn't be called before? i.e. 

{code} 
hasCompletedProcessing();
boolean hasNext = recordReader.next(key, value);
 if (hasNext) {
      inputRecordCounter.increment(1);  
 } else {
      completedProcessing = true;
 }
{code}


> Have all readers throw an Exception on incorrect next() usage
> -------------------------------------------------------------
>
>                 Key: TEZ-2392
>                 URL: https://issues.apache.org/jira/browse/TEZ-2392
>             Project: Apache Tez
>          Issue Type: Improvement
>            Reporter: Siddharth Seth
>            Assignee: Rajesh Balamohan
>            Priority: Critical
>         Attachments: TEZ-2392.1.patch, TEZ-2392.2.patch
>
>
> Follow up from TEZ-2348.
> Marking as critical since this is a behaviour change, and we should get it in 
> early.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to