public GTStreamAggregateScanner(IGTScanner delegated, GTScanRequest scanRequest) { super(delegated); this.req = Preconditions.checkNotNull(scanRequest, "scanRequest"); this.keyComparator = GTRecord.getComparator(scanRequest.getAggrGroupBy()); }
public StorageResponseGTScatter(GTScanRequest scanRequest, IPartitionStreamer partitionStreamer, StorageContext context) { this.info = scanRequest.getInfo(); this.partitionStreamer = partitionStreamer; this.blocks = partitionStreamer.asByteArrayIterator(); this.columns = scanRequest.getColumns(); this.groupByDims = scanRequest.getAggrGroupBy(); this.needSorted = (context.getFinalPushDownLimit() != Integer.MAX_VALUE) || context.isStreamAggregateEnabled(); }
public GTAggregateScanner(IGTScanner input, GTScanRequest req, boolean spillEnabled) { if (!req.hasAggregation()) throw new IllegalStateException(); if (input instanceof GTFilterScanner) { logger.info("setting IGTBypassChecker of child"); ((GTFilterScanner) input).setChecker(this); } else { logger.info("applying a GTFilterScanner with IGTBypassChecker on top child"); input = new GTFilterScanner(input, null, this); } this.inputScanner = input; this.info = this.inputScanner.getInfo(); this.dimensions = req.getDimensions(); this.groupBy = req.getAggrGroupBy(); this.metrics = req.getAggrMetrics(); this.metricsAggrFuncs = req.getAggrMetricsFuncs(); this.measureCodec = req.createMeasureCodec(); this.spillThreshold = (long) (req.getAggCacheMemThreshold() * MemoryBudgetController.ONE_GB); this.aggrMask = new boolean[metricsAggrFuncs.length]; this.storagePushDownLimit = req.getStoragePushDownLimit(); this.storageLimitLevel = req.getStorageLimitLevel(); this.spillEnabled = spillEnabled; this.havingFilter = req.getHavingFilterPushDown(); this.aggrCache = new AggregationCache(); Arrays.fill(aggrMask, true); }
BytesUtil.writeByteArray( GTUtil.serializeGTFilter(scanRequest.getFilterPushDown(), scanRequest.getInfo()), out); ImmutableBitSet.serializer.serialize(scanRequest.getAggrGroupBy(), out); ImmutableBitSet.serializer.serialize(scanRequest.getAggrMetrics(), out); BytesUtil.writeAsciiStringArray(scanRequest.getAggrMetricsFuncs(), out);
public GTStreamAggregateScanner(IGTScanner delegated, GTScanRequest scanRequest) { super(delegated); this.req = Preconditions.checkNotNull(scanRequest, "scanRequest"); this.keyComparator = GTRecord.getComparator(scanRequest.getAggrGroupBy()); }
public StorageResponseGTScatter(GTScanRequest scanRequest, IPartitionStreamer partitionStreamer, StorageContext context) { this.info = scanRequest.getInfo(); this.partitionStreamer = partitionStreamer; this.blocks = partitionStreamer.asByteArrayIterator(); this.columns = scanRequest.getColumns(); this.groupByDims = scanRequest.getAggrGroupBy(); this.needSorted = (context.getFinalPushDownLimit() != Integer.MAX_VALUE) || context.isStreamAggregateEnabled(); }
public GTAggregateScanner(IGTScanner input, GTScanRequest req, boolean spillEnabled) { if (!req.hasAggregation()) throw new IllegalStateException(); if (input instanceof GTFilterScanner) { logger.info("setting IGTBypassChecker of child"); ((GTFilterScanner) input).setChecker(this); } else { logger.info("applying a GTFilterScanner with IGTBypassChecker on top child"); input = new GTFilterScanner(input, null, this); } this.inputScanner = input; this.info = this.inputScanner.getInfo(); this.dimensions = req.getDimensions(); this.groupBy = req.getAggrGroupBy(); this.metrics = req.getAggrMetrics(); this.metricsAggrFuncs = req.getAggrMetricsFuncs(); this.measureCodec = req.createMeasureCodec(); this.spillThreshold = (long) (req.getAggCacheMemThreshold() * MemoryBudgetController.ONE_GB); this.aggrMask = new boolean[metricsAggrFuncs.length]; this.storagePushDownLimit = req.getStoragePushDownLimit(); this.storageLimitLevel = req.getStorageLimitLevel(); this.spillEnabled = spillEnabled; this.havingFilter = req.getHavingFilterPushDown(); this.aggrCache = new AggregationCache(); Arrays.fill(aggrMask, true); }
BytesUtil.writeByteArray( GTUtil.serializeGTFilter(scanRequest.getFilterPushDown(), scanRequest.getInfo()), out); ImmutableBitSet.serializer.serialize(scanRequest.getAggrGroupBy(), out); ImmutableBitSet.serializer.serialize(scanRequest.getAggrMetrics(), out); BytesUtil.writeAsciiStringArray(scanRequest.getAggrMetricsFuncs(), out);