val STBHHX = OperateData.loadPGFrddData("STBHHX")
val CZKFBJ = OperateData.loadPGFrddData("CZKFBJ")
import com.supermap.bdt.analyst.vector.cpp._
val querytype = SpatialRelationType.Contain
val saveAttributes = true
val saveGeometries = true
val saveQueryID = true //是否保留查询对象的ID
val resultQueryIDName = "QueryID"
val result = SpatialQuery.apply( CZKFBJ, STBHHX, querytype, saveAttributes, saveGeometries, saveQueryID, resultQueryIDName,0.001)
println(result.count())
以上代码在本地和集群中都会有以下报错,但数据量很小。
Exception in thread "main" org.apache.spark.SparkException: Job aborted due to stage failure: Task 6 in stage 0.0 failed 1 times, most recent failure: Lost task 6.0 in stage 0.0 (TID 6, localhost, executor driver): java.lang.StackOverflowError