@Test public void testLargeRegion() throws Exception { HTable table = mockTable("largeRegion"); HBaseAdmin admin = mockAdmin( mockServer( mockRegion("largeRegion", Integer.MAX_VALUE) ) ); RegionSizeCalculator calculator = new RegionSizeCalculator(table, admin); assertEquals(((long) Integer.MAX_VALUE) * megabyte, calculator.getRegionSize("largeRegion".getBytes())); }
public long getRegionSize(byte[] regionId) { Long size = sizeMap.get(regionId); if (size == null) { LOG.debug("Unknown region:" + Arrays.toString(regionId)); return 0; } else { return size; } }
RegionSizeCalculator { public long getRegionSize(byte[] regionId) { Long size = sizeMap.get(regionId); if (size == null) { LOG.debug("Unknown region:" + Arrays.toString(regionId)); return 0; } else { return size; } } }
RegionSizeCalculator { public long getRegionSize(byte[] regionId) { Long size = sizeMap.get(regionId); if (size == null) { LOG.debug("Unknown region:" + Arrays.toString(regionId)); return 0; } else { return size; } } RegionSizeCalculator(HTable table);   RegionSizeCalculator(HTable table, HBaseAdmin admin); }
RegionSizeCalculator { public long getRegionSize(byte[] regionId) { Long size = sizeMap.get(regionId); if (size == null) { LOG.debug("Unknown region:" + Arrays.toString(regionId)); return 0; } else { return size; } } RegionSizeCalculator(HTable table);   RegionSizeCalculator(HTable table, HBaseAdmin admin); long getRegionSize(byte[] regionId); Map<byte[], Long> getRegionSizeMap(); }
RegionSizeCalculator { public long getRegionSize(byte[] regionId) { Long size = sizeMap.get(regionId); if (size == null) { LOG.debug("Unknown region:" + Arrays.toString(regionId)); return 0; } else { return size; } } RegionSizeCalculator(HTable table);   RegionSizeCalculator(HTable table, HBaseAdmin admin); long getRegionSize(byte[] regionId); Map<byte[], Long> getRegionSizeMap();  }