public class Murmur3Partitioner extends java.lang.Object implements IPartitioner
| Modifier and Type | Class and Description |
|---|---|
static class |
Murmur3Partitioner.LongToken |
| Modifier and Type | Field and Description |
|---|---|
static Murmur3Partitioner |
instance |
static long |
MAXIMUM |
static Murmur3Partitioner.LongToken |
MINIMUM |
static AbstractType<?> |
partitionOrdering |
| Constructor and Description |
|---|
Murmur3Partitioner() |
| Modifier and Type | Method and Description |
|---|---|
DecoratedKey |
decorateKey(java.nio.ByteBuffer key)
Transform key to object representation of the on-disk format.
|
java.util.Map<Token,java.lang.Float> |
describeOwnership(java.util.List<Token> sortedTokens)
Calculate the deltas between tokens in the ring in order to compare
relative sizes.
|
Token |
getMaximumToken()
The biggest token for this partitioner, unlike getMinimumToken, this token is actually used and users wanting to
include all tokens need to do getMaximumToken().maxKeyBound()
Not implemented for the ordered partitioners
|
Murmur3Partitioner.LongToken |
getMinimumToken() |
Murmur3Partitioner.LongToken |
getRandomToken() |
Murmur3Partitioner.LongToken |
getRandomToken(java.util.Random r) |
Murmur3Partitioner.LongToken |
getToken(java.nio.ByteBuffer key)
Generate the token of a key.
|
Token.TokenFactory |
getTokenFactory() |
AbstractType<?> |
getTokenValidator() |
Token |
midpoint(Token lToken,
Token rToken)
Calculate a Token representing the approximate "middle" of the given
range.
|
AbstractType<?> |
partitionOrdering()
Abstract type that orders the same way as DecoratedKeys provided by this partitioner.
|
boolean |
preservesOrder() |
Token |
split(Token lToken,
Token rToken,
double ratioToLeft)
Calculate a Token which take approximate 0 <= ratioToLeft <= 1 ownership of the given range.
|
java.util.Optional<Splitter> |
splitter() |
public static final Murmur3Partitioner.LongToken MINIMUM
public static final long MAXIMUM
public static final Murmur3Partitioner instance
public static final AbstractType<?> partitionOrdering
public DecoratedKey decorateKey(java.nio.ByteBuffer key)
IPartitionerdecorateKey in interface IPartitionerkey - the raw, client-facing keypublic Token midpoint(Token lToken, Token rToken)
IPartitionermidpoint in interface IPartitionerpublic Token split(Token lToken, Token rToken, double ratioToLeft)
IPartitionersplit in interface IPartitionerpublic Murmur3Partitioner.LongToken getMinimumToken()
getMinimumToken in interface IPartitionerpublic Murmur3Partitioner.LongToken getToken(java.nio.ByteBuffer key)
getToken in interface IPartitionerpublic Murmur3Partitioner.LongToken getRandomToken()
getRandomToken in interface IPartitionerpublic Murmur3Partitioner.LongToken getRandomToken(java.util.Random r)
getRandomToken in interface IPartitionerr - instance of Random to use when generating the tokenpublic boolean preservesOrder()
preservesOrder in interface IPartitionerpublic java.util.Map<Token,java.lang.Float> describeOwnership(java.util.List<Token> sortedTokens)
IPartitionerdescribeOwnership in interface IPartitionersortedTokens - a sorted List of Tokenspublic Token.TokenFactory getTokenFactory()
getTokenFactory in interface IPartitionerpublic AbstractType<?> getTokenValidator()
getTokenValidator in interface IPartitionerpublic Token getMaximumToken()
IPartitionergetMaximumToken in interface IPartitionerpublic AbstractType<?> partitionOrdering()
IPartitionerpartitionOrdering in interface IPartitionerpublic java.util.Optional<Splitter> splitter()
splitter in interface IPartitionerCopyright © 2018 The Apache Software Foundation