You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pig.apache.org by John Smith <le...@gmail.com> on 2016/01/11 13:22:39 UTC
PigServer class and script execution
Hi,
I have a java code that generates pig script. I am wondering if there is
option to execute that script directly within the java code. I found there
is a option to embed pig script execution inside java code using PigServer
<https://pig.apache.org/docs/r0.14.0/api/org/apache/pig/PigServer.html>
class.
The problem is that I'm using AvroStorage to store the results and the
class contains method Store() that apparently uses file storage.
Is there any way how to execute my pig script using AvroStorage?
Thanks
Re: PigServer class and script execution
Posted by John Smith <le...@gmail.com>.
Hi,
no, I create pig commands inside the Java programmer so i call
*pigServer.registerQuery*
Best,
John
On Mon, Jan 11, 2016 at 11:51 PM, Jianfeng (Jeff) Zhang <
jzhang@hortonworks.com> wrote:
>
> Do you use PigServer.registerScript(fileName) ? Then what errors do you
> see if you use AvroStorage ?
>
>
> Best Regard,
> Jeff Zhang
>
>
>
>
>
> On 1/11/16, 9:36 AM, "John Smith" <le...@gmail.com> wrote:
>
> >hi,
> >
> >i think you are answering something different. I need execute whole pig
> >script using PigServer class... that apparently doesnt support AvroStorage
> >or I can see it.
> >
> >
> >best,
> >john
> >
> >On Mon, Jan 11, 2016 at 6:27 PM, Jianfeng (Jeff) Zhang <
> >jzhang@hortonworks.com> wrote:
> >
> >>
> >> Of course, you can. AvroStorage is a built-in UDF, you just need to put
> >> pig jar on the classpath
> >>
> >>
> >> Best Regard,
> >> Jeff Zhang
> >>
> >>
> >>
> >>
> >>
> >> On 1/11/16, 4:22 AM, "John Smith" <le...@gmail.com> wrote:
> >>
> >> >Hi,
> >> >
> >> >I have a java code that generates pig script. I am wondering if there
> >>is
> >> >option to execute that script directly within the java code. I found
> >>there
> >> >is a option to embed pig script execution inside java code using
> >>PigServer
> >> ><https://pig.apache.org/docs/r0.14.0/api/org/apache/pig/PigServer.html
> >
> >> >class.
> >> >
> >> >The problem is that I'm using AvroStorage to store the results and the
> >> >class contains method Store() that apparently uses file storage.
> >> >
> >> >Is there any way how to execute my pig script using AvroStorage?
> >> >
> >> >Thanks
> >>
> >>
>
>
Re: PigServer class and script execution
Posted by "Jianfeng (Jeff) Zhang" <jz...@hortonworks.com>.
Do you use PigServer.registerScript(fileName) ? Then what errors do you
see if you use AvroStorage ?
Best Regard,
Jeff Zhang
On 1/11/16, 9:36 AM, "John Smith" <le...@gmail.com> wrote:
>hi,
>
>i think you are answering something different. I need execute whole pig
>script using PigServer class... that apparently doesnt support AvroStorage
>or I can see it.
>
>
>best,
>john
>
>On Mon, Jan 11, 2016 at 6:27 PM, Jianfeng (Jeff) Zhang <
>jzhang@hortonworks.com> wrote:
>
>>
>> Of course, you can. AvroStorage is a built-in UDF, you just need to put
>> pig jar on the classpath
>>
>>
>> Best Regard,
>> Jeff Zhang
>>
>>
>>
>>
>>
>> On 1/11/16, 4:22 AM, "John Smith" <le...@gmail.com> wrote:
>>
>> >Hi,
>> >
>> >I have a java code that generates pig script. I am wondering if there
>>is
>> >option to execute that script directly within the java code. I found
>>there
>> >is a option to embed pig script execution inside java code using
>>PigServer
>> ><https://pig.apache.org/docs/r0.14.0/api/org/apache/pig/PigServer.html>
>> >class.
>> >
>> >The problem is that I'm using AvroStorage to store the results and the
>> >class contains method Store() that apparently uses file storage.
>> >
>> >Is there any way how to execute my pig script using AvroStorage?
>> >
>> >Thanks
>>
>>
Re: PigServer class and script execution
Posted by John Smith <le...@gmail.com>.
hi,
i think you are answering something different. I need execute whole pig
script using PigServer class... that apparently doesnt support AvroStorage
or I can see it.
best,
john
On Mon, Jan 11, 2016 at 6:27 PM, Jianfeng (Jeff) Zhang <
jzhang@hortonworks.com> wrote:
>
> Of course, you can. AvroStorage is a built-in UDF, you just need to put
> pig jar on the classpath
>
>
> Best Regard,
> Jeff Zhang
>
>
>
>
>
> On 1/11/16, 4:22 AM, "John Smith" <le...@gmail.com> wrote:
>
> >Hi,
> >
> >I have a java code that generates pig script. I am wondering if there is
> >option to execute that script directly within the java code. I found there
> >is a option to embed pig script execution inside java code using PigServer
> ><https://pig.apache.org/docs/r0.14.0/api/org/apache/pig/PigServer.html>
> >class.
> >
> >The problem is that I'm using AvroStorage to store the results and the
> >class contains method Store() that apparently uses file storage.
> >
> >Is there any way how to execute my pig script using AvroStorage?
> >
> >Thanks
>
>
Re: PigServer class and script execution
Posted by "Jianfeng (Jeff) Zhang" <jz...@hortonworks.com>.
Of course, you can. AvroStorage is a built-in UDF, you just need to put
pig jar on the classpath
Best Regard,
Jeff Zhang
On 1/11/16, 4:22 AM, "John Smith" <le...@gmail.com> wrote:
>Hi,
>
>I have a java code that generates pig script. I am wondering if there is
>option to execute that script directly within the java code. I found there
>is a option to embed pig script execution inside java code using PigServer
><https://pig.apache.org/docs/r0.14.0/api/org/apache/pig/PigServer.html>
>class.
>
>The problem is that I'm using AvroStorage to store the results and the
>class contains method Store() that apparently uses file storage.
>
>Is there any way how to execute my pig script using AvroStorage?
>
>Thanks