public interface ISplitter
Split
s for an ordered set of unsigned
byte[] keys. Each key MUST be fully specified, e.g., point lookup. This
algorithm does NOT handle cases where multiple partitions must be scanned
because they share the same prefix as the key.
The splitter processes the keys in order. It queries the
IMetadataIndex
for the partition spanning the first key. It then
places all keys spanned by that partition into that split. When it reaches
the first key which is GTE the rightSeparator, it queries the MDI for that
key. Index partition Split, Move and Joins should not be able to cause a
problem for this algorithm. At the worst, some tuples will be directed to a
stale locator and the stale locator exception is handled.
The split operation is not atomic, however it is consistent in the following
sense. Any identified Split
s will either be for a valid index
partition, for a partition of an index which has been deleted, or for an
index partition which has since been split, joined or moved. In the latter
case a StaleLocatorException
will be thrown if the client attempts an
operation on the unisolated view of that index partition. All clients know
how to handle that exception and redirect the request as appropriate.
Modifier and Type | Method and Description |
---|---|
LinkedList<Split> |
splitKeys(long ts,
int fromIndex,
int toIndex,
byte[][] keys)
|
LinkedList<Split> |
splitKeys(long ts,
int fromIndex,
int toIndex,
KVO[] a)
|
LinkedList<Split> splitKeys(long ts, int fromIndex, int toIndex, byte[][] keys)
Split
s for an ordered array of keys such that there
is one Split
per index partition spanned by the data.ts
- The timestamp for the IMetadataIndex
view that will be
applied to choose the Split
s.fromIndex
- The index of the first key in keys to be processed
(inclusive).toIndex
- The index of the last key in keys to be processed.keys
- An array of keys. Each key is an interpreted as an unsigned
byte[] which fully specifies the desired tuple (no prefix
scans). All keys must be non-null. The keys must be in sorted
order.Split
s that you can use to form requests based on the
identified first/last key and partition identified by this
process.LinkedList<Split> splitKeys(long ts, int fromIndex, int toIndex, KVO[] a)
Split
s for an ordered KVO
[] such that there
is one Split
per index partition spanned by the data.ts
- The timestamp for the IMetadataIndex
view that will be
applied to choose the Split
s.fromIndex
- The index of the first key in keys to be processed
(inclusive).toIndex
- The index of the last key in keys to be processed.keys
- An array of keys. Each key is an interpreted as an unsigned
byte[] which fully specifies the desired tuple (no prefix
scans). All keys must be non-null. The keys must be in sorted
order.Split
s that you can use to form requests based on the
identified first/last key and partition identified by this
process.Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.