Code Monkey home page Code Monkey logo

Comments (4)

jiayuasu avatar jiayuasu commented on May 25, 2024

Hi @ignasva ,

You understand the code correctly. I hardcoded it because spilling onto disk actually is not very time efficient.

To solve this, you don't have to make your own GeoSpark build. Here is an easy workaround (but not perfect):

You can directly use GeoSpark Maven Coordinate. Since you checked the code, you may notice that all SpatialRDD attributes are "public". You can directly call the attribute in your code and set to the persist level you want. For example,

myPointRDD.rawPointRDD.persist(MEMORY_AND_DISK_SER);
myPointRDD.indexedRDD.persist(MEMORY_AND_DISK_SER);

Of course, making your own build may give you the perfect control.

Thanks,
Jia

from sedona.

ignasva avatar ignasva commented on May 25, 2024

Hi @jiayuasu,

At first this sounded like a good idea, however, apparently you cannot change the storage level after a Spark RDD is cached. This is the resulting exception:

java.lang.UnsupportedOperationException: Cannot change storage level of an RDD after it was already assigned a level

Anyway, it would be awesome to be able to control the storage level in future releases. Keep up the good work!

from sedona.

jiayuasu avatar jiayuasu commented on May 25, 2024

Hi @ignasva ,

Thanks for pointing this out. I should give the granular control back to the user. I will change the cache strategy in GeoSpark.

Thanks,
Jia

from sedona.

jiayuasu avatar jiayuasu commented on May 25, 2024

Solved in GeoSpark 0.4.0

from sedona.

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.