private void init(RegionLocator regionLocator, Admin admin) throws IOException {
    if (!enabled(admin.getConfiguration())) {
      LOG.info("Region size calculation disabled.");
      return;
    }

    if (regionLocator.getName().isSystemTable()) {
      LOG.info("Region size calculation disabled for system tables.");
      return;
    }

    LOG.info("Calculating region sizes for table \"" + regionLocator.getName() + "\".");

    // Get the servers which host regions of the table
    Set<ServerName> tableServers = getRegionServersOfTable(regionLocator);

    for (ServerName tableServerName : tableServers) {
      for (RegionMetrics regionLoad : admin.getRegionMetrics(tableServerName,
        regionLocator.getName())) {

        byte[] regionId = regionLoad.getRegionName();
        long regionSizeBytes = ((long) (regionLoad.getStoreFileSize().get(Size.Unit.MEGABYTE)
          + regionLoad.getMemStoreSize().get(Size.Unit.MEGABYTE))) * MEGABYTE;

        sizeMap.put(regionId, regionSizeBytes);

        if (LOG.isDebugEnabled()) {
          LOG.debug("Region " + regionLoad.getNameAsString() + " has size " + regionSizeBytes);
        }
      }
    }
    LOG.debug("Region sizes calculated");
  }
Computes size of each region for table and given column families.
hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/RegionSizeCalculator.java