@Override public InternalAggregation buildAggregation(long owningBucketOrdinal) throws IOException { SparseFixedBitSet matchingDocs = buckets.get(owningBucketOrdinal); if (matchingDocs == null) return buildEmptyAggregation(); Heatmap heatmap = HeatmapFacetCounter.calcFacets(strategy, parentReaderContext, matchingDocs, inputShape, gridLevel, maxCells); return new InternalGeoHeatmap(name, gridLevel, heatmap.rows, heatmap.columns, heatmap.region.getMinX(), heatmap.region.getMinY(), heatmap.region.getMaxX(), heatmap.region.getMaxY(), heatmap.counts, pipelineAggregators(), metaData()); }
public OffsetGrowableWriter(int startBitsPerValue, int valueCount, float acceptableOverheadRatio, long minimalValue) { super(startBitsPerValue, valueCount, acceptableOverheadRatio); this.minimumValue = minimalValue; this.valuesFilled = new SparseFixedBitSet(valueCount); // reset contents fill(0, valueCount, 0l); }
BulkRequestModifier(BulkRequest bulkRequest) { this.bulkRequest = bulkRequest; this.failedSlots = new SparseFixedBitSet(bulkRequest.requests().size()); this.itemResponses = new ArrayList<>(bulkRequest.requests().size()); }