org.apache.hadoop.hbase.util
Class RegionSizeCalculator

java.lang.Object
  extended by org.apache.hadoop.hbase.util.RegionSizeCalculator

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

Computes size of each region for given table and given column families. The value is used by MapReduce for better scheduling.


Constructor Summary
RegionSizeCalculator(HTable table)
          Computes size of each region for table and given column families.
 
Method Summary
 long getRegionSize(byte[] regionId)
          Returns size of given region in bytes.
 Map<byte[],Long> getRegionSizeMap()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegionSizeCalculator

public RegionSizeCalculator(HTable table)
                     throws IOException
Computes size of each region for table and given column families.

Throws:
IOException
Method Detail

getRegionSize

public long getRegionSize(byte[] regionId)
Returns size of given region in bytes. Returns 0 if region was not found.


getRegionSizeMap

public Map<byte[],Long> getRegionSizeMap()


Copyright © 2007–2016 The Apache Software Foundation. All rights reserved.