public static ByteArrayRange fromRowRange(final GeoWaveRowRange range) { if ((range.getPartitionKey() == null) || (range.getPartitionKey().length == 0)) { final byte[] startKey = (range.getStartSortKey() == null) ? null : range.getStartSortKey(); final byte[] endKey = (range.getEndSortKey() == null) ? null : range.getEndSortKey(); return new ByteArrayRange(startKey, endKey); } else { final byte[] startKey = (range.getStartSortKey() == null) ? range.getPartitionKey() : ArrayUtils.addAll(range.getPartitionKey(), range.getStartSortKey()); final byte[] endKey = (range.getEndSortKey() == null) ? ByteArrayUtils.getNextPrefix(range.getPartitionKey()) : ArrayUtils.addAll(range.getPartitionKey(), range.getEndSortKey()); return new ByteArrayRange(startKey, endKey); } }
Pair.of( next.index, new ByteArray(next.rangeLocationPair.getRange().getPartitionKey()))), currentCardinality, targetCardinality);
private CloseableIterator<T> createIteratorForRecordReader( final RocksDBClient client, final RecordReaderParams recordReaderParams) { final GeoWaveRowRange range = recordReaderParams.getRowRange(); final byte[] startKey = range.isInfiniteStartSortKey() ? null : range.getStartSortKey(); final byte[] stopKey = range.isInfiniteStopSortKey() ? null : range.getEndSortKey(); final SinglePartitionQueryRanges partitionRange = new SinglePartitionQueryRanges( range.getPartitionKey(), Collections.singleton(new ByteArrayRange(startKey, stopKey))); final Set<String> authorizations = Sets.newHashSet(recordReaderParams.getAdditionalAuthorizations()); return createIterator( client, (RangeReaderParams<T>) recordReaderParams, (GeoWaveRowIteratorTransformer<T>) GeoWaveRowIteratorTransformer.NO_OP_TRANSFORMER, Collections.singleton(partitionRange), authorizations, // there should already be sufficient parallelism created by // input splits for record reader use cases false); }
private CloseableIterator<T> createIteratorForRecordReader( final RedissonClient client, final Compression compression, final RecordReaderParams recordReaderParams, final String namespace, final boolean visibilityEnabled) { final GeoWaveRowRange range = recordReaderParams.getRowRange(); final byte[] startKey = range.isInfiniteStartSortKey() ? null : range.getStartSortKey(); final byte[] stopKey = range.isInfiniteStopSortKey() ? null : range.getEndSortKey(); final SinglePartitionQueryRanges partitionRange = new SinglePartitionQueryRanges( range.getPartitionKey(), Collections.singleton(new ByteArrayRange(startKey, stopKey))); final Set<String> authorizations = Sets.newHashSet(recordReaderParams.getAdditionalAuthorizations()); return createIterator( client, compression, (RangeReaderParams<T>) recordReaderParams, (GeoWaveRowIteratorTransformer<T>) GeoWaveRowIteratorTransformer.NO_OP_TRANSFORMER, namespace, Collections.singleton(partitionRange), authorizations, visibilityEnabled, // there should already be sufficient parallelism created by // input splits for record reader use cases false); }
protected void initRecordScanner() { final String tableName = operations.getQualifiedTableName(recordReaderParams.getIndex().getName()); final ArrayList<Short> adapterIds = Lists.newArrayList(); if ((recordReaderParams.getAdapterIds() != null) && (recordReaderParams.getAdapterIds().length > 0)) { for (final Short adapterId : recordReaderParams.getAdapterIds()) { adapterIds.add(adapterId); } } final List<QueryRequest> requests = new ArrayList<>(); final GeoWaveRowRange range = recordReaderParams.getRowRange(); for (final Short adapterId : adapterIds) { final byte[] startKey = range.isInfiniteStartSortKey() ? null : range.getStartSortKey(); final byte[] stopKey = range.isInfiniteStopSortKey() ? null : range.getEndSortKey(); requests.add( getQuery( tableName, range.getPartitionKey(), new ByteArrayRange(startKey, stopKey), adapterId)); } startRead(requests, tableName, recordReaderParams.isClientsideRowMerging(), false); }
statsStore, statsCache, new ByteArray(gwRange.getPartitionKey()), authorizations), gwRange);
protected void initRecordScanner() { final short[] adapterIds = recordReaderParams.getAdapterIds() != null ? recordReaderParams.getAdapterIds() : new short[0]; final GeoWaveRowRange range = recordReaderParams.getRowRange(); final byte[] startKey = range.isInfiniteStartSortKey() ? null : range.getStartSortKey(); final byte[] stopKey = range.isInfiniteStopSortKey() ? null : range.getEndSortKey(); final SinglePartitionQueryRanges partitionRange = new SinglePartitionQueryRanges( range.getPartitionKey(), Collections.singleton(new ByteArrayRange(startKey, stopKey))); final Set<String> authorizations = Sets.newHashSet(recordReaderParams.getAdditionalAuthorizations()); iterator = operations.getBatchedRangeRead( recordReaderParams.getIndex().getName(), adapterIds, Collections.singleton(partitionRange), DataStoreUtils.isMergingIteratorRequired(recordReaderParams, visibilityEnabled), rowTransformer, new ClientVisibilityFilter(authorizations)).results(); }
statsStore, statsCache, new ByteArray(gwRange.getPartitionKey()), authorizations), gwRange);
new RangeLocationPair( new GeoWaveRowRange( rangeLocationPair.getRange().getPartitionKey(), rangeLocationPair.getRange().getStartSortKey(), splitKey, new RangeLocationPair( new GeoWaveRowRange( rangeLocationPair.getRange().getPartitionKey(), rangeLocationPair.getRange().getStartSortKey(), splitKey, new RangeLocationPair( new GeoWaveRowRange( rangeLocationPair.getRange().getPartitionKey(), splitKey, rangeLocationPair.getRange().getEndSortKey(),