Yes you can compile it into a jar, and insert the command line "java
/xxx/my.jar" into Hive queries.

http://www.slideshare.net/ragho/hive-user-meeting-august-2009-facebook
Page 72 has an example

IF your map/reduce function is simple, you can probably write a Hive
UDF instead.
In the near future, Hive will support UDTF and you can write a UDTF
for any map/reduce function. This will make it more efficient than the
current way (running "java /xxx/my.jar").


Zheng

2009/11/13 Gang Luo <[email protected]>:
> Hi all,
> It is said that we can plug our own map/reduce into hive. I got two
> questions here.
> 1) Can I write this 'script' in Java? If so, should I compile it and make it
> into a jar file first?
> 2) Should I load this script file into HDFS first?
>
> Thanks.
>
> --Gang
>
> ________________________________
> 好玩贺卡等你发,邮箱贺卡全新上线!



-- 
Yours,
Zheng

Reply via email to