geode-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karen Smoler Miller (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (GEODE-3541) Add GFSH api for creating regions with a FixedPartitionResolver
Date Fri, 27 Oct 2017 23:04:00 GMT

     [ https://issues.apache.org/jira/browse/GEODE-3541?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Karen Smoler Miller updated GEODE-3541:
---------------------------------------
    Component/s: docs

> 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: docs, 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)

Mime
View raw message