hemanth dendukuri created EAGLE-87:
--------------------------------------

             Summary: Fail creating new policyEvaluator if the policy uses 
contains function.
                 Key: EAGLE-87
                 URL: https://issues.apache.org/jira/browse/EAGLE-87
             Project: Eagle
          Issue Type: Bug
         Environment: Hortonworks Sandbox 2.4
            Reporter: hemanth dendukuri
            Priority: Minor


Here is the policy : from hdfsAuditLogEventStream[(cmd == 'rename') and 
(str:contains(dst,'/tmp/pii')==true)] select * insert into outputStream; 

Error in Storm topology log.

2015-12-15 00:19:39 o.a.e.s.c.i.EagleServiceClientImpl [INFO] Going to query 
service: 
http://localhost:9099/eagle-service/rest/entities?query=AlertDefinitionService%5B%40site%3D%22sandbox%22+AND+%40dataSource%3D%22hdfsAuditLog%22%5D%7B*%7D&pageSize=2147483647&treeAgg=false
2015-12-15 00:19:39 o.a.e.a.n.AlertNotificationExecutor [INFO] alert 
notification config really changed prefix:alertdef, timestamp:0, 
humanReadableDate:1970-01-01 00:00:00,000, tags: 
site=sandbox,dataSource=hdfsAuditLog,policyId=ContainsTest,alertExecutorId=hdfsAuditLogAlertExecutor,policyType=siddhiCEPEngine,,
 
encodedRowkey:YEktKX_____62aP_6x97yoSv3B0ANd9Hby--xyCZKe2KKltxS9hcZXeJk1Je-7-Mrq0lGQ
2015-12-15 00:19:39 o.a.e.a.d.AlertDeduplicationExecutorBase [INFO] Alert dedup 
config really added prefix:alertdef, timestamp:0, humanReadableDate:1970-01-01 
00:00:00,000, tags: 
site=sandbox,dataSource=hdfsAuditLog,policyId=ContainsTest,alertExecutorId=hdfsAuditLogAlertExecutor,policyType=siddhiCEPEngine,,
 
encodedRowkey:YEktKX_____62aP_6x97yoSv3B0ANd9Hby--xyCZKe2KKltxS9hcZXeJk1Je-7-Mrq0lGQ
2015-12-15 00:19:39 o.a.e.a.d.AlertDeduplicationExecutorBase [INFO] Alert dedup 
config really added prefix:alertdef, timestamp:0, humanReadableDate:1970-01-01 
00:00:00,000, tags: 
site=sandbox,dataSource=hdfsAuditLog,policyId=ContainsTest,alertExecutorId=hdfsAuditLogAlertExecutor,policyType=siddhiCEPEngine,,
 
encodedRowkey:YEktKX_____62aP_6x97yoSv3B0ANd9Hby--xyCZKe2KKltxS9hcZXeJk1Je-7-Mrq0lGQ
2015-12-15 00:19:39 o.a.e.e.AlertExecutor [INFO] hdfsAuditLogAlertExecutor, 
partition 0 policy really added prefix:alertdef, timestamp:0, 
humanReadableDate:1970-01-01 00:00:00,000, tags: 
site=sandbox,dataSource=hdfsAuditLog,policyId=ContainsTest,alertExecutorId=hdfsAuditLogAlertExecutor,policyType=siddhiCEPEngine,,
 
encodedRowkey:YEktKX_____62aP_6x97yoSv3B0ANd9Hby--xyCZKe2KKltxS9hcZXeJk1Je-7-Mrq0lGQ
2015-12-15 00:19:40 o.a.e.a.s.SiddhiPolicyEvaluator [INFO] Siddhi stream 
definition : define stream hdfsAuditLogEventStream(eagleAlertContext 
object,allowed bool,cmd string,dst string,host string,securityZone 
string,sensitivityType string,src string,timestamp long,user string);
2015-12-15 00:19:40 o.a.e.e.AlertExecutor [ERROR] Fail creating new 
policyEvaluator
java.lang.reflect.InvocationTargetException: null
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native 
Method) ~[na:1.7.0_79]
        at 
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
 ~[na:1.7.0_79]
        at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
 ~[na:1.7.0_79]
        at java.lang.reflect.Constructor.newInstance(Constructor.java:526) 
~[na:1.7.0_79]
        at 
org.apache.eagle.executor.AlertExecutor.createPolicyEvaluator(AlertExecutor.java:217)
 [stormjar.jar:na]
        at 
org.apache.eagle.executor.AlertExecutor.onPolicyCreated(AlertExecutor.java:356) 
[stormjar.jar:na]
        at 
org.apache.eagle.alert.policy.DynamicPolicyLoader$1.handleEvent(DynamicPolicyLoader.java:119)
 [stormjar.jar:na]
        at 
com.netflix.config.AbstractPollingScheduler.fireEvent(AbstractPollingScheduler.java:184)
 [stormjar.jar:na]
        at 
