You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by tom kersnick <hi...@gmail.com> on 2010/03/04 19:33:47 UTC

UDF question(s)

I went to this link:
http://wiki.apache.org/hadoop/Hive/HivePlugins

q:1

When I try to compile it keeps failing on these:

import org.apache.hadoop.hive.ql.exec.UDF;
import org.apache.hadoop.io.Text;

Im using hive 0.50 with hadoop 20.2.  I thought these were included in
some form or fashion??


q:2

I found a really cool jar here:

http://commons.apache.org/downloads/download_math.cgi

This has a ton of interesting analytical functions which would be
quite useful.
Is there any way in Hive that I can piggyback off of these?

Thanks in advance.

/tom

Re: UDF question(s)

Posted by tom kersnick <hi...@gmail.com>.
Thanks a ton!

/tom


On Thu, Mar 4, 2010 at 10:38 AM, Zheng Shao <zs...@gmail.com> wrote:

> q:1
> You need to add hadoop jars and hive jars to your class path.
> $HADOOP_HOME/lib/*.jar  $HIVE_HOME/lib/*.jar
>
> q:2
> There is a reflection UDF: https://issues.apache.org/jira/browse/HIVE-471
> It's not committed so you have to patch the source code yourself.
> You may be able to use it together with the analytics functions,
> without having to write one UDF for each analytics function.
> Note that this only applies if the analytics function takes
> primitive-type inputs and produce primitive-type outputs.
>
>
> Zheng
>
> On Thu, Mar 4, 2010 at 10:33 AM, tom kersnick <hi...@gmail.com> wrote:
> > I went to this link:
> > http://wiki.apache.org/hadoop/Hive/HivePlugins
> >
> > q:1
> >
> > When I try to compile it keeps failing on these:
> >
> >
> > import org.apache.hadoop.hive.ql.exec.UDF;
> > import org.apache.hadoop.io.Text;
> >
> > Im using hive 0.50 with hadoop 20.2.  I thought these were included in
> some
> > form or fashion??
> >
> >
> > q:2
> >
> > I found a really cool jar here:
> >
> >
> > http://commons.apache.org/downloads/download_math.cgi
> >
> > This has a ton of interesting analytical functions which would be quite
> > useful.
> > Is there any way in Hive that I can piggyback off of these?
> >
> >
> > Thanks in advance.
> >
> > /tom
> >
> >
> >
>
>
>
> --
> Yours,
> Zheng
>

Re: UDF question(s)

Posted by Zheng Shao <zs...@gmail.com>.
q:1
You need to add hadoop jars and hive jars to your class path.
$HADOOP_HOME/lib/*.jar  $HIVE_HOME/lib/*.jar

q:2
There is a reflection UDF: https://issues.apache.org/jira/browse/HIVE-471
It's not committed so you have to patch the source code yourself.
You may be able to use it together with the analytics functions,
without having to write one UDF for each analytics function.
Note that this only applies if the analytics function takes
primitive-type inputs and produce primitive-type outputs.


Zheng

On Thu, Mar 4, 2010 at 10:33 AM, tom kersnick <hi...@gmail.com> wrote:
> I went to this link:
> http://wiki.apache.org/hadoop/Hive/HivePlugins
>
> q:1
>
> When I try to compile it keeps failing on these:
>
>
> import org.apache.hadoop.hive.ql.exec.UDF;
> import org.apache.hadoop.io.Text;
>
> Im using hive 0.50 with hadoop 20.2.  I thought these were included in some
> form or fashion??
>
>
> q:2
>
> I found a really cool jar here:
>
>
> http://commons.apache.org/downloads/download_math.cgi
>
> This has a ton of interesting analytical functions which would be quite
> useful.
> Is there any way in Hive that I can piggyback off of these?
>
>
> Thanks in advance.
>
> /tom
>
>
>



-- 
Yours,
Zheng