Hi Sean, this is fixed in Pig 0.9

-Dmitriy

On Wed, Sep 7, 2011 at 2:07 PM, Sean Timm <[email protected]> wrote:

> I'm using Pig 0.8.1.
>
> I recieved an error trying to use a dynamic invoker with
> URLDecoder.decode(String, String) caused by java.lang.**NoClassDefFoundError:
> com/google/common/collect/Sets which is used by org.apache.builtin.Invoker
> and packaged in pig-0.8.1-core.jar.  To get around this issue I had to
> register the pig jar as in the example below.  This doesn't seem like it
> should be necessary, though I do see one other reference to this in a prior
> e-mail thread between Dmitry Ryaboy and Dan Brickley back in March (
> http://mail-archives.apache.**org/mod_mbox/pig-user/201103.**
> mbox/%3CAANLkTingb3=5X3e9XzU=**kwfXzm9JH833Cj5k2+MiBUOO@mail.**
> gmail.com%3E<http://mail-archives.apache.org/mod_mbox/pig-user/201103.mbox/%[email protected]%3E>
> ).
>
> Is this how it should work, or am I doing something wrong?
>
> REGISTER $PIG_DIR/pig-0.8.1-core.jar
> DEFINE UrlDecode InvokeForString('java.net.**URLDecoder.decode', 'String
> String');
> data = LOAD file AS a:chararray;
> foo = FOREACH data GENERATE UrlDecode(a, 'UTF-8') AS a;
>
> Thanks,
> Sean
>

Reply via email to