One way I can think of to make this more strongly typed is to add a SingleAggregateFunction.newServerAggregator(Tuple tuple, ImmutableBytesWritable ptr). The ptr would be a pointer into the bytes of the serialized value for each aggregator. Each derived class could implement this in a type-safe way, since this is the class that knows both the client aggregator and the server aggregator class. The client aggregator would be instantiated initialized with the aggregator.aggregate(tuple, ptr) method. Then the newServerAggregator method would instantiate the correct server aggregator, passing in the client aggregator (a new constructor would be added to each server aggregator). The server aggregator could just directly access the member variables of the client aggregator and assign them to the server aggregator to initialize them (to save deserializing and reserializing again, which is simple for COUNT, but complicated for STDDEV).