hadoop-pig-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yan Zhou (JIRA)" <j...@apache.org>
Subject [jira] Commented: (PIG-937) Task get stuck in BasicTable's BTScaner's atEnd() method
Date Sun, 30 Aug 2009 22:11:32 GMT

    [ https://issues.apache.org/jira/browse/PIG-937?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12749335#action_12749335
] 

Yan Zhou commented on PIG-937:
------------------------------

This bug has been fixed in a patch (see https://issues.apache.org/jira/browse/PIG-918) pretty
much along the same line as suggested.

> Task get stuck in BasicTable's BTScaner's atEnd() method
> --------------------------------------------------------
>
>                 Key: PIG-937
>                 URL: https://issues.apache.org/jira/browse/PIG-937
>             Project: Pig
>          Issue Type: Bug
>            Reporter: He Yongqiang
>
> It seems is caused by the infinite loop in the code:
> BasicTable, Line 698
> {noformat}
>         while (true)
>         {
>           int index = random.nextInt(cgScanners.length - 1) + 1;
>           if (cgScanners[index] != null) {
>             if (cgScanners[index].atEnd() != ret) {
>               throw new IOException(
>                   "atEnd() failed: Column Groups are not evenly positioned.");
>             }
>             break;
>           }
>         }
> {noformat}
> I think it's fine to just use a for loop here, like:
> {noformat}
>         for (int index = 0; index < cgScanners.length; index++) {
>           if (cgScanners[index] != null) {
>             if (cgScanners[index].atEnd() != ret) {
>               throw new IOException(
>                   "atEnd() failed: Column Groups are not evenly positioned.");
>             }
>             break;
>           }
>         }
> {noformat}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message