esper icon indicating copy to clipboard operation
esper copied to clipboard

Zeppelin Notebook has compile exception when multiple modules and create-schema (ordering issue?)

Open AhmedAwad opened this issue 5 years ago • 6 comments

After I start a notebook and create some schemas and start adding new queries, the notebook starts generating an exception Failed compiler startup: com.espertech.esper.common.client.EPException: Failed to find event type 'LabeledEvent' among public types, modules-in-path or the current module itself. The labeledEvent is a schema that I have created and already tested a scenario inserting events and queries on it.

It seems that the runtime rerunning the cell of the create schema does not help.

Would there be a way to reset everything and refresh the interpreter?

I am not sure how to attach the notebook.

AhmedAwad avatar Feb 17 '20 14:02 AhmedAwad

Can you cut&paste the notebook cells into the issue please. Does creating a new note fix it?

bernhardttom avatar Feb 17 '20 14:02 bernhardttom

There is currently no way to restart the interpreter.

bernhardttom avatar Feb 17 '20 15:02 bernhardttom

Creating a new notebook and copying the code to it temporarily fixes the issue but it reappears.

Here is the code

create table Cases (caseID long primary key);

create schema UnlabeledEvent( activity string, timestamp long); @Name('Unlabeled') select * from UnlabeledEvent;

%esperepl create schema LabeledEvent(caseID long, activity string, timestamp long, probability double); @Name('Labeled') select * from LabeledEvent; executing this command I start getting the error

Failed compiler startup: com.espertech.esper.common.client.EPException: Failed to find event type 'LabeledEvent' among public types, modules-in-path or the current module itself

I keep getting the same error for any further command being executed

The rest of commands

create schema SyncIJ( caseID long, timestamp long, probability double);

insert into Cases select (select coalesce(max(C.caseID)+1, 1) from Cases as C) as caseID from UnlabeledEvent as UE where UE.activity = 'A';

insert into LabeledEvent (caseID, activity, timestamp, probability) select (select max(caseID) from Cases) as caseID, UE.activity, UE.timestamp, 1.0 from UnlabeledEvent as UE where UE.activity = 'A';

insert into LabeledEvent (caseID, activity, timestamp, probability) select pred.caseID, 'B', succ.timestamp, 0.25 from pattern [ every( pred=LabeledEvent(activity='A')) -> succ=UnlabeledEvent(activity='B') ] where succ.timestamp - pred.timestamp >= 1; ...

AhmedAwad avatar Feb 17 '20 15:02 AhmedAwad

Try putting the EPL into the same box. Zeppelin may mix up ordering?

bernhardttom avatar Feb 19 '20 14:02 bernhardttom

It worked when I put all the epl statements in one cell and the epl scenario in the next one.

Thanks :)

But, is this something related to Zeppelin or Esper interpreter?

AhmedAwad avatar Feb 20 '20 08:02 AhmedAwad

I guess possibly Zeppelin mixes up the order of cells, so that the create-schema goes last, even though it shows up on the web page as first.

bernhardttom avatar Feb 20 '20 13:02 bernhardttom