You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pig.apache.org by 김영우 <wa...@gmail.com> on 2010/10/07 03:50:38 UTC

Recommended way to run pig script 'file' in java application.

Hi,

I need to integrate existing pig scripts to java application. the scripts
have been run in command line.
I'm wondering how to do this? I just want to run pig file(*.pig) in java
code.

Any advice would be appreciated.

Thanks,

- Youngwoo

Re: Recommended way to run pig script 'file' in java application.

Posted by 김영우 <wa...@gmail.com>.
Hi Jeff,

>From Pig API docs, "PigServer.registerScript()" is exactly what I needed to
know.

Thanks for your quick reply.

Youngwoo


2010/10/7 Jeff Zhang <zj...@gmail.com>

> Pig provides java api for users, here's an example
>
> http://hadoop.apache.org/pig/docs/r0.7.0/setup.html#Sample+Code
>
> The most important class is PigServer, you can refer javadoc for more
> details.
>
>
>
> On Thu, Oct 7, 2010 at 9:50 AM, 김영우 <wa...@gmail.com> wrote:
> > Hi,
> >
> > I need to integrate existing pig scripts to java application. the scripts
> > have been run in command line.
> > I'm wondering how to do this? I just want to run pig file(*.pig) in java
> > code.
> >
> > Any advice would be appreciated.
> >
> > Thanks,
> >
> > - Youngwoo
> >
>
>
>
> --
> Best Regards
>
> Jeff Zhang
>

Re: Recommended way to run pig script 'file' in java application.

Posted by Jeff Zhang <zj...@gmail.com>.
Pig provides java api for users, here's an example

http://hadoop.apache.org/pig/docs/r0.7.0/setup.html#Sample+Code

The most important class is PigServer, you can refer javadoc for more details.



On Thu, Oct 7, 2010 at 9:50 AM, 김영우 <wa...@gmail.com> wrote:
> Hi,
>
> I need to integrate existing pig scripts to java application. the scripts
> have been run in command line.
> I'm wondering how to do this? I just want to run pig file(*.pig) in java
> code.
>
> Any advice would be appreciated.
>
> Thanks,
>
> - Youngwoo
>



-- 
Best Regards

Jeff Zhang