byte[] regionEndKey = entry.getRegion().getEndKey(); if ( ! servers.contains(entry) && keyRanges.intersectRegion(regionStartKey, regionEndKey, cacheUsingTable.getIndexType() == IndexType.LOCAL)) {
conn.getQueryServices().getAllTableRegions(Bytes.toBytes("SALT_TEST2900")); for (HRegionLocation regionLocation : regionLocations) { assertTrue(ranges.intersectRegion(regionLocation.getRegion().getStartKey(), regionLocation.getRegion().getEndKey(), false));
@Test public void test() { byte[] lowerInclusiveKey = keyRange.getLowerRange(); if (!keyRange.isLowerInclusive() && !Bytes.equals(lowerInclusiveKey, KeyRange.UNBOUND)) { // This assumes the last key is fixed length, otherwise the results may be incorrect // since there's no terminating 0 byte for a variable length key and thus we may be // incrementing the key too much. lowerInclusiveKey = ByteUtil.nextKey(lowerInclusiveKey); } byte[] upperExclusiveKey = keyRange.getUpperRange(); if (keyRange.isUpperInclusive()) { // This assumes the last key is fixed length, otherwise the results may be incorrect // since there's no terminating 0 byte for a variable length key and thus we may be // incrementing the key too much. upperExclusiveKey = ByteUtil.nextKey(upperExclusiveKey); } assertEquals(expectedResult, scanRanges.intersectRegion(lowerInclusiveKey,upperExclusiveKey,false)); }
@Test public void test() { byte[] lowerInclusiveKey = keyRange.getLowerRange(); if (!keyRange.isLowerInclusive() && !Bytes.equals(lowerInclusiveKey, KeyRange.UNBOUND)) { // This assumes the last key is fixed length, otherwise the results may be incorrect // since there's no terminating 0 byte for a variable length key and thus we may be // incrementing the key too much. lowerInclusiveKey = ByteUtil.nextKey(lowerInclusiveKey); } byte[] upperExclusiveKey = keyRange.getUpperRange(); if (keyRange.isUpperInclusive()) { // This assumes the last key is fixed length, otherwise the results may be incorrect // since there's no terminating 0 byte for a variable length key and thus we may be // incrementing the key too much. upperExclusiveKey = ByteUtil.nextKey(upperExclusiveKey); } assertEquals(expectedResult, scanRanges.intersectRegion(lowerInclusiveKey,upperExclusiveKey,false)); }
regionStartKey = ByteUtil.copyKeyBytesIfNecessary(ptr); if (!prefixScanRanges.intersectRegion(regionStartKey, regionInfo.getEndKey(), false)) { currentKeyBytes = endKey; regionIndex++;
byte[] regionEndKey = entry.getRegion().getEndKey(); if ( ! servers.contains(entry) && keyRanges.intersectRegion(regionStartKey, regionEndKey, cacheUsingTable.getIndexType() == IndexType.LOCAL)) {
byte[] regionEndKey = entry.getRegion().getEndKey(); if ( ! servers.contains(entry) && keyRanges.intersectRegion(regionStartKey, regionEndKey, cacheUsingTable.getIndexType() == IndexType.LOCAL)) {
regionStartKey = ByteUtil.copyKeyBytesIfNecessary(ptr); if (!prefixScanRanges.intersectRegion(regionStartKey, regionInfo.getEndKey(), false)) { currentKeyBytes = endKey; regionIndex++;
regionStartKey = ByteUtil.copyKeyBytesIfNecessary(ptr); if (!prefixScanRanges.intersectRegion(regionStartKey, regionInfo.getEndKey(), false)) { currentKeyBytes = endKey; regionIndex++;