Comments (6)
Hi @deil87 , when loading small files, have you tried to use the default RDD partition number? Or have you tried to reduce the number of partitions to 1?
from sedona.
@deil87 It would be better if you can post the printed stack trace.
from sedona.
Yes! At first I've tried default and then tried this
objectRDD.rawSpatialRDD.coalesce(1).persist(StorageLevel.MEMORY_ONLY)
Didn't help.
Sure, stack trace is better :)
java.lang.NullPointerException at org.datasyslab.geospark.knnJudgement.GeometryDistanceComparator.compare(GeometryDistanceComparator.java:44) at scala.math.LowPriorityOrderingImplicits$$anon$7.compare(Ordering.scala:153) at org.apache.spark.util.collection.Utils$$anon$1.compare(Utils.scala:35) at org.spark_project.guava.collect.Ordering.max(Ordering.java:551) at org.spark_project.guava.collect.Ordering.leastOf(Ordering.java:667) at org.apache.spark.util.collection.Utils$.takeOrdered(Utils.scala:37) at org.apache.spark.rdd.RDD$$anonfun$takeOrdered$1$$anonfun$30.apply(RDD.scala:1422) at org.apache.spark.rdd.RDD$$anonfun$takeOrdered$1$$anonfun$30.apply(RDD.scala:1419) at org.apache.spark.rdd.RDD$$anonfun$mapPartitions$1$$anonfun$apply$23.apply(RDD.scala:796) at org.apache.spark.rdd.RDD$$anonfun$mapPartitions$1$$anonfun$apply$23.apply(RDD.scala:796) at org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:38) at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:323) at org.apache.spark.rdd.RDD.iterator(RDD.scala:287) at org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:87) at org.apache.spark.scheduler.Task.run(Task.scala:99) at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:282) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)
from sedona.
Hi, this issue is not made by GeoSpark. When GeoSpark RDD has only one partition and the K in KNN query is larger than 1/2 number of total records, rdd.takeOrdered will crash. I will investigate more on this issue but this will not impact GeoSpark.
Fixing this issue is pretty simple. You just need to load a little bit more data, more than 100 or 1000 records, this issue will get solved. Since GeoSpark focuses on big spatial data, no real or test dataset has less than 100 or 1000 records.
from sedona.
I've already figure it out) But unfortunately I'm the one who likes to write tests and uses small datasets as input. And I've stuck) Maybe comment about this "restriction" would be useful.
Thank you for your quick answers!
from sedona.
@deil87 Thanks for your suggestion. I will add comments in the code and documents.
from sedona.
Related Issues (20)
- RS_AsBase64 returns empty string HOT 3
- Request for addition of function: `ST_LineLocatePoint` HOT 6
- rs_setbandnodatavalue not working as expected HOT 2
- Error reading file greater than 2GB HOT 1
- Installing apache-sedona Python package does not install all dependencies (Sedona 1.5.0) HOT 2
- [Feature] Add ST_IsValidDetail as built-in function.
- 1.5.0 spark shaded protobuf version conflict with application HOT 2
- Support of 3D?
- Feature request: ST_Snap HOT 1
- Microsoft Fabric HOT 26
- Apache Sedona backend for Ibis project?
- Save / Load indexed spatial & partitioned Rdd HOT 2
- Clarify SedonaUtils documentation HOT 1
- Write a geotiff raster , but just found _SUCCESS file in output HDFS dir HOT 3
- Noisy warnings on optional imports
- Map RDD and GeometryType (not an instance of type GeometryType()) HOT 2
- When I resample a raster to very width*height raster , Serde.serialize is limited in 2GB HOT 2
- When I use Bicubic alg to resample a raster with no data pixel , the output raster would be filled unexpected data in no data pixel HOT 3
- fieldNames - AttributeError: Not available before 1.0.0 sedona version HOT 4
- Undeclared IPython dependency HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sedona.