I really think that we're going down the wrong road with this hard-coded
partition-by-prefix thing.

I expect that we will have several different flavors of pre-built compound
key classes.
We will probably have one that takes two Integers, quite possibly one with
an Integer and a String.
There could be an untold number of permutations all of which are handled by
the current way of specifying the classname.
It also eliminates the possibility of having both "partitionByPrefix" and a
"PartitionResolver".

We are introducing an unnecessary API which is introducing YET ANOTHER WAY
of doing something and causing more confusion.

As we are encountering things like both "partitionByPrefix" and a
"PartitionResolver" and how to deal with it I am becoming more and more
convinced that this is a big mistake.


--
Mike Stolz
Principal Engineer, GemFire Product Manager
Mobile: +1-631-835-4771

On Wed, May 31, 2017 at 8:03 PM, Fred Krone (JIRA) <j...@apache.org> wrote:

>
>      [ https://issues.apache.org/jira/browse/GEODE-3005?page=
> com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
>
> Fred Krone updated GEODE-3005:
> ------------------------------
>     Description:
> A user should be able to set partition by prefix programmatically when
> creating a partitioned region.
>
> This can only be done when creating a Region type Partition
>
> Implement:
> PartitionByKey PartitionResolver
> String key parser
> Getters and setters PartitionAttributesFactory
>
>
> Done:
> Code is reviewed and checked in
> Tests are created and pass
>
> Acceptance:
> Partitioned region can be created using new 'partition by prefix'
> attributes (on/off, delimiter)
> Only String keys work -- all other keys throw an error
> A String key without a delimiter is valid -- but will not be colocated
> Providing a key with the correct delimiter routes the entry to the correct
> node
> If partitionByPrefix has been set AND a PartitionResolver is set an
> IllegalArgumentException
> When partition-by-prefix is 'on' AND the user also sets a specific
> partition resolver (an implemented class), partitioning should default to
> the implemented class.
>
>
>
>   was:
> A user should be able to set partition by prefix programmatically when
> creating a partitioned region.
>
> This can only be done when creating a Region type Partition
>
> Implement:
> Cache.xml XSD adding new 'partition by prefix' attribute
> Implement XML parser
>
> Done:
> Code is reviewed and checked in
> Tests are created and pass
>
> Acceptance:
> A partitioned region can be created using with 'partition by prefix' via
> cache.xml
> Only String keys work -- all other keys throw an error
> Providing a key with the correct delimiter routes the entry to the correct
> node
> Providing a key with no delimiter throws an error
> When partition-by-prefix is 'on' AND the user also sets a specific
> partition resolver (an implemented class), partitioning should default to
> the implemented class.
>
>
>
> > A developer can create a Region with Partition by Prefix using Java API
> > -----------------------------------------------------------------------
> >
> >                 Key: GEODE-3005
> >                 URL: https://issues.apache.org/jira/browse/GEODE-3005
> >             Project: Geode
> >          Issue Type: Wish
> >          Components: regions
> >            Reporter: Fred Krone
> >            Assignee: Fred Krone
> >
> > A user should be able to set partition by prefix programmatically when
> creating a partitioned region.
> > This can only be done when creating a Region type Partition
> > Implement:
> > PartitionByKey PartitionResolver
> > String key parser
> > Getters and setters PartitionAttributesFactory
> > Done:
> > Code is reviewed and checked in
> > Tests are created and pass
> > Acceptance:
> > Partitioned region can be created using new 'partition by prefix'
> attributes (on/off, delimiter)
> > Only String keys work -- all other keys throw an error
> > A String key without a delimiter is valid -- but will not be colocated
> > Providing a key with the correct delimiter routes the entry to the
> correct node
> > If partitionByPrefix has been set AND a PartitionResolver is set an
> IllegalArgumentException
> > When partition-by-prefix is 'on' AND the user also sets a specific
> partition resolver (an implemented class), partitioning should default to
> the implemented class.
>
>
>
> --
> This message was sent by Atlassian JIRA
> (v6.3.15#6346)
>

Reply via email to