public static int getBitPositionOnSortKeyFromSubsamplingArray( final NumericIndexStrategy indexStrategy, final double[] maxResolutionSubsamplingPerDimension) { return (int) Math.round( getDimensionalBitsUsed(indexStrategy, maxResolutionSubsamplingPerDimension)); }
@Override public byte[][] getInsertionPartitionKeys(final MultiDimensionalNumericData insertionData) { return IndexUtils.getInsertionPartitionKeys(this, insertionData); }
@Override public byte[][] getQueryPartitionKeys( final MultiDimensionalNumericData queryData, final IndexMetaData... hints) { return IndexUtils.getQueryPartitionKeys(this, queryData, hints); } }
inflateRange(cellRangePerDimension, dataRangePerDimension); final double bitsPerDimension[] = getBitsPerDimension(indexStrategy, cellRangePerDimension); getBinsPerDimension(indexStrategy, inflatedRangePerDimension); final double[][] bitsFromTheRightPerDimension = getBitsFromTheRightPerDimension(binsPerDimension, cellRangePerDimension);
if (IndexUtils.isFullTableScan(queryRanges)) { IndexUtils.getDimensionalBitsUsed( nextIdx.getIndexStrategy(), dataRangePerDimension);
private void initializeBitPosition(final double[] maxResolutionSubsamplingPerDimension) { if ((maxResolutionSubsamplingPerDimension != null) && (maxResolutionSubsamplingPerDimension.length > 0)) { bitPosition = IndexUtils.getBitPositionOnSortKeyFromSubsamplingArray( index.getIndexStrategy(), maxResolutionSubsamplingPerDimension); } } }
private void getNextRowKey(final Cell currentCell) { final byte[] row = CellUtil.cloneRow(currentCell); nextRow = IndexUtils.getNextRowForSkip(row, bitPosition); }
public static MultiDimensionalNumericData getFullBounds( final NumericIndexStrategy indexStrategy) { return getFullBounds(indexStrategy.getOrderedDimensionDefinitions()); }
private void addSkipFilter(final RangeReaderParams<T> params, final FilterList filterList) { // Add skipping filter if requested if (params.getMaxResolutionSubsamplingPerDimension() != null) { if (params.getMaxResolutionSubsamplingPerDimension().length != params.getIndex().getIndexStrategy().getOrderedDimensionDefinitions().length) { LOGGER.warn( "Unable to subsample for table '" + params.getIndex().getName() + "'. Subsample dimensions = " + params.getMaxResolutionSubsamplingPerDimension().length + " when indexed dimensions = " + params.getIndex().getIndexStrategy().getOrderedDimensionDefinitions().length); } else { final int cardinalityToSubsample = IndexUtils.getBitPositionFromSubsamplingArray( params.getIndex().getIndexStrategy(), params.getMaxResolutionSubsamplingPerDimension()); final FixedCardinalitySkippingFilter skippingFilter = new FixedCardinalitySkippingFilter(cardinalityToSubsample); filterList.addFilter(skippingFilter); } } }
final int currentDimensionCount = nextIdx.getIndexStrategy().getOrderedDimensionDefinitions().length; if (IndexUtils.isFullTableScan(queryRanges) || !queryRangeDimensionsMatch(currentDimensionCount, queryRanges)) { IndexUtils.getDimensionalBitsUsed( nextIdx.getIndexStrategy(), dataRangePerDimension);
public static int getBitPositionFromSubsamplingArray( final NumericIndexStrategy indexStrategy, final double[] maxResolutionSubsamplingPerDimension) { return getBitPositionOnSortKeyFromSubsamplingArray( indexStrategy, maxResolutionSubsamplingPerDimension) + (8 * indexStrategy.getPartitionKeyLength()); }
private void incrementSkipRow(final GeoWaveRow row) { if (bitPosition != null) { final byte[] nextRow = IndexUtils.getNextRowForSkip(row.getSortKey(), bitPosition); if (nextRow == null) { reachedEnd = true; } else { skipUntilRow = new ByteArray(nextRow); } } }
@Override public byte[][] getQueryPartitionKeys( final MultiDimensionalNumericData queryData, final IndexMetaData... hints) { return IndexUtils.getQueryPartitionKeys(this, queryData, hints); } }
@Override public byte[][] getInsertionPartitionKeys(final MultiDimensionalNumericData insertionData) { return IndexUtils.getInsertionPartitionKeys(this, insertionData); }
@Override public byte[][] getQueryPartitionKeys( final MultiDimensionalNumericData queryData, final IndexMetaData... hints) { return IndexUtils.getQueryPartitionKeys(this, queryData, hints); } }
@Override public byte[][] getInsertionPartitionKeys(final MultiDimensionalNumericData insertionData) { return IndexUtils.getInsertionPartitionKeys(this, insertionData); }