pivotal-jbarrett commented on a change in pull request #150:
URL: https://github.com/apache/geode-benchmarks/pull/150#discussion_r631941866



##########
File path: 
geode-benchmarks/src/main/java/org/apache/geode/benchmark/tasks/CreatePartitionedRegion.java
##########
@@ -27,7 +33,14 @@
 
   @Override
   public void run(TestContext context) throws Exception {
-    Cache cache = (Cache) context.getAttribute("SERVER_CACHE");
-    
cache.createRegionFactory(RegionShortcut.PARTITION_REDUNDANT).create("region");
+    final Cache cache = (Cache) context.getAttribute(SERVER_CACHE);
+    final PartitionAttributes<?, ?> partitionAttributes = new 
PartitionAttributesFactory<>()
+        .setTotalNumBuckets(1 << 8)
+        .setRedundantCopies(1)
+        .create();
+    final Region<?, ?> region = 
cache.createRegionFactory(RegionShortcut.PARTITION_REDUNDANT)
+        .setPartitionAttributes(partitionAttributes)
+        .create("region");
+    PartitionRegionHelper.assignBucketsToPartitions(region);

Review comment:
       Actually, this is a good find. None of this change should be in this PR. 
This was an attempt at a like for like comparison between Geode APIs and Redis 
APIs. I will just be pulling this change out completely.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to