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

PigStats.isSuccessful returns false if embedded pig script has dump

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.9.0
    • 0.9.2, 0.10.0
    • None
    • None
    • Reviewed

    Description

      The below is my python script,

      #! /usr/bin/python
      from  org.apache.pig.scripting import Pig
      
      P = Pig.compileFromFile("""a.pig""")
      result = P.bind().runSingle()
      
      if result.isSuccessful():
          print 'Pig job succeeded'
      else:
          print 'Pig job failed'
      

      The below is the pig script embedded (a.pig)
      A = LOAD 'a1' USING PigStorage(',') AS (f1:chararray,f2:chararray);
      B = GROUP A by f1;
      dump B;

      For this script execution, even though the job is successful the output printed is 'Pig job failed'
      This is because result.isSuccessful() is returning false whenever the pig script is having a dump statement.

      If i run the pig script alone, then the error code returned is proper.

      Attachments

        1. PIG-2291-2.patch
          5 kB
          Daniel Dai
        2. PIG-2291.patch
          4 kB
          xuting zhao

        Activity

          People

            xutingz xuting zhao
            vivekp Vivek Padmanabhan
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: