You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@storm.apache.org by bo...@apache.org on 2014/05/06 17:13:26 UTC

[1/4] git commit: Add Null Check before registering a metric.

Repository: incubator-storm
Updated Branches:
  refs/heads/master 22215b582 -> a0876291a


Add Null Check before registering a metric.


Project: http://git-wip-us.apache.org/repos/asf/incubator-storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-storm/commit/404bf259
Tree: http://git-wip-us.apache.org/repos/asf/incubator-storm/tree/404bf259
Diff: http://git-wip-us.apache.org/repos/asf/incubator-storm/diff/404bf259

Branch: refs/heads/master
Commit: 404bf2592252f00f0a9cb1013938fc066a7f1bd0
Parents: dc4de42
Author: Robert (Bobby) Evans <ev...@yahoo-inc.com>
Authored: Tue Apr 29 17:28:52 2014 +0000
Committer: Robert (Bobby) Evans <ev...@yahoo-inc.com>
Committed: Tue Apr 29 17:28:52 2014 +0000

----------------------------------------------------------------------
 storm-core/src/jvm/backtype/storm/task/TopologyContext.java | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-storm/blob/404bf259/storm-core/src/jvm/backtype/storm/task/TopologyContext.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/backtype/storm/task/TopologyContext.java b/storm-core/src/jvm/backtype/storm/task/TopologyContext.java
index c9df979..288fcd8 100644
--- a/storm-core/src/jvm/backtype/storm/task/TopologyContext.java
+++ b/storm-core/src/jvm/backtype/storm/task/TopologyContext.java
@@ -230,6 +230,10 @@ public class TopologyContext extends WorkerTopologyContext implements IMetricsCo
             throw new RuntimeException("TopologyContext.registerMetric can only be called from within overridden " + 
                                        "IBolt::prepare() or ISpout::open() method.");
         }
+
+        if (metric == null) {
+            throw new NullPointerException("Cannot register a null metric");
+        }
         
         Map m1 = _registeredMetrics;
         if(!m1.containsKey(timeBucketSizeInSecs)) {
@@ -263,4 +267,4 @@ public class TopologyContext extends WorkerTopologyContext implements IMetricsCo
     public CombinedMetric registerMetric(String name, ICombiner combiner, int timeBucketSizeInSecs) {
         return registerMetric(name, new CombinedMetric(combiner), timeBucketSizeInSecs);
     }
-}
\ No newline at end of file
+}


[4/4] git commit: Updated CHANGELOG.md for STORM-235

Posted by bo...@apache.org.
Updated CHANGELOG.md for STORM-235


Project: http://git-wip-us.apache.org/repos/asf/incubator-storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-storm/commit/a0876291
Tree: http://git-wip-us.apache.org/repos/asf/incubator-storm/tree/a0876291
Diff: http://git-wip-us.apache.org/repos/asf/incubator-storm/diff/a0876291

Branch: refs/heads/master
Commit: a0876291a00ba10980b775b5a4b44a066e5f0a0a
Parents: 7359592
Author: Robert (Bobby) Evans <bo...@apache.org>
Authored: Tue May 6 15:12:52 2014 +0000
Committer: Robert (Bobby) Evans <bo...@apache.org>
Committed: Tue May 6 15:12:52 2014 +0000

----------------------------------------------------------------------
 CHANGELOG.md | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-storm/blob/a0876291/CHANGELOG.md
----------------------------------------------------------------------
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 791dced..6ce41f0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,5 @@
 ## 0.9.2-incubating (unreleased)
+ * STORM-235: Registering a null metric should blow up early
  * STORM-113: making thrift usage thread safe for local cluster
  * STORM-223: use safe parsing for reading YAML
  * STORM-238: LICENSE and NOTICE files are duplicated in storm-core jar


[2/4] git commit: Addressed review comments

Posted by bo...@apache.org.
Addressed review comments


Project: http://git-wip-us.apache.org/repos/asf/incubator-storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-storm/commit/3c89fb52
Tree: http://git-wip-us.apache.org/repos/asf/incubator-storm/tree/3c89fb52
Diff: http://git-wip-us.apache.org/repos/asf/incubator-storm/diff/3c89fb52

Branch: refs/heads/master
Commit: 3c89fb524f57152353334a60cfc6a2121286c702
Parents: 404bf25
Author: Robert (Bobby) Evans <ev...@yahoo-inc.com>
Authored: Wed Apr 30 14:49:35 2014 +0000
Committer: Robert (Bobby) Evans <ev...@yahoo-inc.com>
Committed: Wed Apr 30 14:49:35 2014 +0000

----------------------------------------------------------------------
 storm-core/src/jvm/backtype/storm/task/TopologyContext.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-storm/blob/3c89fb52/storm-core/src/jvm/backtype/storm/task/TopologyContext.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/backtype/storm/task/TopologyContext.java b/storm-core/src/jvm/backtype/storm/task/TopologyContext.java
index 288fcd8..1dd6b7d 100644
--- a/storm-core/src/jvm/backtype/storm/task/TopologyContext.java
+++ b/storm-core/src/jvm/backtype/storm/task/TopologyContext.java
@@ -232,7 +232,7 @@ public class TopologyContext extends WorkerTopologyContext implements IMetricsCo
         }
 
         if (metric == null) {
-            throw new NullPointerException("Cannot register a null metric");
+            throw new IllegalArgumentException("Cannot register a null metric");
         }
         
         Map m1 = _registeredMetrics;


[3/4] git commit: Merge branch 'metrics-register' of https://github.com/revans2/incubator-storm

Posted by bo...@apache.org.
Merge branch 'metrics-register' of https://github.com/revans2/incubator-storm

STORM-235: Registering a null metric should blow up early


Project: http://git-wip-us.apache.org/repos/asf/incubator-storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-storm/commit/73595921
Tree: http://git-wip-us.apache.org/repos/asf/incubator-storm/tree/73595921
Diff: http://git-wip-us.apache.org/repos/asf/incubator-storm/diff/73595921

Branch: refs/heads/master
Commit: 73595921a26445f53fb90037b974a31eea78065f
Parents: 22215b5 3c89fb5
Author: Robert (Bobby) Evans <bo...@apache.org>
Authored: Tue May 6 15:12:19 2014 +0000
Committer: Robert (Bobby) Evans <bo...@apache.org>
Committed: Tue May 6 15:12:19 2014 +0000

----------------------------------------------------------------------
 storm-core/src/jvm/backtype/storm/task/TopologyContext.java | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------