public class XXXCShardSplitHandler extends Object implements ISimpleSplitHandler, Serializable
ContextAdvancer
to skip to the next possible triple without imposing
a "DISTINCT" filter.Constructor and Description |
---|
XXXCShardSplitHandler() |
Modifier and Type | Method and Description |
---|---|
byte[] |
getSeparatorKey(IndexSegment seg,
int fromIndex,
int toIndex,
int splitAt)
Return a separator key which does not split quads for the same triple
prefix.
|
public byte[] getSeparatorKey(IndexSegment seg, int fromIndex, int toIndex, int splitAt)
A "quad" key is formed by an IV[4]
array. For an index whose
last key component is "C" (context), the first three key components
identify some permutation of a triple. This will return a separator key
such that all "quads" for a given triple are on the same shard.
On entry, splitAt will be the index of some quads key. From that
key, this method generates (a) the key corresponding to that triple from
IV[3]
; and (b) the key corresponding to the next triple from
successor(IV[3])
.
The ILinearList.indexOf(byte[])
positions of the two keys are
considered within the index segment. The key is returned whose index
position is closest to the given splitAt index. If neither of
these two keys lies within the allowable half-open range
(fromIndex:toIndex])
then an error message is logged and
null
is returned, indicating that the IndexSegment
should not be split.
getSeparatorKey
in interface ISimpleSplitHandler
seg
- The IndexSegment
containing the data to be split.fromIndex
- The index of the first tuple which may be considered
(inclusive lower bound).toIndex
- The index of the last tuple which may be considered (exclusive
upper bound).splitAt
- The index of the recommended separator key.null
.Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.