@Test public void testGetInsertionIds() { final List<byte[]> ids = new ArrayList<>(); final byte[][] ids1 = simpleIndexStrategy.getInsertionPartitionKeys(sfcIndexedRange); final int maxEstDuplicatesStrategy2 = 8 / ids1.length; final List<byte[]> ids2 = sfcIndexStrategy.getInsertionIds( sfcIndexedRange, maxEstDuplicatesStrategy2).getCompositeInsertionIds(); for (final byte[] id1 : ids1) { for (final byte[] id2 : ids2) { ids.add(ByteArrayUtils.combineArrays(id1, id2)); } } final Set<ByteArray> testIds = new HashSet<>(ids.stream().map(i -> new ByteArray(i)).collect(Collectors.toList())); final Set<ByteArray> compoundIndexIds = new HashSet<>( compoundIndexStrategy.getInsertionIds( compoundIndexedRange, 8).getCompositeInsertionIds().stream().map(i -> new ByteArray(i)).collect( Collectors.toList())); Assert.assertTrue(testIds.containsAll(compoundIndexIds)); Assert.assertTrue(compoundIndexIds.containsAll(testIds)); }
@Override public InsertionIds getInsertionIds(final MultiDimensionalNumericData indexedData) { return getInsertionIds(indexedData, defaultMaxDuplication); }
CompoundIndexStrategy implements NumericIndexStrategy { @Override public InsertionIds getInsertionIds(final MultiDimensionalNumericData indexedData) { return getInsertionIds(indexedData, defaultMaxDuplication); } }
CompoundIndexStrategy implements NumericIndexStrategy { @Override public InsertionIds getInsertionIds(final MultiDimensionalNumericData indexedData) { return getInsertionIds(indexedData, defaultMaxDuplication); } CompoundIndexStrategy(
      final PartitionIndexStrategy<? extends MultiDimensionalNumericData, ? extends MultiDimensionalNumericData> subStrategy1,
      final NumericIndexStrategy subStrategy2); protected  CompoundIndexStrategy(); }
CompoundIndexStrategy implements NumericIndexStrategy { @Override public InsertionIds getInsertionIds(final MultiDimensionalNumericData indexedData) { return getInsertionIds(indexedData, defaultMaxDuplication); } CompoundIndexStrategy(
      final PartitionIndexStrategy<? extends MultiDimensionalNumericData, ? extends MultiDimensionalNumericData> subStrategy1,
      final NumericIndexStrategy subStrategy2); protected  CompoundIndexStrategy(); PartitionIndexStrategy<MultiDimensionalNumericData, MultiDimensionalNumericData> getPrimarySubStrategy(); NumericIndexStrategy getSecondarySubStrategy(); @Override byte[] toBinary(); @Override void fromBinary(final byte[] bytes); int getNumberOfDimensions(); @Override QueryRanges getQueryRanges(
      final MultiDimensionalNumericData indexedRange,
      final IndexMetaData... hints); @Override QueryRanges getQueryRanges(
      final MultiDimensionalNumericData indexedRange,
      final int maxEstimatedRangeDecomposition,
      final IndexMetaData... hints); @Override InsertionIds getInsertionIds(final MultiDimensionalNumericData indexedData); @Override InsertionIds getInsertionIds(
      final MultiDimensionalNumericData indexedData,
      final int maxEstimatedDuplicateIds); @Override MultiDimensionalNumericData getRangeForId(
      final byte[] partitionKey,
      final byte[] sortKey); @Override MultiDimensionalCoordinates getCoordinatesPerDimension(
      final byte[] partitionKey,
      final byte[] sortKey); @Override NumericDimensionDefinition[] getOrderedDimensionDefinitions(); @Override int hashCode(); @Override boolean equals(final Object obj); @Override String getId(); @Override double[] getHighestPrecisionIdRangePerDimension(); @Override int getPartitionKeyLength(); @Override List<IndexMetaData> createMetaData(); @Override MultiDimensionalCoordinateRanges[] getCoordinateRangesPerDimension(
      final MultiDimensionalNumericData dataRange,
      final IndexMetaData... hints); @Override byte[][] getInsertionPartitionKeys(final MultiDimensionalNumericData insertionData); @Override byte[][] getQueryPartitionKeys(
      final MultiDimensionalNumericData queryData,
      final IndexMetaData... hints); @Override byte[][] getPredefinedSplits(); }
CompoundIndexStrategy implements NumericIndexStrategy { @Override public InsertionIds getInsertionIds(final MultiDimensionalNumericData indexedData) { return getInsertionIds(indexedData, defaultMaxDuplication); } CompoundIndexStrategy(
      final PartitionIndexStrategy<? extends MultiDimensionalNumericData, ? extends MultiDimensionalNumericData> subStrategy1,
      final NumericIndexStrategy subStrategy2); protected  CompoundIndexStrategy(); PartitionIndexStrategy<MultiDimensionalNumericData, MultiDimensionalNumericData> getPrimarySubStrategy(); NumericIndexStrategy getSecondarySubStrategy(); @Override byte[] toBinary(); @Override void fromBinary(final byte[] bytes); int getNumberOfDimensions(); @Override QueryRanges getQueryRanges(
      final MultiDimensionalNumericData indexedRange,
      final IndexMetaData... hints); @Override QueryRanges getQueryRanges(
      final MultiDimensionalNumericData indexedRange,
      final int maxEstimatedRangeDecomposition,
      final IndexMetaData... hints); @Override InsertionIds getInsertionIds(final MultiDimensionalNumericData indexedData); @Override InsertionIds getInsertionIds(
      final MultiDimensionalNumericData indexedData,
      final int maxEstimatedDuplicateIds); @Override MultiDimensionalNumericData getRangeForId(
      final byte[] partitionKey,
      final byte[] sortKey); @Override MultiDimensionalCoordinates getCoordinatesPerDimension(
      final byte[] partitionKey,
      final byte[] sortKey); @Override NumericDimensionDefinition[] getOrderedDimensionDefinitions(); @Override int hashCode(); @Override boolean equals(final Object obj); @Override String getId(); @Override double[] getHighestPrecisionIdRangePerDimension(); @Override int getPartitionKeyLength(); @Override List<IndexMetaData> createMetaData(); @Override MultiDimensionalCoordinateRanges[] getCoordinateRangesPerDimension(
      final MultiDimensionalNumericData dataRange,
      final IndexMetaData... hints); @Override byte[][] getInsertionPartitionKeys(final MultiDimensionalNumericData insertionData); @Override byte[][] getQueryPartitionKeys(
      final MultiDimensionalNumericData queryData,
      final IndexMetaData... hints); @Override byte[][] getPredefinedSplits();  }