Created
October 8, 2009 23:43
-
-
Save joestump/205537 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I started working on an EmailAddressPartitioner that sorts user@example.com as com.example@user, | |
but I'm confused what the role of Token objects is supposed to be. The Token classes have | |
essentially no javadoc and classes that use them seem to assume you know exactly how Tokens fit | |
into everything. Should the token be (essentially) the decorated key? What's the meaning of the | |
default token? Existing implementations use a random value if the config file doesn't specify | |
anything, so I assume the default token doesn't have to correspond to an actual key. | |
It looks like the midpoint method does the important work, but it's not clear exactly what semantics | |
are desired. If I'm partitioning keys that map to Strings, is there a reason to not use the | |
OrderPreservingPartitioner's implementation? That is, is there any semantic meaning to the result | |
of midpoint(), or is it data agnostic? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment