question: 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 ( ) ; } } }
target:  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.