storm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bo...@apache.org
Subject [1/3] storm git commit: Avoid NPE while prining Metrics
Date Tue, 01 Mar 2016 18:53:54 GMT
Repository: storm
Updated Branches:
  refs/heads/master 8fc0b92b1 -> 9b92ed1db


Avoid NPE while prining Metrics


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

Branch: refs/heads/master
Commit: cbc506c0b4e56ef70e640c268b5b57f845c0e1fe
Parents: 07629c1
Author: Kishor Patil <kpatil@yahoo-inc.com>
Authored: Mon Feb 29 10:54:46 2016 -0600
Committer: Kishor Patil <kpatil@yahoo-inc.com>
Committed: Mon Feb 29 10:54:46 2016 -0600

----------------------------------------------------------------------
 .../src/jvm/org/apache/storm/starter/ThroughputVsLatency.java      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/cbc506c0/examples/storm-starter/src/jvm/org/apache/storm/starter/ThroughputVsLatency.java
----------------------------------------------------------------------
diff --git a/examples/storm-starter/src/jvm/org/apache/storm/starter/ThroughputVsLatency.java
b/examples/storm-starter/src/jvm/org/apache/storm/starter/ThroughputVsLatency.java
index 8ee48c9..8ecfb3a 100644
--- a/examples/storm-starter/src/jvm/org/apache/storm/starter/ThroughputVsLatency.java
+++ b/examples/storm-starter/src/jvm/org/apache/storm/starter/ThroughputVsLatency.java
@@ -273,7 +273,7 @@ public class ThroughputVsLatency {
     long acked = 0;
     long failed = 0;
     for (ExecutorSummary exec: info.get_executors()) {
-      if ("spout".equals(exec.get_component_id())) {
+      if ("spout".equals(exec.get_component_id()) && exec.get_stats() != null &&
exec.get_stats().get_specific() != null) {
         SpoutStats stats = exec.get_stats().get_specific().get_spout();
         Map<String, Long> failedMap = stats.get_failed().get(":all-time");
         Map<String, Long> ackedMap = stats.get_acked().get(":all-time");


Mime
View raw message