@Override public void execute(Tuple tuple) { Long val = (Long) tuple.getValue(0); collector.emit(new Values(2 * (val + 1))); // increment and double value collector.ack(tuple); }
@Override public void execute(Tuple tuple) { Object key = tuple.getValue(1); Number curr = Utils.get(_sums, key, 0); _sums.put(key, Numbers.add(curr, tuple.getValue(2))); }