Esper重复模式

时间:2014-06-24 23:23:04

标签: esper

我想使用以下语法激活模式。

EPStatement raiseStmt = cepAdm.createEPL("[1] Event");

但我得到以下异常

Exception in thread "main" com.espertech.esper.client.EPStatementSyntaxException: Incorrect syntax near '[' [[1] Event]
    at com.espertech.esper.epl.parse.ExceptionConvertor.convertStatement(ExceptionConvertor.java:47)
    at com.espertech.esper.epl.parse.ParseHelper.parse(ParseHelper.java:112)
    at com.espertech.esper.core.service.EPAdministratorHelper.compileEPL(EPAdministratorHelper.java:99)
    at com.espertech.esper.core.service.EPAdministratorHelper.compileEPL(EPAdministratorHelper.java:71)
    at com.espertech.esper.core.service.EPAdministratorImpl.createEPLStmt(EPAdministratorImpl.java:116)
    at com.espertech.esper.core.service.EPAdministratorImpl.createEPL(EPAdministratorImpl.java:66)
    at exampleMain.main(exampleMain.java:202)

1 个答案:

答案 0 :(得分:1)

" admin.createEPL"方法采用EPL语句而不仅仅是模式。例如"从模式[[1]事件]"中选择*。 这相当于:admin.createPattern(" [1] Event")