[ 
https://issues.apache.org/jira/browse/STORM-1208?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15011844#comment-15011844
 ] 

ASF GitHub Bot commented on STORM-1208:
---------------------------------------

Github user d2r commented on a diff in the pull request:

    https://github.com/apache/storm/pull/881#discussion_r45251619
  
    --- Diff: storm-core/src/clj/backtype/storm/stats.clj ---
    @@ -335,30 +358,21 @@
     (defn- agg-bolt-streams-lat-and-count
       "Aggregates number executed and process & execute latencies."
       [idk->exec-avg idk->proc-avg idk->executed]
    -  {:pre (apply = (map #(set (keys %))
    -                      [idk->exec-avg
    -                       idk->proc-avg
    -                       idk->executed]))}
    -  (letfn [(weight-avg [id avg] (let [num-e (idk->executed id)]
    -                                   (if (and avg num-e)
    -                                     (* avg num-e)
    -                                     0)))]
    +  (letfn [(weight-avg [id avg]
    +            (let [num-e (idk->executed id)]
    +              (product-or-0 avg num-e)))]
         (into {}
           (for [k (keys idk->exec-avg)]
    -        [k {:executeLatencyTotal (weight-avg k (idk->exec-avg k))
    -            :processLatencyTotal (weight-avg k (idk->proc-avg k))
    +        [k {:executeLatencyTotal (weight-avg k (get idk->exec-avg k))
    +            :processLatencyTotal (weight-avg k (get idk->proc-avg k))
    --- End diff --
    
    ```
    user=> (def nilmap nil)
    #'user/nilmap
    user=> (get nilmap :somekey)
    nil
    user=> (nilmap :somekey)
    NullPointerException   user/eval3 (NO_SOURCE_FILE:4)
    ```
    `get` guards against the map itself is `nil`.


> UI: NPE seen when aggregating bolt streams stats
> ------------------------------------------------
>
>                 Key: STORM-1208
>                 URL: https://issues.apache.org/jira/browse/STORM-1208
>             Project: Apache Storm
>          Issue Type: Bug
>          Components: storm-core
>    Affects Versions: 0.11.0
>            Reporter: Derek Dagit
>            Assignee: Derek Dagit
>             Fix For: 0.11.0
>
>
> A stack trace is seen on the UI via its thrift connection to nimbus.
> On nimbus, a stack trace similar to the following is seen:
> {noformat}
> 2015-11-09 19:26:48.921 o.a.t.s.TThreadPoolServer [ERROR] Error occurred 
> during processing of message.
> java.lang.NullPointerException
>         at 
> backtype.storm.stats$agg_bolt_streams_lat_and_count$iter__2219__2223$fn__2224.invoke(stats.clj:346)
>  ~[storm-core-0.10.1.jar:0.10.1]
>         at clojure.lang.LazySeq.sval(LazySeq.java:40) ~[clojure-1.6.0.jar:?]
>         at clojure.lang.LazySeq.seq(LazySeq.java:49) ~[clojure-1.6.0.jar:?]
>         at clojure.lang.RT.seq(RT.java:484) ~[clojure-1.6.0.jar:?]
>         at clojure.core$seq.invoke(core.clj:133) ~[clojure-1.6.0.jar:?]
>         at clojure.core.protocols$seq_reduce.invoke(protocols.clj:30) 
> ~[clojure-1.6.0.jar:?]
>         at clojure.core.protocols$fn__6078.invoke(protocols.clj:54) 
> ~[clojure-1.6.0.jar:?]
>         at 
> clojure.core.protocols$fn__6031$G__6026__6044.invoke(protocols.clj:13) 
> ~[clojure-1.6.0.jar:?]
>         at clojure.core$reduce.invoke(core.clj:6289) ~[clojure-1.6.0.jar:?]
>         at clojure.core$into.invoke(core.clj:6341) ~[clojure-1.6.0.jar:?]
>         at 
> backtype.storm.stats$agg_bolt_streams_lat_and_count.invoke(stats.clj:344) 
> ~[storm-core-0.10.1.jar:0.10.1]
>         at 
> backtype.storm.stats$agg_pre_merge_comp_page_bolt.invoke(stats.clj:439) 
> ~[storm-core-0.10.1.jar:0.10.1]
>         at backtype.storm.stats$fn__2578.invoke(stats.clj:1093) 
> ~[storm-core-0.10.1.jar:0.10.1]
>         at clojure.lang.MultiFn.invoke(MultiFn.java:241) 
> ~[clojure-1.6.0.jar:?]
>         at clojure.lang.AFn.applyToHelper(AFn.java:165) ~[clojure-1.6.0.jar:?]
>         at clojure.lang.AFn.applyTo(AFn.java:144) ~[clojure-1.6.0.jar:?]
>         at clojure.core$apply.invoke(core.clj:628) ~[clojure-1.6.0.jar:?]
>         at clojure.core$partial$fn__4230.doInvoke(core.clj:2470) 
> ~[clojure-1.6.0.jar:?]
>         at clojure.lang.RestFn.invoke(RestFn.java:421) ~[clojure-1.6.0.jar:?]
>         at clojure.core.protocols$fn__6086.invoke(protocols.clj:143) 
> ~[clojure-1.6.0.jar:?]
>         at 
> clojure.core.protocols$fn__6057$G__6052__6066.invoke(protocols.clj:19) 
> ~[clojure-1.6.0.jar:?]
>         at clojure.core.protocols$seq_reduce.invoke(protocols.clj:31) 
> ~[clojure-1.6.0.jar:?]
>         at clojure.core.protocols$fn__6078.invoke(protocols.clj:54) 
> ~[clojure-1.6.0.jar:?]
>         at 
> clojure.core.protocols$fn__6031$G__6026__6044.invoke(protocols.clj:13) 
> ~[clojure-1.6.0.jar:?]
>         at clojure.core$reduce.invoke(core.clj:6289) ~[clojure-1.6.0.jar:?]
>         at 
> backtype.storm.stats$aggregate_comp_stats_STAR_.invoke(stats.clj:1106) 
> ~[storm-core-0.10.1.jar:0.10.1]
>         at clojure.lang.AFn.applyToHelper(AFn.java:165) ~[clojure-1.6.0.jar:?]
>         at clojure.lang.AFn.applyTo(AFn.java:144) ~[clojure-1.6.0.jar:?]
>         at clojure.core$apply.invoke(core.clj:624) ~[clojure-1.6.0.jar:?]
>         at backtype.storm.stats$fn__2589.doInvoke(stats.clj:1127) 
> ~[storm-core-0.10.1.jar:0.10.1]
>         at clojure.lang.RestFn.invoke(RestFn.java:436) ~[clojure-1.6.0.jar:?]
>         at clojure.lang.MultiFn.invoke(MultiFn.java:236) 
> ~[clojure-1.6.0.jar:?]
>         at backtype.storm.stats$agg_comp_execs_stats.invoke(stats.clj:1303) 
> ~[storm-core-0.10.1.jar:0.10.1]
>         at 
> backtype.storm.daemon.nimbus$fn__5893$exec_fn__1502__auto__$reify__5917.getComponentPageInfo(nimbus.clj:1715)
>  ~[storm-core-0.10.1.jar:0.10.1]
>         at 
> backtype.storm.generated.Nimbus$Processor$getComponentPageInfo.getResult(Nimbus.java:3677)
>  ~[storm-core-0.10.1.jar:0.10.1]
>         at 
> backtype.storm.generated.Nimbus$Processor$getComponentPageInfo.getResult(Nimbus.java:3661)
>  ~[storm-core-0.10.1.jar:0.10.1]
>         at 
> org.apache.thrift7.ProcessFunction.process(ProcessFunction.java:39) 
> ~[storm-core-0.10.1.jar:0.10.1]
>         at org.apache.thrift7.TBaseProcessor.process(TBaseProcessor.java:39) 
> ~[storm-core-0.10.1.jar:0.10.1]
>         at 
> backtype.storm.security.auth.SaslTransportPlugin$TUGIWrapProcessor.process(SaslTransportPlugin.java:143)
>  ~[storm-core-0.10.1.jar:0.10.1]
>         at 
> org.apache.thrift7.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:285)
>  [storm-core-0.10.1.jar:0.10.1]
>         at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>  [?:1.8.0_40]
>         at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>  [?:1.8.0_40]
>         at java.lang.Thread.run(Thread.java:745) [?:1.8.0_40]
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to