You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by Mayuran Yogarajah <ma...@casalemedia.com> on 2009/09/11 06:10:04 UTC

Class not found

I have a table with:
ROW FORMAT SERDE 'org.apache.hadoop.hive.contrib.serde2.RegexSerDe'

When I do a select on the table with a WHERE clause it runs a mapred job
which fails with the following:

java.lang.ClassNotFoundException: org.apache.hadoop.hive.contrib.serde2.RegexSerDe


I have copied $hive_build_dir/build/serde/hive_serde.jar into 
$hadoop_dir/lib.  I'm not
sure if I need to do anything else to get this working.  Can anyone help?

thanks

Re: Class not found

Posted by Zheng Shao <zs...@gmail.com>.
CAST(CAST(col AS DOUBLE) AS BIGINT)

Zheng

On Thu, Sep 10, 2009 at 10:10 PM, Mayuran Yogarajah <
mayuran.yogarajah@casalemedia.com> wrote:

> Zheng Shao wrote:
>
>> You need to run "add jar" before running the SELECT command.
>>
>> Don't copy it to $hadoop_dir/lib - That will make upgrading Hive much
>> harder.
>>
>> Zheng
>>
> Ahh that worked! Thanks so much!
>
> I'm seeing output like this, I'm guessing its because I've had to make all
> the columns STRING.
> 7.1096627E7
>
> Is there some way to have Hive convert this to a number automatically ?
>
> thanks
>



-- 
Yours,
Zheng

Re: Class not found

Posted by Mayuran Yogarajah <ma...@casalemedia.com>.
Zheng Shao wrote:
> You need to run "add jar" before running the SELECT command.
>
> Don't copy it to $hadoop_dir/lib - That will make upgrading Hive much 
> harder.
>
> Zheng
Ahh that worked! Thanks so much!

I'm seeing output like this, I'm guessing its because I've had to make 
all the columns STRING.
7.1096627E7

Is there some way to have Hive convert this to a number automatically ?

thanks

Re: Class not found

Posted by Zheng Shao <zs...@gmail.com>.
You need to run "add jar" before running the SELECT command.

Don't copy it to $hadoop_dir/lib - That will make upgrading Hive much
harder.

Zheng

On Thu, Sep 10, 2009 at 9:10 PM, Mayuran Yogarajah <
mayuran.yogarajah@casalemedia.com> wrote:

> I have a table with:
> ROW FORMAT SERDE 'org.apache.hadoop.hive.contrib.serde2.RegexSerDe'
>
> When I do a select on the table with a WHERE clause it runs a mapred job
> which fails with the following:
>
> java.lang.ClassNotFoundException:
> org.apache.hadoop.hive.contrib.serde2.RegexSerDe
>
>
> I have copied $hive_build_dir/build/serde/hive_serde.jar into
> $hadoop_dir/lib.  I'm not
> sure if I need to do anything else to get this working.  Can anyone help?
>
> thanks
>



-- 
Yours,
Zheng