@Override public DistinctCountClientAggregator newClientAggregator() { return new DistinctCountClientAggregator(getAggregatorExpression().getSortOrder()); }
@Override public Aggregator newServerAggregator(Configuration config, ImmutableBytesWritable ptr) { DistinctCountClientAggregator clientAgg = newClientAggregator(); clientAgg.aggregate(null, ptr); return new DistinctValueWithCountServerAggregator(config, clientAgg); } }
@Override public boolean evaluate(Tuple tuple, ImmutableBytesWritable ptr) { if (buffer == null) { initBuffer(); } if (cachedResult != null) { buffer = PLong.INSTANCE.toBytes(cachedResult); } else { buffer = PLong.INSTANCE.toBytes(this.valueVsCount.size()); } ptr.set(buffer); return true; }
@Override public Aggregator newServerAggregator(Configuration config, ImmutableBytesWritable ptr) { DistinctCountClientAggregator clientAgg = newClientAggregator(); clientAgg.aggregate(null, ptr); return new DistinctValueWithCountServerAggregator(config, clientAgg); } }
@Override public DistinctCountClientAggregator newClientAggregator() { return new DistinctCountClientAggregator(getAggregatorExpression().getSortOrder()); }
@Override public boolean evaluate(Tuple tuple, ImmutableBytesWritable ptr) { if (buffer == null) { initBuffer(); } if (cachedResult != null) { buffer = PLong.INSTANCE.toBytes(cachedResult); } else { buffer = PLong.INSTANCE.toBytes(this.valueVsCount.size()); } ptr.set(buffer); return true; }
@Override public Aggregator newServerAggregator(Configuration config, ImmutableBytesWritable ptr) { DistinctCountClientAggregator clientAgg = newClientAggregator(); clientAgg.aggregate(null, ptr); return new DistinctValueWithCountServerAggregator(config, clientAgg); } }
@Override public DistinctCountClientAggregator newClientAggregator() { return new DistinctCountClientAggregator(getAggregatorExpression().getSortOrder()); }
@Override public boolean evaluate(Tuple tuple, ImmutableBytesWritable ptr) { if (buffer == null) { initBuffer(); } if (cachedResult != null) { buffer = PLong.INSTANCE.toBytes(cachedResult); } else { buffer = PLong.INSTANCE.toBytes(this.valueVsCount.size()); } ptr.set(buffer); return true; }