Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Plain View
Hive >> mail # user >> UDAF terminatePartial structure


+
Ritesh Agrawal 2013-07-29, 22:19
Copy link to this message
-
Re: UDAF terminatePartial structure
I believe a map will be passed correctly from the terminatePartial to the
merge functions.  But it seems a bit of overkill.

Why not define a class within your UDAF which has 4 public data members,
and return instances of that class from terminatePartial()?

Robin
On 7/29/13 3:19 PM, "Ritesh Agrawal" <[EMAIL PROTECTED]> wrote:

>Hi all,
>
>I am writing my first UDAF. In my terminatePartial() function, I need to
>store different data having different data types. Below is a list of
>items that I need to store
>1. C1 : list of doubles
>2. C2: list of doubles
>3. C3: double
>4. Show: list of strings
>
>
>I am wondering can I use simple HashMap and store these different objects
>into it. Will it automatically serialize or will I need to write my own
>serializiable method. Also is there any example of a UDAF that shows how
>to use map type structure for storing partial results.
>
>Thanks
>
>Ritesh
+
Ritesh Agrawal 2013-07-29, 23:32
+
Igor Tatarinov 2013-07-29, 23:37
+
Ritesh Agrawal 2013-07-30, 04:12
+
Robin Morris 2013-07-30, 06:04
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB