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

Jonathan Eagles commented on TEZ-3723:
--------------------------------------

Couple of minor things I noticed this time around.

# This might be better as nextLong() as assignment is to long
{code}
long rawLen = ThreadLocalRandom.current().nextInt(100, 200);
{code}

# This might be better as _*continue*_ to reflect and ensure new behavior 
unless you are trying to ensure the old behavior is still correct.
{code}
if (i % 2  == 0 || allEmptyPartitions) {
  rawLen = 6; //indicates empty partition
}
{code}

> TezIndexRecord#hasData() returns true for empty index record in the Unordered 
> case
> ----------------------------------------------------------------------------------
>
>                 Key: TEZ-3723
>                 URL: https://issues.apache.org/jira/browse/TEZ-3723
>             Project: Apache Tez
>          Issue Type: Bug
>            Reporter: Kuhu Shukla
>            Assignee: Kuhu Shukla
>         Attachments: TEZ-3723.001.patch, TEZ-3723.002.patch, 
> TEZ-3723.003.patch
>
>
> In the case of Unordered writer, use of {{hasData()}} returns true for empty 
> partitions since the rawlength is zero (as writer skips writing them out 
> altogether) and the check in hasData will fail as {{rawlength == 
> header.length +2}} fails.
> This currently works for the ordered case(and the method is used here unlike 
> in unordered writer) but after TEZ-3605, it will fail for both scenarios. 
> Even if we don't use the method, the logic should be fixed.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to