Giter Site home page Giter Site logo

org.apache.spark.sql.catalyst.expressions.GeneratedClass$GeneratedIteratorForCodegenStageX grows beyond 64 KB about splink HOT 3 CLOSED

moj-analytical-services avatar moj-analytical-services commented on May 27, 2024
org.apache.spark.sql.catalyst.expressions.GeneratedClass$GeneratedIteratorForCodegenStageX grows beyond 64 KB

from splink.

Comments (3)

mamonu avatar mamonu commented on May 27, 2024

Some proposed solutions for this from SO:

  1. In the config:
    spark = SparkSession.builder.master('local').appName('blah')\ .config('spark.sql.codegen.wholeStage', 'false')\ ## <-- add this line .getOrCreate()

this is the local version so probably have a look if this can be defined in Glue AWS.

  1. adding extra "checkpoints" in code.

from splink.

mamonu avatar mamonu commented on May 27, 2024

looking this a bit more today it seems that when spark.sql.codegen.wholeStage is on then its slightly faster but nothing would break if we just turned it off.

https://jaceklaskowski.gitbooks.io/mastering-spark-sql/spark-sql-whole-stage-codegen.html

from splink.

RobinL avatar RobinL commented on May 27, 2024

What's weird about this is there is a persist on df_gammas which should prevent this.

The problem is happening because the whole of the 'generate gammas' code and the 'compute expectation' is being bundled into a single project statement.

Solutions:

  • the df -> rdd -> df trick might work:

https://stackoverflow.com/questions/50891509/apache-spark-codegen-stage-grows-beyond-64-kb

  • split the job out into a 'compute gammas and persist to s3', and 'read from s3 and compute expectation' . since we're already repartition to 200 when we write out df_e this might actually not slow things down much

from splink.

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.