Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
AhmedAwad opened this issue Feb 17, 2020 · 6 comments

Comments

@AhmedAwad
Copy link

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.

@bernhardttom
Copy link
Contributor

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

@bernhardttom
Copy link
Contributor

There is currently no way to restart the interpreter.

@AhmedAwad
Copy link
Author

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;
...

@bernhardttom bernhardttom changed the title Exception :Failed compiler startup: com.espertech.esper.common.client.EPException: Failed to find event type Notebook has compile exception when multiple modules and create-schema (ordering issue?) Feb 18, 2020
@bernhardttom
Copy link
Contributor

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

@bernhardttom bernhardttom changed the title Notebook has compile exception when multiple modules and create-schema (ordering issue?) Zeppelin Notebook has compile exception when multiple modules and create-schema (ordering issue?) Feb 19, 2020
@AhmedAwad
Copy link
Author

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?

@bernhardttom
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants