public static void assignBucketsToPartitions(Region<?,?> region){
  PartitionedRegion pr=isPartitionedCheck(region);
  RecoveryLock lock=null;
  try {
    lock=pr.getRecoveryLock();
    lock.lock();
    for (int i=0; i < getNumberOfBuckets(pr); i++) {
      pr.createBucket(i,0,null);
    }
  }
  finally {
    if (lock != null) {
      lock.unlock();
    }
  }
}

public static void assignBucketsToPartitions ( Region < ? , ? > region ) { PartitionedRegion pr = isPartitionedCheck ( region ) ; RecoveryLock lock = null ; try { lock = pr . getRecoveryLock ( ) ; lock . lock ( ) ; for ( int i = 0 ; i < getNumberOfBuckets ( pr ) ; i ++ ) { pr . createBucket ( i , 0 , null ) ; } } finally { if ( lock != null ) { lock . unlock ( ) ; } } }
decide which partitions will host which buckets . gemfire normally assigns buckets to partitions as needed when data is added to a partitioned region . this method provides way to assign all of the buckets without putting any data in partition region . this method should not be called until all of the partitions are running because it will divide the buckets between the running partitions . if the buckets are already assigned this method will have no effect . this method will block until all buckets are assigned .
