[ 
https://issues.apache.org/jira/browse/PIG-937?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Daniel Dai closed PIG-937.
--------------------------


> 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
>             Fix For: 0.7.0
>
>
> 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.

Reply via email to