[
https://issues.apache.org/jira/browse/EAGLE-323?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15309481#comment-15309481
]
ASF GitHub Bot commented on EAGLE-323:
--------------------------------------
GitHub user r7raul1984 opened a pull request:
https://github.com/apache/incubator-eagle/pull/211
EAGLE-323 Init PolicyEvaluationContext in UserProfileMLAlgorithmEval
- Init PolicyEvaluationContext in UserProfileMLAlgorithmEvaluator and use
mlAlertEvaluator in MLAnomalyCallbackImpl.
https://issues.apache.org/jira/browse/EAGLE-323
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/r7raul1984/incubator-eagle EAGLE-323
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-eagle/pull/211.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #211
----
commit 172e6b7325491398fb1e04eff0f8b7df35cd17e3
Author: r7raul1984 <[email protected]>
Date: 2016-06-01T07:02:27Z
EAGLE-323 Init PolicyEvaluationContext in UserProfileMLAlgorithmEvaluator
and use mlAlertEvaluator in MLAnomalyCallbackImpl.
----
> PolicyEvaluationContext not init in UserProfileMLAlgorithmEvaluator
> -------------------------------------------------------------------
>
> Key: EAGLE-323
> URL: https://issues.apache.org/jira/browse/EAGLE-323
> Project: Eagle
> Issue Type: Bug
> Affects Versions: v0.3.0
> Reporter: tangjunjie
> Assignee: tangjunjie
>
> When run cmd as below
> bin/eagle-topology.sh --main
> org.apache.eagle.security.userprofile.UserProfileDetectionMain --config
> conf/sandbox-userprofile-topology.conf start
> Will throw NPE:
> {noformat}
> java.lang.NullPointerException
> at
> org.apache.eagle.security.userprofile.UserProfileMLAlgorithmEvaluator.evaluate(UserProfileMLAlgorithmEvaluator.java:73)
> ~[eagle-topology-0.3.0-incubating-assembly.jar:?]
> at
> org.apache.eagle.ml.MLPolicyEvaluator.evaluate(MLPolicyEvaluator.java:115)
> ~[eagle-topology-0.3.0-incubating-assembly.jar:?]
> at
> org.apache.eagle.policy.executor.PolicyProcessExecutor.flatMap(PolicyProcessExecutor.java:327)
> [eagle-topology-0.3.0-incubating-assembly.jar:?]
> at
> org.apache.eagle.datastream.storm.JavaStormBoltWrapper.execute(JavaStormBoltWrapper.scala:38)
> [eagle-topology-0.3.0-incubating-assembly.jar:?]
> at
> backtype.storm.daemon.executor$fn__5694$tuple_action_fn__5696.invoke(executor.clj:690)
> [storm-core-0.10.1.jar:0.10.1]
> at
> backtype.storm.daemon.executor$mk_task_receiver$fn__5615.invoke(executor.clj:435)
> [storm-core-0.10.1.jar:0.10.1]
> at
> backtype.storm.disruptor$clojure_handler$reify__5189.onEvent(disruptor.clj:58)
> [storm-core-0.10.1.jar:0.10.1]
> at
> backtype.storm.utils.DisruptorQueue.consumeBatchToCursor(DisruptorQueue.java:132)
> [storm-core-0.10.1.jar:0.10.1]
> at
> backtype.storm.utils.DisruptorQueue.consumeBatchWhenAvailable(DisruptorQueue.java:106)
> [storm-core-0.10.1.jar:0.10.1]
> at
> backtype.storm.disruptor$consume_batch_when_available.invoke(disruptor.clj:80)
> [storm-core-0.10.1.jar:0.10.1]
> at
> backtype.storm.daemon.executor$fn__5694$fn__5707$fn__5758.invoke(executor.clj:818)
> [storm-core-0.10.1.jar:0.10.1]
> at backtype.storm.util$async_loop$fn__545.invoke(util.clj:479)
> [storm-core-0.10.1.jar:0.10.1]
> at clojure.lang.AFn.run(AFn.java:22) [clojure-1.6.0.jar:?]
> at java.lang.Thread.run(Thread.java:745) [?:1.7.0_75]
> {noformat}
> After init PolicyEvaluationContext will hit another NPE:
> {noformat}
> java.lang.NullPointerException
> at
> org.apache.eagle.ml.impl.MLAnomalyCallbackImpl.renderAlert(MLAnomalyCallbackImpl.java:74)
> ~[eagle-topology-0.3.0-incubating-assembly.jar:?]
> at
> org.apache.eagle.ml.impl.MLAnomalyCallbackImpl.receive(MLAnomalyCallbackImpl.java:60)
> ~[eagle-topology-0.3.0-incubating-assembly.jar:?]
> at
> org.apache.eagle.security.userprofile.UserProfileMLAlgorithmEvaluator.notifyCallbacks(UserProfileMLAlgorithmEvaluator.java:109)
> ~[eagle-topology-0.3.0-incubating-assembly.jar:?]
> at
> org.apache.eagle.security.userprofile.UserProfileMLAlgorithmEvaluator.evaluate(UserProfileMLAlgorithmEvaluator.java:97)
> ~[eagle-topology-0.3.0-incubating-assembly.jar:?]
> at
> org.apache.eagle.ml.MLPolicyEvaluator.evaluate(MLPolicyEvaluator.java:115)
> ~[eagle-topology-0.3.0-incubating-assembly.jar:?]
> at
> org.apache.eagle.policy.executor.PolicyProcessExecutor.flatMap(PolicyProcessExecutor.java:327)
> [eagle-topology-0.3.0-incubating-assembly.jar:?]
> at
> org.apache.eagle.datastream.storm.JavaStormBoltWrapper.execute(JavaStormBoltWrapper.scala:38)
> [eagle-topology-0.3.0-incubating-assembly.jar:?]
> at
> backtype.storm.daemon.executor$fn__5694$tuple_action_fn__5696.invoke(executor.clj:690)
> [storm-core-0.10.1.jar:0.10.1]
> at
> backtype.storm.daemon.executor$mk_task_receiver$fn__5615.invoke(executor.clj:435)
> [storm-core-0.10.1.jar:0.10.1]
> at
> backtype.storm.disruptor$clojure_handler$reify__5189.onEvent(disruptor.clj:58)
> [storm-core-0.10.1.jar:0.10.1]
> at
> backtype.storm.utils.DisruptorQueue.consumeBatchToCursor(DisruptorQueue.java:132)
> [storm-core-0.10.1.jar:0.10.1]
> at
> backtype.storm.utils.DisruptorQueue.consumeBatchWhenAvailable(DisruptorQueue.java:106)
> [storm-core-0.10.1.jar:0.10.1]
> at
> backtype.storm.disruptor$consume_batch_when_available.invoke(disruptor.clj:80)
> [storm-core-0.10.1.jar:0.10.1]
> at
> backtype.storm.daemon.executor$fn__5694$fn__5707$fn__5758.invoke(executor.clj:818)
> [storm-core-0.10.1.jar:0.10.1]
> at backtype.storm.util$async_loop$fn__545.invoke(util.clj:479)
> [storm-core-0.10.1.jar:0.10.1]
> at clojure.lang.AFn.run(AFn.java:22) [clojure-1.6.0.jar:?]
> at java.lang.Thread.run(Thread.java:745) [?:1.7.0_75]
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)