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