org.apache.pig.data
Class SizeUtil

java.lang.Object
  extended by org.apache.pig.data.SizeUtil

@InterfaceAudience.Private
@InterfaceStability.Evolving
public class SizeUtil
extends Object

Utility functions for estimating size of objects of pig types


Constructor Summary
SizeUtil()
           
 
Method Summary
static long getMapEntrySize(Object key, Object value)
           
static long getPigObjMemSize(Object o)
           
static long roundToEight(long i)
          Memory size of objects are rounded to multiple of 8 bytes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SizeUtil

public SizeUtil()
Method Detail

getPigObjMemSize

public static long getPigObjMemSize(Object o)

getMapEntrySize

public static long getMapEntrySize(Object key,
                                   Object value)

roundToEight

public static long roundToEight(long i)
Memory size of objects are rounded to multiple of 8 bytes

Parameters:
i -
Returns:
i rounded to a equal of higher multiple of 8


Copyright © 2007-2012 The Apache Software Foundation