private void addByOne(T key) {
    // If entry exists, we update the entry by incrementing its frequency by one. Otherwise,
    // we create a new entry starting with currentTerm so that it will not be pruned immediately
    data.put(key, data.getOrDefault(key, currentTerm != 0 ? currentTerm - 1 : 0) + 1);

    // update totalDataCount and term
    totalDataCount++;
    calculateCurrentTerm();
  }
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