Design a log aggregation service to show the top N errors within a given time period. The time period and N is specified by the caller on each request.
E.g. getTop(int topCount, start_time, end_time)
How would you design this system?