hadoop-pig-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benjamin Reed <br...@yahoo-inc.com>
Subject Re: DataAtom#getMemorySize
Date Wed, 19 Mar 2008 22:41:35 GMT
That method is supposed to return the in-memory footprint. Strings are stored 
as chars which are 2 bytes each. getBytes() will return a byte array of a 
particular encoding, plus it would allocate more memory.

ben

On Wednesday 19 March 2008 14:20:23 Stefan Groschupf wrote:
> Hi,
> I do not understand the DataAtom#getMemorySize.
> Can someone explain me what is this all about?
> Wouldn't stringVal.getBytes().length be more accurate?
>
> Thanks.
> Stefan
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 101tec Inc.
> Menlo Park, California, USA
> http://www.101tec.com



Mime
View raw message