Giter Club home page Giter Club logo

Comments (10)

nielsbasjes avatar nielsbasjes commented on August 25, 2024

So far I have solved this issue by simply instantiating the analyzer on the node that does the actual execution. So this is what you see in the Pig UDF.

I'll have a look if I can make it serializable. No promises at this moment.

from yauaa.

ogirardot avatar ogirardot commented on August 25, 2024

Thanks for answering, since we're using Spark SQL and UDFs that would make it "once by execution" which is pretty bad in terms of executions. How can I help ?

from yauaa.

ogirardot avatar ogirardot commented on August 25, 2024

btw thx your work is the best we've been trying so far

from yauaa.

ogirardot avatar ogirardot commented on August 25, 2024

we may be blocked by antlr/antlr4#233

from yauaa.

nielsbasjes avatar nielsbasjes commented on August 25, 2024

The Parse Tree does not need to be serializable. I'll have a look on how I can solve this.

from yauaa.

nielsbasjes avatar nielsbasjes commented on August 25, 2024

I did some experimentation and getting this to work right would be 'really hard'.
Background:
Parsing the config files may yield parse errors (so you want to do that early) and the resulting data structures need the parser system to validate it all. Then 'only' serializing what NEEDS to be serialized becomes tricky.

from yauaa.

nielsbasjes avatar nielsbasjes commented on August 25, 2024

I found a way to do this that seems to work.
I test it by running a significant part of the tests with a UserAgentAnalyzer that was serialized and then deserialized: https://github.com/nielsbasjes/yauaa/blob/master/analyzer/src/test/java/nl/basjes/parse/useragent/TestSerialization.java

Can you please verify if this also works in your context?

from yauaa.

nielsbasjes avatar nielsbasjes commented on August 25, 2024

Question: You say "best so far". What makes this library for you the best?

from yauaa.

nielsbasjes avatar nielsbasjes commented on August 25, 2024

@ogirardot Have you been able to check if it works now?

from yauaa.

nielsbasjes avatar nielsbasjes commented on August 25, 2024

These changes are in the 1.4 release.
So for now I'm closing this as 'fixed'.
Please reopen if you find any issues.

from yauaa.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.