ituples.put(key, val.intValue()); ftuples.put(key, val.floatValue()); ltuples.put(key, val.longValue()); stuples.put(key, val.shortValue());
ituples.put(key, val.intValue()); ftuples.put(key, val.floatValue()); ltuples.put(key, val.longValue()); stuples.put(key, val.shortValue());
/** * Emits on all ports that are connected. Data is precomputed during process on input port and endWindow just emits it for each key. Clears the internal data. */ @Override public void endWindow() { for (Map.Entry<K, SumEntry> e: sums.entrySet()) { K key = e.getKey(); SumEntry val = e.getValue(); if (val.changed) { sum.emit(new KeyValPair<K, V>(key, getValue(val.sum.doubleValue()))); sumDouble.emit(new KeyValPair<K, Double>(key, val.sum.doubleValue())); sumInteger.emit(new KeyValPair<K, Integer>(key, val.sum.intValue())); sumFloat.emit(new KeyValPair<K, Float>(key, val.sum.floatValue())); sumShort.emit(new KeyValPair<K, Short>(key, val.sum.shortValue())); sumLong.emit(new KeyValPair<K, Long>(key, val.sum.longValue())); } } clearCache(); }
RegionMetricsStorage.setNumericMetric(e.getKey(), e.getValue().longValue());