You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@eagle.apache.org by "hemanth dendukuri (JIRA)" <ji...@apache.org> on 2016/02/19 23:42:18 UTC

[jira] [Reopened] (EAGLE-49) Handle the bad-format message in smarter way instead of throwing exception always

     [ https://issues.apache.org/jira/browse/EAGLE-49?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

hemanth dendukuri reopened EAGLE-49:
------------------------------------

re-opened to update "fix Version".

> Handle the bad-format message in smarter way instead of throwing exception always
> ---------------------------------------------------------------------------------
>
>                 Key: EAGLE-49
>                 URL: https://issues.apache.org/jira/browse/EAGLE-49
>             Project: Eagle
>          Issue Type: Improvement
>            Reporter: Hao Chen
>            Assignee: Hao Chen
>
> Currently the solution is throwing exception once the coming messages' structure don't match with pre-defined schema which is not very good:
> https://github.com/apache/incubator-eagle/blob/master/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/siddhi/SiddhiPolicyEvaluator.java#L189-L195
> But if no predefined message validation, the bolt will crash for following error while unknown fields are included in the message strucutre:
> {code}
> 2015-11-22 23:55:33,564 ERROR [Siddhi-79130d87-373f-4b0b-bdca-a61a5f37f2de-executor-thread-0] server.NIOServerCnxnFactory[44]: Thread Thread[Siddhi-79130d87-373f-4b0b-bdca-a61a5f37f2de-executor-thread-0,5,main] died
> java.lang.RuntimeException: java.lang.ArrayIndexOutOfBoundsException
> 	at com.lmax.disruptor.FatalExceptionHandler.handleEventException(FatalExceptionHandler.java:45)
> 	at com.lmax.disruptor.BatchEventProcessor.run(BatchEventProcessor.java:128)
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> 	at java.lang.Thread.run(Thread.java:745)
> Caused by: java.lang.ArrayIndexOutOfBoundsException
> 	at java.lang.System.arraycopy(Native Method)
> 	at org.wso2.siddhi.core.event.stream.converter.ZeroStreamEventConverter.convertToInnerStreamEvent(ZeroStreamEventConverter.java:28)
> 	at org.wso2.siddhi.core.event.stream.converter.ZeroStreamEventConverter.convertEvent(ZeroStreamEventConverter.java:34)
> 	at org.wso2.siddhi.core.event.stream.converter.ConversionStreamEventChunk.convertAndAssign(ConversionStreamEventChunk.java:46)
> 	at org.wso2.siddhi.core.query.input.ProcessStreamReceiver.receive(ProcessStreamReceiver.java:64)
> 	at org.wso2.siddhi.core.stream.StreamJunction.sendEvent(StreamJunction.java:114)
> 	at org.wso2.siddhi.core.stream.StreamJunction$Publisher.send(StreamJunction.java:280)
> 	at org.wso2.siddhi.core.stream.input.InputDistributor.send(InputDistributor.java:32)
> 	at org.wso2.siddhi.core.stream.input.SingleThreadEntryValve.send(SingleThreadEntryValve.java:46)
> 	at org.wso2.siddhi.core.stream.input.SingleStreamEntryValve$SingleEntryValveHandler.sendEvents(SingleStreamEntryValve.java:152)
> 	at org.wso2.siddhi.core.stream.input.SingleStreamEntryValve$SingleEntryValveHandler.onEvent(SingleStreamEntryValve.java:140)
> 	at org.wso2.siddhi.core.stream.input.SingleStreamEntryValve$SingleEntryValveHandler.onEvent(SingleStreamEntryValve.java:110)
> 	at com.lmax.disruptor.BatchEventProcessor.run(BatchEventProcessor.java:113)
> {code}
> We should provide a smarter way to fix the bad message if possible like 
> [1] Fill in default value for missing fields.
> [2] Remove unaccepted fileds and log as ignored warning.
> The root solution is to allow siddhi CEP to support customizable ExceptionHandler



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