[
https://issues.apache.org/jira/browse/GEODE-3027?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16041395#comment-16041395
]
ASF subversion and git services commented on GEODE-3027:
--------------------------------------------------------
Commit 0abaf49333fa0f6a8a908930ed4c9ae9834b0f24 in geode's branch
refs/heads/develop from [~dschneider]
[ https://git-wip-us.apache.org/repos/asf?p=geode.git;h=0abaf49 ]
GEODE-3027: add a simple PartitionResolver
The new PartitionResolver is:
org.apache.geode.cache.util.StringPrefixPartitionResolver
It has a default no-arg constructor and can be configured
on a partitioned region as its PartitionResolver.
It requires that the region it is on to use String keys
and that the key contains at least one "|" delimiter.
The portion of the key that precedes the delimiter,
called the prefix, will
be returned from getRoutingObject and used to partition
the data on the region.
For example if the key is "customer#36|item#45" then it would
be partitioned uisng "customer#36".
This resolver does not allow the prefix string to contain a
delimiter.
> A developer can co-locate two keys on a put
> -------------------------------------------
>
> Key: GEODE-3027
> URL: https://issues.apache.org/jira/browse/GEODE-3027
> Project: Geode
> Issue Type: Improvement
> Components: regions
> Affects Versions: 1.2.0
> Reporter: Fred Krone
> Assignee: Darrel Schneider
> Fix For: 1.2.0
>
>
> Provide a way to put co-locate two keys represented in a delimited string
> "AccountId:OrderId"
> Here ":" is the delimiter. The String before the delimiter is the routing
> key. The String after the delimiter is the simple key.
> Done
> Implement PartitionResolver for delimited String keys.
> Acceptance
> A user configuring a Region with this PartitionResolver implementation gets
> correctly delimited String keys colocated
> Keys can only be Strings or error
> Delimiter is present ":" or error
> Update JavaDocs
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)