コード例 #1
0
 /** {@inheritDoc} */
 @Override
 public synchronized void incrAllCounters(AbstractCounters<Counter, CounterGroup> other) {
   for (CounterGroup group : other) {
     for (Counter counter : group) {
       findCounter(group.getName(), counter.getName()).increment(counter.getValue());
     }
   }
 }
コード例 #2
0
  private long calculateFirstIdForReduceOutput(IdSetterKey key) {
    TreeMap<String, Long> tempMap = new TreeMap<String, Long>();

    for (Counter counter : this.counterGroup.getGroup(IdSetterMapper.MAP_COUNTERS)) {
      tempMap.put(counter.getName(), counter.getValue());
    }

    return calculatePreviousLinesInFile(key, tempMap) + 1;
  }