public Object getLocalValueInVM(final Object key, int bucketId) {
    try {
      BucketRegion br = getInitializedBucketForId(key, bucketId);
      return br.getValueInVM(key);
    } catch (ForceReattemptException e) {
      e.checkKey(key);
      return null;
    }
  }
a fast estimate of total bucket size
geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionDataStore.java