You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pig.apache.org by Benjamin Juhn <be...@gmail.com> on 2012/07/27 19:58:41 UTC

Getting the byte size of a map

Do I need to create a udf for this is or is there something out there?

Thanks,
Ben

Re: Getting the byte size of a map

Posted by Harsh J <ha...@cloudera.com>.
Byte size as in the runtime memory size of the map object or its
serialized byte size? Cause the latter can get complex to compute with
different storages and different storage options, right?

Or if you meant a trivial thing such as Map.size(), then nvm.

On Sat, Jul 28, 2012 at 12:35 AM, Jonathan Coveney <jc...@gmail.com> wrote:
> you'd need to make a UDF afaik, though if you dig around there may be code
> that already does this (I'd look at Tuple's implementation of getting its
> own size and see if it has something that does it for maps)
>
> 2012/7/27 Benjamin Juhn <be...@gmail.com>
>
>> Do I need to create a udf for this is or is there something out there?
>>
>> Thanks,
>> Ben
>>



-- 
Harsh J

Re: Getting the byte size of a map

Posted by Jonathan Coveney <jc...@gmail.com>.
you'd need to make a UDF afaik, though if you dig around there may be code
that already does this (I'd look at Tuple's implementation of getting its
own size and see if it has something that does it for maps)

2012/7/27 Benjamin Juhn <be...@gmail.com>

> Do I need to create a udf for this is or is there something out there?
>
> Thanks,
> Ben
>