@Override protected void processTuple(InternalCountOutput<V> tuple) { Object key = getKeyFromTuple(tuple); @SuppressWarnings("unchecked") Set<Object> values = (Set<Object>) cacheManager.get(key); if (values == null) { values = Sets.newHashSet(); } values.addAll(tuple.getInternalSet()); cacheManager.put(key, values); }
@Override protected Object getKeyFromTuple(InternalCountOutput<V> tuple) { return tuple.getKey(); }