@Override public int getSize() { return super.getSize() + SizedUtil.LONG_SIZE + SizedUtil.ARRAY_SIZE + getBufferLength(); }
@Override public int getSize() { return super.getSize() + SizedUtil.ARRAY_SIZE + countMapHeapSize(); }
@Override public Aggregator newClientAggregator() { FirstLastValueBaseClientAggregator aggregator = new FirstLastValueBaseClientAggregator(); aggregator.init(0, false); return aggregator; }
@Override public Aggregator[] aggregate(Tuple result) { Aggregator[] rowAggregators = aggregators.getAggregators(); aggregators.reset(rowAggregators); aggregators.aggregate(rowAggregators, result); return rowAggregators; }
@Override public Aggregator newServerAggregator(Configuration config, ImmutableBytesWritable ptr) { LongSumAggregator sumAgg = newClientAggregator(); sumAgg.aggregate(null, ptr); return new CountAggregator(sumAgg); } }
@Override public Aggregator newServerAggregator(Configuration config, ImmutableBytesWritable ptr) { DistinctCountClientAggregator clientAgg = newClientAggregator(); clientAgg.aggregate(null, ptr); return new DistinctValueWithCountServerAggregator(config, clientAgg); } }
@Override public int getSize() { return super.getSize() + SizedUtil.BIG_DECIMAL_SIZE + SizedUtil.ARRAY_SIZE + getDataType().getByteSize(); } }
@Override public void reset() { sum = 0; buffer = null; super.reset(); }
@Override public Aggregator newServerAggregator(Configuration conf) { return new DistinctValueWithCountServerAggregator(conf); }
protected static int calculateSize(Aggregator[] aggregators) { int size = SizedUtil.ARRAY_SIZE /*aggregators[]*/ + (SizedUtil.POINTER_SIZE * aggregators.length); for (Aggregator aggregator : aggregators) { size += aggregator.getSize(); } return size; }
public CountAggregator(LongSumAggregator clientAgg) { this(); count = clientAgg.getSum(); }
@Override public int getSize() { return super.getSize() + /*value*/ SizedUtil.IMMUTABLE_BYTES_WRITABLE_SIZE; }
public void reset(Aggregator[] aggregators) { for (int i = 0; i < aggregators.length; i++) { aggregators[i].reset(); } }
@Override public Aggregator[] aggregate(Tuple result) { Aggregator[] rowAggregators = aggregators.getAggregators(); aggregators.reset(rowAggregators); aggregators.aggregate(rowAggregators, result); return rowAggregators; }
@Override public Aggregator newClientAggregator() { FirstLastValueBaseClientAggregator aggregator = new FirstLastValueBaseClientAggregator(); aggregator.init(0, false); return aggregator; }
@Override public void reset() { count = 0; buffer = null; super.reset(); }
@Override public Aggregator newServerAggregator(Configuration conf) { return new DistinctValueWithCountServerAggregator(conf); }
@Override public Aggregator[] aggregate(Tuple result) { Aggregator[] rowAggregators = aggregators.getAggregators(); aggregators.reset(rowAggregators); aggregators.aggregate(rowAggregators, result); return rowAggregators; } }
@Override public void reset() { sum = BigDecimal.ZERO; sumBuffer = null; super.reset(); }
@Override public Aggregator newServerAggregator(Configuration conf) { return new DistinctValueWithCountServerAggregator(conf); }