flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kl0u <...@git.apache.org>
Subject [GitHub] flink issue #4172: [FLINK-6983] [cep] Do not serialize States with NFA
Date Thu, 29 Jun 2017 09:01:40 GMT
Github user kl0u commented on the issue:

    Hi @wuchong . I am not an expert in Janino and how it works but I do not think you need
Janino's classloader at any point. Using the `open()` of the `CEPOperator` you just need to
compile the code of the `IterativeCondition` whenever we have a `IterativeConditionWrapper`.
In the code snippet you sent before, line 30 should change to take the user classloader from
the runtime context. If I remember correctly it is `getRuntimeContext().getUserClassLoader()`.

    This will allow Janino to do its magic using the user classloader. After compiling the
class, you can set the `newCondition` field of the `StateTransitions` to an object of the
compiled class. 
    After this, whenever you have a checkpoint or whenever you serialize/deserialize the condition,
given that this will be a regular IterativeCondition, Flink will know how to do it.
    I am also including @twalthr and @fhueske on this to comment, as they have more experience
with this. In addition, if you have a prototype that does all this but fails at some step
with an error, you can send a link and we can try to check it out.

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.

View raw message