com.netflix.config.AbstractPollingScheduler.access$200(AbstractPollingScheduler.java:41)
 [stormjar.jar:na]
        at 
com.netflix.config.AbstractPollingScheduler$1.run(AbstractPollingScheduler.java:165)
 [stormjar.jar:na]
        at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) 
[na:1.7.0_79]
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304) 
[na:1.7.0_79]
        at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
 [na:1.7.0_79]
        at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
 [na:1.7.0_79]
        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 
[na:1.7.0_79]
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) 
[na:1.7.0_79]
        at java.lang.Thread.run(Thread.java:745) [na:1.7.0_79]
Caused by: 
org.wso2.siddhi.query.api.exception.ExecutionPlanValidationException: contains 
is neither a function extension nor an aggregated attribute extension, when 
creating query query in execution plan "eb9c5000-006c-463d-8fb0-47aa96063ef7"
        at 
org.wso2.siddhi.core.util.parser.ExecutionPlanParser.parse(ExecutionPlanParser.java:127)
 ~[stormjar.jar:na]
        at 
org.wso2.siddhi.core.SiddhiManager.createExecutionPlanRuntime(SiddhiManager.java:51)
 ~[stormjar.jar:na]
        at 
org.wso2.siddhi.core.SiddhiManager.createExecutionPlanRuntime(SiddhiManager.java:59)
 ~[stormjar.jar:na]
        at 
org.apache.eagle.alert.siddhi.SiddhiPolicyEvaluator.createSiddhiRuntime(SiddhiPolicyEvaluator.java:121)
 ~[stormjar.jar:na]
        at 
org.apache.eagle.alert.siddhi.SiddhiPolicyEvaluator.init(SiddhiPolicyEvaluator.java:84)
 ~[stormjar.jar:na]
        at 
org.apache.eagle.alert.siddhi.SiddhiPolicyEvaluator.<init>(SiddhiPolicyEvaluator.java:80)
 ~[stormjar.jar:na]
        ... 17 common frames omitted
Caused by: org.wso2.siddhi.core.exception.ExecutionPlanCreationException: 
contains is neither a function extension nor an aggregated attribute extension, 
when creating query query
        at 
org.wso2.siddhi.core.util.parser.QueryParser.parse(QueryParser.java:109) 
~[stormjar.jar:na]
        at 
org.wso2.siddhi.core.util.parser.ExecutionPlanParser.parse(ExecutionPlanParser.java:117)
 ~[stormjar.jar:na]
        ... 22 common frames omitted
Caused by: org.wso2.siddhi.core.exception.ExecutionPlanCreationException: 
contains is neither a function extension nor an aggregated attribute extension
        at 
org.wso2.siddhi.core.util.parser.ExpressionParser.parseExpression(ExpressionParser.java:244)
 ~[stormjar.jar:na]
        at 
org.wso2.siddhi.core.util.parser.ExpressionParser.parseExpression(ExpressionParser.java:115)
 ~[stormjar.jar:na]
        at 
org.wso2.siddhi.core.util.parser.ExpressionParser.parseExpression(ExpressionParser.java:103)
 ~[stormjar.jar:na]
        at 
org.wso2.siddhi.core.util.parser.SingleInputStreamParser.generateProcessor(SingleInputStreamParser.java:129)
 ~[stormjar.jar:na]
        at 
org.wso2.siddhi.core.util.parser.SingleInputStreamParser.parseInputStream(SingleInputStreamParser.java:86)
 ~[stormjar.jar:na]
        at 
org.wso2.siddhi.core.util.parser.InputStreamParser.parse(InputStreamParser.java:51)
 ~[stormjar.jar:na]
        at 
org.wso2.siddhi.core.util.parser.QueryParser.parse(QueryParser.java:64) 
~[stormjar.jar:na]
        ... 23 common frames omitted
2015-12-15 00:19:40 o.a.e.e.AlertExecutor [WARN] Broken policy definition and 
stop running : {"expression":"from hdfsAuditLogEventStream[(cmd == 'open') and 
(str:contains(src,'/tmp/p')==true)] select * insert into 
outputStream;","type":"siddhiCEPEngine"}
2015-12-15 00:19:40 c.n.c.AbstractPollingScheduler [ERROR] Error in invoking 
listener
java.lang.IllegalStateException: java.lang.reflect.InvocationTargetException
        at 
org.apache.eagle.executor.AlertExecutor.createPolicyEvaluator(AlertExecutor.java:221)
 ~[stormjar.jar:na]
        at 
org.apache.eagle.executor.AlertExecutor.onPolicyCreated(AlertExecutor.java:356) 
~[stormjar.jar:na]
        at 
org.apache.eagle.alert.policy.DynamicPolicyLoader$1.handleEvent(DynamicPolicyLoader.java:119)
 ~[stormjar.jar:na]
        at 
com.netflix.config.AbstractPollingScheduler.fireEvent(AbstractPollingScheduler.java:184)
 [stormjar.jar:na]
        at 
