You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by Lee S <sl...@gmail.com> on 2015/12/29 08:50:45 UTC
How to set hive.aux.jars.path in hive1.1.0?
Hi all:
I have a serde jar written by myself to deserialize some kind of data.
I put the jar in the host of hiverserver and set the
*hive.aux.jars.path* property in hive-site.xml.
Then I use beeline connecting to hiveserver2, create a table with the
serde class, but it said
class not found exception. why? anybody can help?
<property>
<name>hive.aux.jars.path</name>
<property>file:///root/serde.jar</property>
</property>
Re: How to set hive.aux.jars.path in hive1.1.0?
Posted by Amey Barve <am...@gmail.com>.
Hi Heng,
Following steps worked for me:
1. sudo mkdir $HIVE_HOME/auxlib on machine running hive server 2
2. Copy all your jars in this folder
3. restart hive server 2
4. Now you can run hive queries through beeline
Regards,
Amey
On Wed, Dec 30, 2015 at 4:41 AM, Heng Chen <he...@gmail.com> wrote:
> Yeah, this is my code.
>
> Properties prop = new Properties();
> prop.put(USER, user);
> prop.put(PASSWORD, password);
> prop.put("hiveconf:hive.aux.jars.path", auxJarPath);
>
> ConnectionFactory connectionFactory = new DriverManagerConnectionFactory(url, prop);
>
>
> Hopes it will be helpful.
>
> 2015-12-29 19:49 GMT+08:00 Lee S <sl...@gmail.com>:
>
>> @Heng, I didn't try to set the variable directly in beeline shell.
>> Actually,
>>
>> I programmed with hive jdbc to create table with self defined serde.
>>
>> And I need to put the serde jar in the hive.aux.jars.path,in case I can
>> find it directly,
>>
>> not through beeline.
>>
>>
>>
>> On Tue, Dec 29, 2015 at 5:38 PM, Heng Chen <he...@gmail.com>
>> wrote:
>>
>>> Have you try to set hive_aux_jars_path explicitly in beeline shell?
>>> I found this problem too when i use hive-jdbc in my project, and i set
>>> hive_aux_jars_path explicitly in my code.
>>>
>>> Hopes it will be helpful.
>>>
>>>
>>> 2015-12-29 15:58 GMT+08:00 Peyman Mohajerian <mo...@gmail.com>:
>>>
>>>> Maybe you need to also add:
>>>>
>>>> HIVE_AUX_JARS_PATH = /path/to/JAR
>>>>
>>>> e.g.: http://www.cloudera.com/content/www/en-us/documentation/archive/manager/4-x/4-8-0/Cloudera-Manager-Managing-Clusters/cmmc_hive_udf.html
>>>>
>>>>
>>>> On Mon, Dec 28, 2015 at 11:52 PM, Lee S <sl...@gmail.com> wrote:
>>>>
>>>>> Sorry, the <property> is <value>, forgive my wrong typing. Anybody can
>>>>> help?
>>>>>
>>>>>
>>>>> On Tue, Dec 29, 2015 at 3:50 PM, Lee S <sl...@gmail.com> wrote:
>>>>>
>>>>>> Hi all:
>>>>>> I have a serde jar written by myself to deserialize some kind of
>>>>>> data.
>>>>>>
>>>>>> I put the jar in the host of hiverserver and set the
>>>>>> *hive.aux.jars.path* property in hive-site.xml.
>>>>>>
>>>>>> Then I use beeline connecting to hiveserver2, create a table with
>>>>>> the serde class, but it said
>>>>>>
>>>>>> class not found exception. why? anybody can help?
>>>>>>
>>>>>> <property>
>>>>>> <name>hive.aux.jars.path</name>
>>>>>> <property>file:///root/serde.jar</property>
>>>>>> </property>
>>>>>>
>>>>>
>>>>>
>>>>
>>>
>>
>
Re: How to set hive.aux.jars.path in hive1.1.0?
Posted by Heng Chen <he...@gmail.com>.
Yeah, this is my code.
Properties prop = new Properties();
prop.put(USER, user);
prop.put(PASSWORD, password);
prop.put("hiveconf:hive.aux.jars.path", auxJarPath);
ConnectionFactory connectionFactory = new
DriverManagerConnectionFactory(url, prop);
Hopes it will be helpful.
2015-12-29 19:49 GMT+08:00 Lee S <sl...@gmail.com>:
> @Heng, I didn't try to set the variable directly in beeline shell.
> Actually,
>
> I programmed with hive jdbc to create table with self defined serde.
>
> And I need to put the serde jar in the hive.aux.jars.path,in case I can
> find it directly,
>
> not through beeline.
>
>
>
> On Tue, Dec 29, 2015 at 5:38 PM, Heng Chen <he...@gmail.com>
> wrote:
>
>> Have you try to set hive_aux_jars_path explicitly in beeline shell?
>> I found this problem too when i use hive-jdbc in my project, and i set
>> hive_aux_jars_path explicitly in my code.
>>
>> Hopes it will be helpful.
>>
>>
>> 2015-12-29 15:58 GMT+08:00 Peyman Mohajerian <mo...@gmail.com>:
>>
>>> Maybe you need to also add:
>>>
>>> HIVE_AUX_JARS_PATH = /path/to/JAR
>>>
>>> e.g.: http://www.cloudera.com/content/www/en-us/documentation/archive/manager/4-x/4-8-0/Cloudera-Manager-Managing-Clusters/cmmc_hive_udf.html
>>>
>>>
>>> On Mon, Dec 28, 2015 at 11:52 PM, Lee S <sl...@gmail.com> wrote:
>>>
>>>> Sorry, the <property> is <value>, forgive my wrong typing. Anybody can
>>>> help?
>>>>
>>>>
>>>> On Tue, Dec 29, 2015 at 3:50 PM, Lee S <sl...@gmail.com> wrote:
>>>>
>>>>> Hi all:
>>>>> I have a serde jar written by myself to deserialize some kind of
>>>>> data.
>>>>>
>>>>> I put the jar in the host of hiverserver and set the
>>>>> *hive.aux.jars.path* property in hive-site.xml.
>>>>>
>>>>> Then I use beeline connecting to hiveserver2, create a table with
>>>>> the serde class, but it said
>>>>>
>>>>> class not found exception. why? anybody can help?
>>>>>
>>>>> <property>
>>>>> <name>hive.aux.jars.path</name>
>>>>> <property>file:///root/serde.jar</property>
>>>>> </property>
>>>>>
>>>>
>>>>
>>>
>>
>
Re: How to set hive.aux.jars.path in hive1.1.0?
Posted by Lee S <sl...@gmail.com>.
@Heng, I didn't try to set the variable directly in beeline shell. Actually,
I programmed with hive jdbc to create table with self defined serde.
And I need to put the serde jar in the hive.aux.jars.path,in case I can
find it directly,
not through beeline.
On Tue, Dec 29, 2015 at 5:38 PM, Heng Chen <he...@gmail.com> wrote:
> Have you try to set hive_aux_jars_path explicitly in beeline shell?
> I found this problem too when i use hive-jdbc in my project, and i set
> hive_aux_jars_path explicitly in my code.
>
> Hopes it will be helpful.
>
>
> 2015-12-29 15:58 GMT+08:00 Peyman Mohajerian <mo...@gmail.com>:
>
>> Maybe you need to also add:
>>
>> HIVE_AUX_JARS_PATH = /path/to/JAR
>>
>> e.g.: http://www.cloudera.com/content/www/en-us/documentation/archive/manager/4-x/4-8-0/Cloudera-Manager-Managing-Clusters/cmmc_hive_udf.html
>>
>>
>> On Mon, Dec 28, 2015 at 11:52 PM, Lee S <sl...@gmail.com> wrote:
>>
>>> Sorry, the <property> is <value>, forgive my wrong typing. Anybody can
>>> help?
>>>
>>>
>>> On Tue, Dec 29, 2015 at 3:50 PM, Lee S <sl...@gmail.com> wrote:
>>>
>>>> Hi all:
>>>> I have a serde jar written by myself to deserialize some kind of
>>>> data.
>>>>
>>>> I put the jar in the host of hiverserver and set the
>>>> *hive.aux.jars.path* property in hive-site.xml.
>>>>
>>>> Then I use beeline connecting to hiveserver2, create a table with the
>>>> serde class, but it said
>>>>
>>>> class not found exception. why? anybody can help?
>>>>
>>>> <property>
>>>> <name>hive.aux.jars.path</name>
>>>> <property>file:///root/serde.jar</property>
>>>> </property>
>>>>
>>>
>>>
>>
>
Re: How to set hive.aux.jars.path in hive1.1.0?
Posted by Heng Chen <he...@gmail.com>.
Have you try to set hive_aux_jars_path explicitly in beeline shell?
I found this problem too when i use hive-jdbc in my project, and i set
hive_aux_jars_path explicitly in my code.
Hopes it will be helpful.
2015-12-29 15:58 GMT+08:00 Peyman Mohajerian <mo...@gmail.com>:
> Maybe you need to also add:
>
> HIVE_AUX_JARS_PATH = /path/to/JAR
>
> e.g.: http://www.cloudera.com/content/www/en-us/documentation/archive/manager/4-x/4-8-0/Cloudera-Manager-Managing-Clusters/cmmc_hive_udf.html
>
>
> On Mon, Dec 28, 2015 at 11:52 PM, Lee S <sl...@gmail.com> wrote:
>
>> Sorry, the <property> is <value>, forgive my wrong typing. Anybody can
>> help?
>>
>>
>> On Tue, Dec 29, 2015 at 3:50 PM, Lee S <sl...@gmail.com> wrote:
>>
>>> Hi all:
>>> I have a serde jar written by myself to deserialize some kind of data.
>>>
>>> I put the jar in the host of hiverserver and set the
>>> *hive.aux.jars.path* property in hive-site.xml.
>>>
>>> Then I use beeline connecting to hiveserver2, create a table with the
>>> serde class, but it said
>>>
>>> class not found exception. why? anybody can help?
>>>
>>> <property>
>>> <name>hive.aux.jars.path</name>
>>> <property>file:///root/serde.jar</property>
>>> </property>
>>>
>>
>>
>
Re: How to set hive.aux.jars.path in hive1.1.0?
Posted by Lee S <sl...@gmail.com>.
@Peyman I've done as this webpage.But export the variable only makes
effects in hive console, didnt work on hiveserver.
On Tue, Dec 29, 2015 at 3:58 PM, Peyman Mohajerian <mo...@gmail.com>
wrote:
> Maybe you need to also add:
>
> HIVE_AUX_JARS_PATH = /path/to/JAR
>
> e.g.: http://www.cloudera.com/content/www/en-us/documentation/archive/manager/4-x/4-8-0/Cloudera-Manager-Managing-Clusters/cmmc_hive_udf.html
>
>
> On Mon, Dec 28, 2015 at 11:52 PM, Lee S <sl...@gmail.com> wrote:
>
>> Sorry, the <property> is <value>, forgive my wrong typing. Anybody can
>> help?
>>
>>
>> On Tue, Dec 29, 2015 at 3:50 PM, Lee S <sl...@gmail.com> wrote:
>>
>>> Hi all:
>>> I have a serde jar written by myself to deserialize some kind of data.
>>>
>>> I put the jar in the host of hiverserver and set the
>>> *hive.aux.jars.path* property in hive-site.xml.
>>>
>>> Then I use beeline connecting to hiveserver2, create a table with the
>>> serde class, but it said
>>>
>>> class not found exception. why? anybody can help?
>>>
>>> <property>
>>> <name>hive.aux.jars.path</name>
>>> <property>file:///root/serde.jar</property>
>>> </property>
>>>
>>
>>
>
Re: How to set hive.aux.jars.path in hive1.1.0?
Posted by Peyman Mohajerian <mo...@gmail.com>.
Maybe you need to also add:
HIVE_AUX_JARS_PATH = /path/to/JAR
e.g.: http://www.cloudera.com/content/www/en-us/documentation/archive/manager/4-x/4-8-0/Cloudera-Manager-Managing-Clusters/cmmc_hive_udf.html
On Mon, Dec 28, 2015 at 11:52 PM, Lee S <sl...@gmail.com> wrote:
> Sorry, the <property> is <value>, forgive my wrong typing. Anybody can
> help?
>
>
> On Tue, Dec 29, 2015 at 3:50 PM, Lee S <sl...@gmail.com> wrote:
>
>> Hi all:
>> I have a serde jar written by myself to deserialize some kind of data.
>>
>> I put the jar in the host of hiverserver and set the
>> *hive.aux.jars.path* property in hive-site.xml.
>>
>> Then I use beeline connecting to hiveserver2, create a table with the
>> serde class, but it said
>>
>> class not found exception. why? anybody can help?
>>
>> <property>
>> <name>hive.aux.jars.path</name>
>> <property>file:///root/serde.jar</property>
>> </property>
>>
>
>
Re: How to set hive.aux.jars.path in hive1.1.0?
Posted by Lee S <sl...@gmail.com>.
Sorry, the <property> is <value>, forgive my wrong typing. Anybody can help?
On Tue, Dec 29, 2015 at 3:50 PM, Lee S <sl...@gmail.com> wrote:
> Hi all:
> I have a serde jar written by myself to deserialize some kind of data.
>
> I put the jar in the host of hiverserver and set the
> *hive.aux.jars.path* property in hive-site.xml.
>
> Then I use beeline connecting to hiveserver2, create a table with the
> serde class, but it said
>
> class not found exception. why? anybody can help?
>
> <property>
> <name>hive.aux.jars.path</name>
> <property>file:///root/serde.jar</property>
> </property>
>