You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by bryan xu <br...@gmail.com> on 2010/11/12 04:57:46 UTC

How to add jar to Hive "globally"?

Dear all,
     I would like to add jar to Hive  in one session, and make this jar
"global" available to other New sessions. It seems "add jar filename.jar"
only preHook on current thread.

   Any help or pointers on how to solve this?

Thanks
bryan

Re: How to add jar to Hive "globally"?

Posted by bryan xu <br...@gmail.com>.
Thanks for all the suggestions
Right now we have a all_new.jar configuration in hive-site.xml:

<property>
<name>hive.aux.jars.path</name>
<value>file:///${HIVE_HOME/auxlib/all_new.jar</value>
</property>

while adding a newjar to Hive,we manually update all_new.jar file like:
   all_new.jar += newjar.jar
so the all_new.jar is keeping all new added jars.
when Hive service RESTART, they all can be available.

the problem is BEFORE RESTART ,how can we make the new added jar  "global"
available?



On Fri, Nov 12, 2010 at 12:51 PM, Marcello de Sales <
marcello.desales@gmail.com> wrote:

> I like the approach to have the properties in the hive-site.xml, as I have
> it under version control...
>
> Thanks for the suggestions...
> Marcello de Sales
>
>
> On Thu, Nov 11, 2010 at 8:45 PM, Edward Capriolo <ed...@gmail.com>wrote:
>
>> On Thu, Nov 11, 2010 at 11:42 PM, Shrijeet Paliwal
>> <sh...@rocketfuel.com> wrote:
>> > One other alternative,
>> >
>> > Add following property to your hive-site.xml
>> >
>> > <property>
>> > <name>hive.aux.jars.path</name>
>> >
>> <value>file:///home/me/my.jar,file:///home/you/your.jar,file:///home/us/our.jar</value>
>> > </property>
>> >
>> >
>> > On Thu, Nov 11, 2010 at 8:05 PM, Edward Capriolo <ed...@gmail.com>
>> wrote:
>> >> On Thu, Nov 11, 2010 at 10:57 PM, bryan xu <br...@gmail.com>
>> wrote:
>> >>> Dear all,
>> >>>      I would like to add jar to Hive  in one session, and make this
>> jar
>> >>> "global" available to other New sessions. It seems "add jar
>> filename.jar"
>> >>> only preHook on current thread.
>> >>>    Any help or pointers on how to solve this?
>> >>>
>> >>> Thanks
>> >>> bryan
>> >>
>> >> You can run commands globally. You can use place a .hiverc in user
>> >> home or hive home.
>> >> https://issues.apache.org/jira/browse/HIVE-1414
>> >> Everything in this file is run on startup.
>> >> Edward
>> >>
>> >
>>
>> I'll see that suggestion and raise you another. :)
>> You can also make a directory <hivehome>/auxlib and put your jars inside
>> that.
>>
>
>

Re: How to add jar to Hive "globally"?

Posted by Marcello de Sales <ma...@gmail.com>.
I like the approach to have the properties in the hive-site.xml, as I have
it under version control...

Thanks for the suggestions...
Marcello de Sales

On Thu, Nov 11, 2010 at 8:45 PM, Edward Capriolo <ed...@gmail.com>wrote:

> On Thu, Nov 11, 2010 at 11:42 PM, Shrijeet Paliwal
> <sh...@rocketfuel.com> wrote:
> > One other alternative,
> >
> > Add following property to your hive-site.xml
> >
> > <property>
> > <name>hive.aux.jars.path</name>
> >
> <value>file:///home/me/my.jar,file:///home/you/your.jar,file:///home/us/our.jar</value>
> > </property>
> >
> >
> > On Thu, Nov 11, 2010 at 8:05 PM, Edward Capriolo <ed...@gmail.com>
> wrote:
> >> On Thu, Nov 11, 2010 at 10:57 PM, bryan xu <br...@gmail.com>
> wrote:
> >>> Dear all,
> >>>      I would like to add jar to Hive  in one session, and make this jar
> >>> "global" available to other New sessions. It seems "add jar
> filename.jar"
> >>> only preHook on current thread.
> >>>    Any help or pointers on how to solve this?
> >>>
> >>> Thanks
> >>> bryan
> >>
> >> You can run commands globally. You can use place a .hiverc in user
> >> home or hive home.
> >> https://issues.apache.org/jira/browse/HIVE-1414
> >> Everything in this file is run on startup.
> >> Edward
> >>
> >
>
> I'll see that suggestion and raise you another. :)
> You can also make a directory <hivehome>/auxlib and put your jars inside
> that.
>

Re: How to add jar to Hive "globally"?

Posted by Edward Capriolo <ed...@gmail.com>.
On Thu, Nov 11, 2010 at 11:42 PM, Shrijeet Paliwal
<sh...@rocketfuel.com> wrote:
> One other alternative,
>
> Add following property to your hive-site.xml
>
> <property>
> <name>hive.aux.jars.path</name>
> <value>file:///home/me/my.jar,file:///home/you/your.jar,file:///home/us/our.jar</value>
> </property>
>
>
> On Thu, Nov 11, 2010 at 8:05 PM, Edward Capriolo <ed...@gmail.com> wrote:
>> On Thu, Nov 11, 2010 at 10:57 PM, bryan xu <br...@gmail.com> wrote:
>>> Dear all,
>>>      I would like to add jar to Hive  in one session, and make this jar
>>> "global" available to other New sessions. It seems "add jar filename.jar"
>>> only preHook on current thread.
>>>    Any help or pointers on how to solve this?
>>>
>>> Thanks
>>> bryan
>>
>> You can run commands globally. You can use place a .hiverc in user
>> home or hive home.
>> https://issues.apache.org/jira/browse/HIVE-1414
>> Everything in this file is run on startup.
>> Edward
>>
>

I'll see that suggestion and raise you another. :)
You can also make a directory <hivehome>/auxlib and put your jars inside that.

Re: How to add jar to Hive "globally"?

Posted by Shrijeet Paliwal <sh...@rocketfuel.com>.
One other alternative,

Add following property to your hive-site.xml

<property>
<name>hive.aux.jars.path</name>
<value>file:///home/me/my.jar,file:///home/you/your.jar,file:///home/us/our.jar</value>
</property>


On Thu, Nov 11, 2010 at 8:05 PM, Edward Capriolo <ed...@gmail.com> wrote:
> On Thu, Nov 11, 2010 at 10:57 PM, bryan xu <br...@gmail.com> wrote:
>> Dear all,
>>      I would like to add jar to Hive  in one session, and make this jar
>> "global" available to other New sessions. It seems "add jar filename.jar"
>> only preHook on current thread.
>>    Any help or pointers on how to solve this?
>>
>> Thanks
>> bryan
>
> You can run commands globally. You can use place a .hiverc in user
> home or hive home.
> https://issues.apache.org/jira/browse/HIVE-1414
> Everything in this file is run on startup.
> Edward
>

Re: How to add jar to Hive "globally"?

Posted by Edward Capriolo <ed...@gmail.com>.
On Thu, Nov 11, 2010 at 10:57 PM, bryan xu <br...@gmail.com> wrote:
> Dear all,
>      I would like to add jar to Hive  in one session, and make this jar
> "global" available to other New sessions. It seems "add jar filename.jar"
> only preHook on current thread.
>    Any help or pointers on how to solve this?
>
> Thanks
> bryan

You can run commands globally. You can use place a .hiverc in user
home or hive home.
https://issues.apache.org/jira/browse/HIVE-1414
Everything in this file is run on startup.
Edward