com.netflix.config.AbstractPollingScheduler.access$200(AbstractPollingScheduler.java:41)
 [stormjar.jar:na]
        at 
com.netflix.config.AbstractPollingScheduler$1.run(AbstractPollingScheduler.java:165)
 [stormjar.jar:na]
        at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) 
[na:1.7.0_79]
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304) 
[na:1.7.0_79]
        at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
 [na:1.7.0_79]
        at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
 [na:1.7.0_79]
        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 
[na:1.7.0_79]
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) 
[na:1.7.0_79]
        at java.lang.Thread.run(Thread.java:745) [na:1.7.0_79]
Caused by: java.lang.reflect.InvocationTargetException: null
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native 
Method) ~[na:1.7.0_79]
        at 
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
 ~[na:1.7.0_79]
        at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
 ~[na:1.7.0_79]
        at java.lang.reflect.Constructor.newInstance(Constructor.java:526) 
~[na:1.7.0_79]
        at 
org.apache.eagle.executor.AlertExecutor.createPolicyEvaluator(AlertExecutor.java:217)
 ~[stormjar.jar:na]
        ... 12 common frames omitted
Caused by: 
org.wso2.siddhi.query.api.exception.ExecutionPlanValidationException: contains 
is neither a function extension nor an aggregated attribute extension, when 
creating query query in execution plan "eb9c5000-006c-463d-8fb0-47aa96063ef7"
        at 
org.wso2.siddhi.core.util.parser.ExecutionPlanParser.parse(ExecutionPlanParser.java:127)
 ~[stormjar.jar:na]
        at 
org.wso2.siddhi.core.SiddhiManager.createExecutionPlanRuntime(SiddhiManager.java:51)
 ~[stormjar.jar:na]
        at 
org.wso2.siddhi.core.SiddhiManager.createExecutionPlanRuntime(SiddhiManager.java:59)
 ~[stormjar.jar:na]
        at 
org.apache.eagle.alert.siddhi.SiddhiPolicyEvaluator.createSiddhiRuntime(SiddhiPolicyEvaluator.java:121)
 ~[stormjar.jar:na]
        at 
org.apache.eagle.alert.siddhi.SiddhiPolicyEvaluator.init(SiddhiPolicyEvaluator.java:84)
 ~[stormjar.jar:na]
        at 
org.apache.eagle.alert.siddhi.SiddhiPolicyEvaluator.<init>(SiddhiPolicyEvaluator.java:80)
 ~[stormjar.jar:na]
        ... 17 common frames omitted
Caused by: org.wso2.siddhi.core.exception.ExecutionPlanCreationException: 
contains is neither a function extension nor an aggregated attribute extension, 
when creating query query
        at 
org.wso2.siddhi.core.util.parser.QueryParser.parse(QueryParser.java:109) 
~[stormjar.jar:na]
        at 
org.wso2.siddhi.core.util.parser.ExecutionPlanParser.parse(ExecutionPlanParser.java:117)
 ~[stormjar.jar:na]
        ... 22 common frames omitted
Caused by: org.wso2.siddhi.core.exception.ExecutionPlanCreationException: 
contains is neither a function extension nor an aggregated attribute extension
        at 
org.wso2.siddhi.core.util.parser.ExpressionParser.parseExpression(ExpressionParser.java:244)
 ~[stormjar.jar:na]
        at 
org.wso2.siddhi.core.util.parser.ExpressionParser.parseExpression(ExpressionParser.java:115)
 ~[stormjar.jar:na]
        at 
org.wso2.siddhi.core.util.parser.ExpressionParser.parseExpression(ExpressionParser.java:103)
 ~[stormjar.jar:na]
        at 
org.wso2.siddhi.core.util.parser.SingleInputStreamParser.generateProcessor(SingleInputStreamParser.java:129)
 ~[stormjar.jar:na]
        at 
org.wso2.siddhi.core.util.parser.SingleInputStreamParser.parseInputStream(SingleInputStreamParser.java:86)
 ~[stormjar.jar:na]
        at 
org.wso2.siddhi.core.util.parser.InputStreamParser.parse(InputStreamParser.java:51)
 ~[stormjar.jar:na]
        at 
org.wso2.siddhi.core.util.parser.QueryParser.parse(QueryParser.java:64) 
~[stormjar.jar:na]
        ... 23 common frames omitted
2015-12-15 00:19:50 s.k.ZkCoordinator [INFO] Task [1/1] Refreshing partition 
manager connections
2015-12-15 00:19:50 s.k.DynamicBrokersReader [INFO] Read partition info from 
zookeeper: 
GlobalPartitionInformation{partitionMap={0=sandbox.hortonworks.com:6667}}
2015-12-15 00:19:50 s.k.KafkaUtils [INFO] Task [1/1] assigned 
[Partition{host=sandbox.hortonworks.com:6667, partition=0}]




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

Reply via email to