public BucketRegion getBucketRegion(Object key, Object value) {
    if (dataStore == null) {
      return null;
    }
    final Integer bucketId = PartitionedRegionHelper.getHashKey(this, null, key, value, null);
    return dataStore.getLocalBucketById(bucketId);
  }
Returns the local BucketRegion given the key and value. Returns null if no BucketRegion exists.
geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegion.java