public static int getBucketId(String bucketName) {
    // bucketName = _B_PRNAME_10
    int bidSepIdx = bucketName.lastIndexOf(PartitionedRegion.BUCKET_NAME_SEPARATOR);
    String bid = bucketName.substring(bidSepIdx + 1);
    return Integer.parseInt(bid);
  }
Returns the bucket id gvien the bucketName (see getBucketName).
geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionHelper.java