public void add(T key) {
    addByOne(key);
    if (totalDataCount % bucketSize == 0) {
      // sweep the entries at bucket boundaries
      // run Sweep
      Future<?> future = fut.get();
      if (future != null && !future.isDone()) {
        return;
      }
      future = executor.submit(new SweepRunnable());
      fut.set(future);
    }
  }
LossyCounting utility, bounded data structure that maintains approximate high frequency elements
in data stream. Bucket size is 1 / error rate. (Error rate is 0.02 by default) Lemma If element
does not appear in set, then is frequency is less than e * N (N is total element counts until
now.) Based on paper: http://www.vldb.org/conf/2002/S10P03.pdf
hbase-server/src/main/java/org/apache/hadoop/hbase/util/LossyCounting.java