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

Multiple Store-commands mess up mapred.output.dir.

    XMLWordPrintableJSON

Details

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

    Description

      When one runs a pig-script with multiple storers, one sees the following:
      1. When run as a script, Pig launches a single job.
      2. PigOutputCommitter::setupJob() calls the underlyingOutputCommitter::setupJob(), once for each storer. But the mapred.output.dir is the same for both calls, even though the storers write to different locations.

      This was originally seen in HCATALOG-276, when HCatalog's end-to-end tests are run against Pig.
      (https://issues.apache.org/jira/browse/HCATALOG-276)

      Sample pig-script (near identical to HCatalog's Pig_Checkin_4 test):

      a = load 'keyvals' using org.apache.hcatalog.pig.HCatLoader();
      split a into b if key<200, c if key >=200;
      store b into 'keyvals_lt200' using org.apache.hcatalog.pig.HCatStorer();
      store c into 'keyvals_ge200' using org.apache.hcatalog.pig.HCatStorer();

      I've suggested a workaround in HCat for the time being, but I think this might be something that needs fixing in Pig.

      Thanks.

      Attachments

        1. PIG-2578-1.patch
          7 kB
          Daniel Dai

        Issue Links

          Activity

            People

              daijy Daniel Dai
              mithun Mithun Radhakrishnan
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: