[
https://issues.apache.org/jira/browse/GEODE-3541?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Swapnil Bawaskar updated GEODE-3541:
------------------------------------
Issue Type: Sub-task (was: New Feature)
Parent: GEODE-2656
> Add GFSH api for creating regions with a FixedPartitionResolver
> ---------------------------------------------------------------
>
> Key: GEODE-3541
> URL: https://issues.apache.org/jira/browse/GEODE-3541
> Project: Geode
> Issue Type: Sub-task
> Components: gfsh
> Reporter: Jared Stewart
>
> From a user:
> I was trying to get a custom partition resolver example working. The way
> geode-examples works is by configuring the servers via gfsh so I used:
> {noformat}create region --name=example-region --type=PARTITION
> --partition-resolver=org.apache.geode.examples.functions.EvenOddPartitionResolver
> --redundant-copies=0{noformat}
> Alas, this didn't work. [Jared: note - this was likely due to
> https://issues.apache.org/jira/browse/GEODE-3460] I found a way to get it to
> work in Java:
> {noformat} PartitionAttributesFactory partitionAttributesFactory = new
> PartitionAttributesFactory();
> partitionAttributesFactory
>
> .addFixedPartitionAttributes(FixedPartitionAttributes.createFixedPartition("ODD",
> 1));
> partitionAttributesFactory
>
> .addFixedPartitionAttributes(FixedPartitionAttributes.createFixedPartition("EVEN",
> 1));
> partitionAttributesFactory.setPartitionResolver(new
> EvenOddPartitionResolver());
> partitionAttributesFactory.setRedundantCopies(1);{noformat}
> It appears that it was necessary to create the fixed partitions for the
> custom partition resolver to find.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)