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

Rollback PIG-3060

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.12.1
    • Component/s: impl
    • Labels:
      None

      Description

      Will result missing records in some cases. One case is when we have two flatten in a single pipeline, when the first flatten still hold some records, the second flatten cannot return EOP just because an empty bag. Here is the test script:

      a = load '1.txt' as (bag1:bag{(t:int)});
      b = foreach a generate flatten(bag1) as field1;
      c = foreach b generate flatten(GenBag(field1));
      dump c;
      

      GenBag:

      public class GenBag extends EvalFunc<DataBag> {
              @Override
              public DataBag exec(Tuple input) throws IOException {
                  Integer content = (Integer)input.get(0);
                  DataBag bag = BagFactory.getInstance().newDefaultBag();
      
                  if (content > 10) {
                      Tuple t = TupleFactory.getInstance().newTuple();
                      t.append(content);
                      bag.add(t);
                  }
                  return bag;
              }
          }
      

      Input:

      {(1),(12),(9)}
      {(15),(2)}
      

      The test case in PIG-3060 fails if rollback, need to fix it when rollback.

        Attachments

        1. PIG-3570-1.patch
          3 kB
          Jianyong Dai

          Issue Links

            Activity

              People

              • Assignee:
                daijy Jianyong Dai
                Reporter:
                daijy Jianyong Dai
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: