@Override public Tuple next() throws SQLException { // XXX: No access here to the region instance to enclose this with startRegionOperation / // stopRegionOperation synchronized (scanner) { try { // TODO: size List<Cell> results = useQualifierAsIndex ? new EncodedColumnQualiferCellsList(minMaxQualifiers.getFirst(), minMaxQualifiers.getSecond(), encodingScheme) : new ArrayList<Cell>(); // Results are potentially returned even when the return value of s.next is false // since this is an indication of whether or not there are more values after the // ones returned boolean hasMore = scanner.nextRaw(results); if (!hasMore && results.isEmpty()) { return null; } // We instantiate a new tuple because in all cases currently we hang on to it // (i.e. to compute and hold onto the TopN). Tuple tuple = useQualifierAsIndex ? new PositionBasedMultiKeyValueTuple() : new MultiKeyValueTuple(); tuple.setKeyValues(results); return tuple; } catch (IOException e) { throw ServerUtil.parseServerException(e); } } }
@Override public boolean getValue(byte[] family, byte[] qualifier, ImmutableBytesWritable ptr) { Cell kv = getValue(family, qualifier); if (kv == null) return false; ptr.set(kv.getValueArray(), kv.getValueOffset(), kv.getValueLength()); return true; } }
boolean atLimit; boolean aggBoundary = false; Tuple result = useQualifierAsIndex ? new PositionBasedMultiKeyValueTuple() : new MultiKeyValueTuple(); ImmutableBytesPtr key = null; Aggregator[] rowAggregators = aggregators.getAggregators();
@Override public boolean getValue(byte[] family, byte[] qualifier, ImmutableBytesWritable ptr) { Cell kv = getValue(family, qualifier); if (kv == null) return false; ptr.set(kv.getValueArray(), kv.getValueOffset(), kv.getValueLength()); return true; } }
boolean atLimit; boolean aggBoundary = false; Tuple result = useQualifierAsIndex ? new PositionBasedMultiKeyValueTuple() : new MultiKeyValueTuple(); ImmutableBytesPtr key = null; Aggregator[] rowAggregators = aggregators.getAggregators();
@Override public boolean getValue(byte[] family, byte[] qualifier, ImmutableBytesWritable ptr) { Cell kv = getValue(family, qualifier); if (kv == null) return false; ptr.set(kv.getValueArray(), kv.getValueOffset(), kv.getValueLength()); return true; } }
try { boolean hasMore; Tuple result = useQualifierAsIndex ? new PositionBasedMultiKeyValueTuple() : new MultiKeyValueTuple(); if (logger.isDebugEnabled()) { logger.debug(LogUtil.addCustomAnnotations("Spillable groupby enabled: " + spillableEnabled, ScanUtil.getCustomAnnotations(scan)));
rowAggregators = aggregators.getAggregators(); Pair<Integer, Integer> minMaxQualifiers = EncodedColumnsUtil.getMinMaxQualifiersFromScan(scan); Tuple result = useQualifierAsIndex ? new PositionBasedMultiKeyValueTuple() : new MultiKeyValueTuple(); if (logger.isDebugEnabled()) { logger.debug(LogUtil.addCustomAnnotations("Starting ungrouped coprocessor scan " + scan + " "+region.getRegionInfo(), ScanUtil.getCustomAnnotations(scan)));
@Override public Tuple next() throws SQLException { // XXX: No access here to the region instance to enclose this with startRegionOperation / // stopRegionOperation synchronized (scanner) { try { // TODO: size List<Cell> results = useQualifierAsIndex ? new EncodedColumnQualiferCellsList(minMaxQualifiers.getFirst(), minMaxQualifiers.getSecond(), encodingScheme) : new ArrayList<Cell>(); // Results are potentially returned even when the return value of s.next is false // since this is an indication of whether or not there are more values after the // ones returned boolean hasMore = scanner.nextRaw(results); if (!hasMore && results.isEmpty()) { return null; } // We instantiate a new tuple because in all cases currently we hang on to it // (i.e. to compute and hold onto the TopN). Tuple tuple = useQualifierAsIndex ? new PositionBasedMultiKeyValueTuple() : new MultiKeyValueTuple(); tuple.setKeyValues(results); return tuple; } catch (IOException e) { throw ServerUtil.parseServerException(e); } } }
@Override public Tuple next() throws SQLException { // XXX: No access here to the region instance to enclose this with startRegionOperation / // stopRegionOperation synchronized (scanner) { try { // TODO: size List<Cell> results = useQualifierAsIndex ? new EncodedColumnQualiferCellsList(minMaxQualifiers.getFirst(), minMaxQualifiers.getSecond(), encodingScheme) : new ArrayList<Cell>(); // Results are potentially returned even when the return value of s.next is false // since this is an indication of whether or not there are more values after the // ones returned boolean hasMore = scanner.nextRaw(results); if (!hasMore && results.isEmpty()) { return null; } // We instantiate a new tuple because in all cases currently we hang on to it // (i.e. to compute and hold onto the TopN). Tuple tuple = useQualifierAsIndex ? new PositionBasedMultiKeyValueTuple() : new MultiKeyValueTuple(); tuple.setKeyValues(results); return tuple; } catch (IOException e) { throw ServerUtil.parseServerException(e); } } }
boolean atLimit; boolean aggBoundary = false; Tuple result = useQualifierAsIndex ? new PositionBasedMultiKeyValueTuple() : new MultiKeyValueTuple(); ImmutableBytesPtr key = null; Aggregator[] rowAggregators = aggregators.getAggregators();
boolean atLimit; boolean aggBoundary = false; Tuple result = useQualifierAsIndex ? new PositionBasedMultiKeyValueTuple() : new MultiKeyValueTuple(); ImmutableBytesPtr key = null; Aggregator[] rowAggregators = aggregators.getAggregators();
boolean atLimit; boolean aggBoundary = false; Tuple result = useQualifierAsIndex ? new PositionBasedMultiKeyValueTuple() : new MultiKeyValueTuple(); ImmutableBytesPtr key = null; Aggregator[] rowAggregators = aggregators.getAggregators();
try { boolean hasMore; Tuple result = useQualifierAsIndex ? new PositionBasedMultiKeyValueTuple() : new MultiKeyValueTuple(); if (logger.isDebugEnabled()) { logger.debug(LogUtil.addCustomAnnotations("Spillable groupby enabled: " + spillableEnabled, ScanUtil.getCustomAnnotations(scan)));
boolean atLimit; boolean aggBoundary = false; Tuple result = useQualifierAsIndex ? new PositionBasedMultiKeyValueTuple() : new MultiKeyValueTuple(); ImmutableBytesPtr key = null; Aggregator[] rowAggregators = aggregators.getAggregators();
try { boolean hasMore; Tuple result = useQualifierAsIndex ? new PositionBasedMultiKeyValueTuple() : new MultiKeyValueTuple(); if (logger.isDebugEnabled()) { logger.debug(LogUtil.addCustomAnnotations("Spillable groupby enabled: " + spillableEnabled, ScanUtil.getCustomAnnotations(scan)));
rowAggregators = aggregators.getAggregators(); Pair<Integer, Integer> minMaxQualifiers = EncodedColumnsUtil.getMinMaxQualifiersFromScan(scan); Tuple result = useQualifierAsIndex ? new PositionBasedMultiKeyValueTuple() : new MultiKeyValueTuple(); if (logger.isDebugEnabled()) { logger.debug(LogUtil.addCustomAnnotations("Starting ungrouped coprocessor scan " + scan + " "+region.getRegionInfo(), ScanUtil.getCustomAnnotations(scan)));
rowAggregators = aggregators.getAggregators(); Pair<Integer, Integer> minMaxQualifiers = EncodedColumnsUtil.getMinMaxQualifiersFromScan(scan); Tuple result = useQualifierAsIndex ? new PositionBasedMultiKeyValueTuple() : new MultiKeyValueTuple(); if (logger.isDebugEnabled()) { logger.debug(LogUtil.addCustomAnnotations("Starting ungrouped coprocessor scan " + scan + " "+region.getRegionInfo(), ScanUtil.getCustomAnnotations(scan)));