Pig
  1. Pig
  2. PIG-237

Pig allows to overwrite existing files

    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

      You can run the following script multiple times and it will not produce the error second time saying that the directory already exists. If the existing file is a single file and not a directory, hadoop eventually produces an error but with directory it runs to completion.

      A = load 'data';
      store A into 'foo';

      The validation code is missing from org/apache/pig/impl/logicalLayer/parser/QueryParser.jjt in StoreClause() function.

        Activity

        Hide
        Pi Song added a comment -

        If this is not an urgent need, I would say it has already been addressed in the type branch.

        Show
        Pi Song added a comment - If this is not an urgent need, I would say it has already been addressed in the type branch.
        Hide
        Olga Natkovich added a comment -

        I think we need a temp fix. This can cause data loss.

        Show
        Olga Natkovich added a comment - I think we need a temp fix. This can cause data loss.
        Hide
        Pi Song added a comment -

        Sorry for Pradeep. In this case I will create a patch which is a piece of code copied from type branch.
        It will be available in 20 if there is no problem (I'm running unit tests).

        Show
        Pi Song added a comment - Sorry for Pradeep. In this case I will create a patch which is a piece of code copied from type branch. It will be available in 20 if there is no problem (I'm running unit tests).
        Hide
        Pi Song added a comment -

        The patch.
        No test failed.

        Show
        Pi Song added a comment - The patch. No test failed.
        Hide
        Olga Natkovich added a comment -

        Patch committed. Thanks, Pi.

        Show
        Olga Natkovich added a comment - Patch committed. Thanks, Pi.

          People

          • Assignee:
            Pradeep Kamath
            Reporter:
            Olga Natkovich
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development