if (!isSorted()) {
throw new IOException(
"Cannot get key-bounded scanner for unsorted table");
}
RawComparable begin =
(beginKey != null) ? new ByteArray(beginKey.get(), 0, beginKey
.getSize()) : null;
RawComparable end =
(endKey != null) ? new ByteArray(endKey.get(), 0, endKey.getSize())
: null;
if (begin != null && end != null) {
if (comparator.compare(begin, end) >= 0) {
throw new IOException("Zero-key-range split");
}