Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

ignore null values in MultiReducedMetric

  • Loading branch information...
commit 99153f9374a213b268ac028c04a7ad9f42cb9f14 1 parent 5b62dc5
Jason Jackson authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/jvm/backtype/storm/metric/api/MultiReducedMetric.java
View
5 src/jvm/backtype/storm/metric/api/MultiReducedMetric.java
@@ -23,7 +23,10 @@ public ReducedMetric scope(String key) {
public Object getValueAndReset() {
Map ret = new HashMap();
for(Map.Entry<String, ReducedMetric> e : _value.entrySet()) {
- ret.put(e.getKey(), e.getValue().getValueAndReset());
+ Object val = e.getValue().getValueAndReset();
+ if(val != null) {
+ ret.put(e.getKey(), val);
+ }
}
return ret;
}
Please sign in to comment.
Something went wrong with that request. Please try again.