You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pig.apache.org by Jeff Yuan <qu...@gmail.com> on 2013/03/29 20:50:02 UTC

Pig configuration for embedded programs

Hi guys,

I have a quick question about configuring Pig correctly when used in a
embedded java program: ie my code instantiates PigServer and registers
queries to it.

How do I set the directory to load the hadoop configuration and pig
properties? Is it just a matter of setting the path in the
PIG_CLASSPATH and HADOOP_CONF_DIR environment variables? I've seen
some documentation about setting configs when directly running pig,
but not much discussing when used as an embedded program.

Would appreciate any pointers. Thanks!

Re: Pig configuration for embedded programs

Posted by Prashant Kommireddi <pr...@gmail.com>.
Take a look at HExecutionEngine.java

Sent from my iPhone

On Mar 29, 2013, at 1:15 PM, Jeff Yuan <qu...@gmail.com> wrote:

> Thanks! Do you know where in the code is this loading of
> configuration, etc handled? I'm still pretty new, and want to
> understand a bit more about how this works.
>
>
>
> On Fri, Mar 29, 2013 at 1:00 PM, Prashant Kommireddi
> <pr...@gmail.com> wrote:
>> Hi Jeff,
>>
>> Your embedded program should work as long as the conf dir/files are on
>> the classpath.
>>
>> Sent from my iPhone
>>
>> On Mar 29, 2013, at 12:50 PM, Jeff Yuan <qu...@gmail.com> wrote:
>>
>>> Hi guys,
>>>
>>> I have a quick question about configuring Pig correctly when used in a
>>> embedded java program: ie my code instantiates PigServer and registers
>>> queries to it.
>>>
>>> How do I set the directory to load the hadoop configuration and pig
>>> properties? Is it just a matter of setting the path in the
>>> PIG_CLASSPATH and HADOOP_CONF_DIR environment variables? I've seen
>>> some documentation about setting configs when directly running pig,
>>> but not much discussing when used as an embedded program.
>>>
>>> Would appreciate any pointers. Thanks!

Re: Pig configuration for embedded programs

Posted by Jeff Yuan <qu...@gmail.com>.
Thanks! Do you know where in the code is this loading of
configuration, etc handled? I'm still pretty new, and want to
understand a bit more about how this works.



On Fri, Mar 29, 2013 at 1:00 PM, Prashant Kommireddi
<pr...@gmail.com> wrote:
> Hi Jeff,
>
> Your embedded program should work as long as the conf dir/files are on
> the classpath.
>
> Sent from my iPhone
>
> On Mar 29, 2013, at 12:50 PM, Jeff Yuan <qu...@gmail.com> wrote:
>
>> Hi guys,
>>
>> I have a quick question about configuring Pig correctly when used in a
>> embedded java program: ie my code instantiates PigServer and registers
>> queries to it.
>>
>> How do I set the directory to load the hadoop configuration and pig
>> properties? Is it just a matter of setting the path in the
>> PIG_CLASSPATH and HADOOP_CONF_DIR environment variables? I've seen
>> some documentation about setting configs when directly running pig,
>> but not much discussing when used as an embedded program.
>>
>> Would appreciate any pointers. Thanks!

Re: Pig configuration for embedded programs

Posted by Prashant Kommireddi <pr...@gmail.com>.
Hi Jeff,

Your embedded program should work as long as the conf dir/files are on
the classpath.

Sent from my iPhone

On Mar 29, 2013, at 12:50 PM, Jeff Yuan <qu...@gmail.com> wrote:

> Hi guys,
>
> I have a quick question about configuring Pig correctly when used in a
> embedded java program: ie my code instantiates PigServer and registers
> queries to it.
>
> How do I set the directory to load the hadoop configuration and pig
> properties? Is it just a matter of setting the path in the
> PIG_CLASSPATH and HADOOP_CONF_DIR environment variables? I've seen
> some documentation about setting configs when directly running pig,
> but not much discussing when used as an embedded program.
>
> Would appreciate any pointers. Thanks!