public interface ISimpleSplitHandler
byte getSeparatorKey(IndexSegment seg, int fromIndex, int toIndex, int splitAt)
nullseparator key is returned, the fromIndex is advanced to the first key GTE the separator key. This process continues until no more splits may be formed, whether because there are not enough tuples remaining to justify a split or because the application has refused a split for the key range by returning
nullfrom this method. To accept the recommended separator key, the application should do
An application may apply a constraint when it provides some guarantee
which would otherwise not be obtained. For example, the
SparseRowStore uses this mechanism to constrain splits such that
a logical row is never split, which gives the
ability to offer ACID operations on logical rows using only local
Applications can implement this constraint in many different ways. For
example: (A) applications can scan forward or backward using an
ITupleCursor looking for an acceptable separatorKey near to the
recommended separatorKey; (B) applications can use the
ILinearList API to probe for a suitable key; or (C) applications
can truncate the recommended separator key in order to obtain a prefix
which will respect some application constraint such as all RDF statements
sharing a common subject.
If the implementation returns
null then it is asserting that
there is no separator key in the half-open range which is acceptable and
therefore that the key-range CAN NOT be split. All tuples in that key
range will therefore go into a single split.
IndexSegmentcontaining 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.
Copyright © 2006–2016 SYSTAP, LLC DBA Blazegraph. All rights reserved.