Examples of ByteArrayRange


Examples of mil.nga.giat.geowave.index.ByteArrayRange

        normalizedMaxes,
        cardinalityPerDimension,
        query.getDimensionCount());
    return new RangeDecomposition(
        new ByteArrayRange[] {
          new ByteArrayRange(
              new ByteArrayId(
                  minZorder),
              new ByteArrayId(
                  maxZorder))
        });
View Full Code Here

Examples of mil.nga.giat.geowave.index.ByteArrayRange

    final int expectedByteCount = (int) Math.ceil(totalPrecision / 8.0);
    if (expectedByteCount <= 0) {
      // special case for no precision
      return new RangeDecomposition(
          new ByteArrayRange[] {
            new ByteArrayRange(
                new ByteArrayId(
                    new byte[] {}),
                new ByteArrayId(
                    new byte[] {}))
          });
    }
    for (int i = 0; i < hilbertRanges.size(); i++) {
      final FilteredIndexRange<BigIntegerRange, BigIntegerRange> range = hilbertRanges.get(i);
      // sanity check that values fit within the expected range
      // it seems that uzaygezen can produce a value at 2^totalPrecision
      // rather than 2^totalPrecision - 1
      final BigInteger startValue = clamp(
          minHilbertValue,
          maxHilbertValue,
          range.getIndexRange().getStart());
      final BigInteger endValue = clamp(
          minHilbertValue,
          maxHilbertValue,
          range.getIndexRange().getEnd().subtract(BigInteger.ONE));
      // make sure its padded if necessary
      final byte[] start = HilbertSFC.fitExpectedByteCount(
          expectedByteCount,
          startValue.toByteArray());

      // make sure its padded if necessary
      final byte[] end = HilbertSFC.fitExpectedByteCount(
          expectedByteCount,
          endValue.toByteArray());
      sfcRanges[i] = new ByteArrayRange(
          new ByteArrayId(
              start),
          new ByteArrayId(
              end));
    }
View Full Code Here

Examples of mil.nga.giat.geowave.index.ByteArrayRange

          // we're assuming tiers only go to 127 (the max byte
          // value)
          },
          binnedQuery.getBinId());
      for (final ByteArrayRange range : rangeDecomp.getRanges()) {
        queryRanges.add(new ByteArrayRange(
            new ByteArrayId(
                ByteArrayUtils.combineArrays(
                    tierAndBinId,
                    range.getStart().getBytes())),
            new ByteArrayId(
View Full Code Here

Examples of mil.nga.giat.geowave.index.ByteArrayRange

    final int expectedByteCount = (int) Math.ceil(totalPrecision / 8.0);
    if (expectedByteCount <= 0) {
      // special case for no precision
      return new RangeDecomposition(
          new ByteArrayRange[] {
            new ByteArrayRange(
                new ByteArrayId(
                    new byte[] {}),
                new ByteArrayId(
                    new byte[] {}))
          });
    }
    for (int i = 0; i < hilbertRanges.size(); i++) {
      final FilteredIndexRange<LongRange, LongRange> range = hilbertRanges.get(i);
      // sanity check that values fit within the expected range
      // it seems that uzaygezen can produce a value at 2^totalPrecision
      // rather than 2^totalPrecision - 1
      final long startValue = clamp(
          minHilbertValue,
          maxHilbertValue,
          range.getIndexRange().getStart());
      final long endValue = clamp(
          minHilbertValue,
          maxHilbertValue,
          range.getIndexRange().getEnd() - 1);
      // make sure its padded if necessary
      final byte[] start = HilbertSFC.fitExpectedByteCount(
          expectedByteCount,
          ByteBuffer.allocate(
              8).putLong(
              startValue).array());

      // make sure its padded if necessary
      final byte[] end = HilbertSFC.fitExpectedByteCount(
          expectedByteCount,
          ByteBuffer.allocate(
              8).putLong(
              endValue).array());
      sfcRanges[i] = new ByteArrayRange(
          new ByteArrayId(
              start),
          new ByteArrayId(
              end));
    }
View Full Code Here

Examples of mil.nga.giat.geowave.index.ByteArrayRange

    try {
      if ((ranges != null) && (ranges.size() == 1)) {
        scanner = accumuloOperations.createScanner(
            tableName,
            getAdditionalAuthorizations());
        final ByteArrayRange r = ranges.get(0);
        if (r.isSingleValue()) {
          ((Scanner) scanner).setRange(Range.exact(new Text(
              r.getStart().getBytes())));
        }
        else {
          ((Scanner) scanner).setRange(AccumuloUtils.byteArrayRangeToAccumuloRange(r));
        }
        if ((limit != null) && (limit > 0) && (limit < ((Scanner) scanner).getBatchSize())) {
View Full Code Here

Examples of mil.nga.giat.geowave.index.ByteArrayRange

  }

  @Override
  protected List<ByteArrayRange> getRanges() {
    final List<ByteArrayRange> ranges = new ArrayList<ByteArrayRange>();
    ranges.add(new ByteArrayRange(
        row,
        row,
        false));
    return ranges;
  }
View Full Code Here

Examples of mil.nga.giat.geowave.index.ByteArrayRange

  }

  @Override
  protected List<ByteArrayRange> getRanges() {
    final List<ByteArrayRange> ranges = new ArrayList<ByteArrayRange>();
    ranges.add(new ByteArrayRange(
        row,
        row,
        true));
    return ranges;
  }
View Full Code Here

Examples of mil.nga.giat.geowave.index.ByteArrayRange

  @Override
  protected List<ByteArrayRange> getRanges() {
    final List<ByteArrayRange> ranges = new ArrayList<ByteArrayRange>();
    for (ByteArrayId row : rows)
      ranges.add(new ByteArrayRange(
          row,
          row));
    return ranges;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.