hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Hadoop Wiki] Update of "Hive/DeveloperGuide/UDTF" by PaulYang
Date Sat, 17 Jul 2010 01:56:06 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Hadoop Wiki" for change notification.

The "Hive/DeveloperGuide/UDTF" page has been changed by PaulYang.
http://wiki.apache.org/hadoop/Hive/DeveloperGuide/UDTF?action=diff&rev1=4&rev2=5

--------------------------------------------------

  
  == GenericUDTF Interface ==
  
- A custom UDTF can be created by extendign the GenericUDTF abstract class then implementing
the {{{initialize}}}, {{{process}}}, and possibly {{{close}}} methods. The {{{initialize}}}
method is called by Hive to notify the UDTF the argument types to expect. The UDTF must then
return an object inspector corresponding to the row objects that the UDTF will generate. Once
{{{initialize()}} has been called, Hive will give rows to the UDTF using the {{{process()}}}
method. While in {{{process()}}}, the UDTF can produce and forward rows to other operators
by calling {{{forward()}}}. Lastly, Hive will call the {{{close()}}} method when all the rows
have processed by the UDTF.
+ A custom UDTF can be created by extendign the GenericUDTF abstract class then implementing
the {{{initialize}}}, {{{process}}}, and possibly {{{close}}} methods. The {{{initialize}}}
method is called by Hive to notify the UDTF the argument types to expect. The UDTF must then
return an object inspector corresponding to the row objects that the UDTF will generate. Once
{{{initialize()}}} has been called, Hive will give rows to the UDTF using the {{{process()}}}
method. While in {{{process()}}}, the UDTF can produce and forward rows to other operators
by calling {{{forward()}}}. Lastly, Hive will call the {{{close()}}} method when all the rows
have processed by the UDTF.
  
  UDTF Example:
  

Mime
View raw message