public void assignBucketRegion(int bucketId, BucketRegion bukReg) {
    final Object oldbukReg =
        localBucket2RegionMap.putIfAbsent(bucketId, bukReg);
    if (logger.isDebugEnabled()) {
      logger.debug("assigning bucket {} old assignment: {}", bukReg, oldbukReg);
    }
    Assert.assertTrue(oldbukReg == null);
  }
This method creates bucket regions, based on redundancy level. If redundancy level is: a) = 1
it creates a local region b) >1 it creates a distributed region

@return @throws CacheException
geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionDataStore.java