private void emitCurrentWindowCounts() {
    Map<Object, Long> counts = counter.getCountsThenAdvanceWindow();
    int actualWindowLengthInSeconds = lastModifiedTracker.secondsSinceOldestModification();
    lastModifiedTracker.markAsModified();

    if (actualWindowLengthInSeconds != windowLengthInSeconds) {
      LOG.warn(
          String.format(
              WINDOW_LENGTH_WARNING_TEMPLATE, actualWindowLengthInSeconds, windowLengthInSeconds));
    }

    emit(counts);
  }
 private void countObjAndAck(Tuple tuple) {
   Object obj = tuple.getValue(0); // in terms of a long value.
   counter.incrementCount(obj);
   collector.ack(tuple);
 }