Pig
  1. Pig
  2. PIG-3801

Auto local mode does not call storeSchema

    Details

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

      Description

      https://github.com/apache/pig/blob/trunk/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/MapReduceLauncher.java#L481

      Pig code explicitly runs PigOutputCommitter.storeCleanup for local jobs. We also need to add this for auto-local jobs.

      To repro this problem, run-
      > a = load '2.txt' as (a0:chararray, a1:int);
      > store a into 'a' using PigStorage(',','-schema');

      This creates .pig_schema file in pig -x local mode, but does not create .pig_schema file in auto-local mode.

      1. PIG-3801.patch
        6 kB
        Aniket Mokashi

        Activity

        Hide
        Julien Le Dem added a comment -

        I would use properties.getProperty(MAPREDUCE_FRAMEWORK_NAME).equals(LOCAL) to decide if it's running locally, but otherwise this looks good to me.

        Show
        Julien Le Dem added a comment - I would use properties.getProperty(MAPREDUCE_FRAMEWORK_NAME).equals(LOCAL) to decide if it's running locally, but otherwise this looks good to me.
        Hide
        Julien Le Dem added a comment -

        +1

        Show
        Julien Le Dem added a comment - +1
        Hide
        Aniket Mokashi added a comment -

        Committed to trunk. Thanks Julien Le Dem for the review.

        Show
        Aniket Mokashi added a comment - Committed to trunk. Thanks Julien Le Dem for the review.

          People

          • Assignee:
            Aniket Mokashi
            Reporter:
            Aniket Mokashi
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development