Uploaded image for project: 'Pig'
  1. Pig
  2. PIG-937

Task get stuck in BasicTable's BTScaner's atEnd() method

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.7.0
    • None
    • None

    Description

      It seems is caused by the infinite loop in the code:
      BasicTable, Line 698

              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;
                }
              }
      

      I think it's fine to just use a for loop here, like:

              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;
                }
              }
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              he yongqiang He Yongqiang
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: