Grokbase Groups Pig user July 2011
FAQ
Greetings,

I'm trying to upgrade from 0.7.0 to 0.8.1, but am having some trouble
with existing scripts.

The basic problem I'm trying to solve is storing an alias in to hdfs,
overwriting data that may already exist at that path.

I've been using this pattern in 0.7.0:

fs -rmr /some/output/path/
store a into '/some/output/path/' using PigStorage('\t');

This works fine whether or not the path exists in hdfs on 0.7.0, but
0.8.1 throws an IOException at the beginning of the script, and fails
to proceed.

Is there a way to supress any error returned by the 'fs -rmr', or is
there a way to make STORE replace existing contents (if any)?

Thanks!

Search Discussions

  • Raghu Angadi at Jul 19, 2011 at 7:43 am
    I noticed this too. I could not find any documentation regd how return code
    from a command like 'fs' or 'rmf' or some shell command is.

    Replace 'fs -rmr' with rmf for your case.

    Raghu.
    On Tue, Jul 19, 2011 at 12:27 AM, Chris Rosner wrote:

    Greetings,

    I'm trying to upgrade from 0.7.0 to 0.8.1, but am having some trouble
    with existing scripts.

    The basic problem I'm trying to solve is storing an alias in to hdfs,
    overwriting data that may already exist at that path.

    I've been using this pattern in 0.7.0:

    fs -rmr /some/output/path/
    store a into '/some/output/path/' using PigStorage('\t');

    This works fine whether or not the path exists in hdfs on 0.7.0, but
    0.8.1 throws an IOException at the beginning of the script, and fails
    to proceed.

    Is there a way to supress any error returned by the 'fs -rmr', or is
    there a way to make STORE replace existing contents (if any)?

    Thanks!

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupuser @
categoriespig, hadoop
postedJul 19, '11 at 7:28a
activeJul 19, '11 at 7:43a
posts2
users2
websitepig.apache.org

2 users in discussion

Raghu Angadi: 1 post Chris Rosner: 1 post

People

Translate

site design / logo © 2021 Grokbase