Pig
  1. Pig
  2. PIG-224

Streaming returns -127 on regardless of the error code

    Details

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

      Description

      If streaming application fails with any error code, the return seen via UI is always -127.

        Activity

        Olga Natkovich created issue -
        Hide
        Olga Natkovich added a comment -

        Sample python script:

        #!/usr/bin/python

        import sys
        import optparse

        def main():
        p = optparse.OptionParser()
        p.add_option('--upper', '-u', action="store_true")
        options, arguments = p.parse_args()

        sys.exit(-3)

        line = sys.stdin.readline()
        while line:
        if options.upper == True:
        line = line.upper()
        sys.stdout.write(line)
        line = sys.stdin.readline()

        if _name_ == '_main_':
        main()

        Pig script:
        define X `MyStreamAppExitBefore.py` ship('MyStreamAppExitBefore.py') stderr('error_handling_1');
        A = load ':studenttab10k';
        B = stream A through X;
        store B into 'error_handling_1';

        Show
        Olga Natkovich added a comment - Sample python script: #!/usr/bin/python import sys import optparse def main(): p = optparse.OptionParser() p.add_option('--upper', '-u', action="store_true") options, arguments = p.parse_args() sys.exit(-3) line = sys.stdin.readline() while line: if options.upper == True: line = line.upper() sys.stdout.write(line) line = sys.stdin.readline() if _ name _ == '_ main _': main() Pig script: define X `MyStreamAppExitBefore.py` ship('MyStreamAppExitBefore.py') stderr('error_handling_1'); A = load ':studenttab10k'; B = stream A through X; store B into 'error_handling_1';
        Hide
        Arun C Murthy added a comment -

        Straight-forward to fix to get the exit code in the 'finally' block in ExecutableManager.close().

        Show
        Arun C Murthy added a comment - Straight-forward to fix to get the exit code in the 'finally' block in ExecutableManager.close().
        Arun C Murthy made changes -
        Field Original Value New Value
        Attachment PIG-224_0_20080429.patch [ 12381130 ]
        Arun C Murthy made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Hide
        Olga Natkovich added a comment -

        +1 on the code change. Running tests now. WIll commit once testing is done

        Show
        Olga Natkovich added a comment - +1 on the code change. Running tests now. WIll commit once testing is done
        Hide
        Olga Natkovich added a comment -

        patch committed, thanks arun

        Show
        Olga Natkovich added a comment - patch committed, thanks arun
        Olga Natkovich made changes -
        Resolution Fixed [ 1 ]
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Olga Natkovich made changes -
        Fix Version/s 0.1.0 [ 12312848 ]
        Alan Gates made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Patch Available Patch Available
        37m 3s 1 Arun C Murthy 29/Apr/08 19:57
        Patch Available Patch Available Resolved Resolved
        3d 1h 50m 1 Olga Natkovich 02/May/08 21:47
        Resolved Resolved Closed Closed
        691d 1h 14m 1 Alan Gates 24/Mar/10 22:01

          People

          • Assignee:
            Arun C Murthy
            Reporter:
            Olga Natkovich
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development