package com.ht.bigdata.service
import org.apache.spark.sql.SparkSession
import org.springframework.stereotype.{Component, Service}
@Component
class SparkGeomesaService {
def runSparkDemo: String = {
val dsParams = Map(
"hbase.zookeepers" -> "192.168.6.128",
"hbase.catalog" -> "building_1") // 中国建筑物数据
val sparkSession = SparkSession.builder()
.appName("testSpark")
.config("spark.sql.crossJoin.enabled", "true")
// .config("spark.serializer", "org.apache.spark.serializer.KryoSerializer")
// .config("spark.kryo.registrator", classOf[GeoMesaSparkKryoRegistrator].getName)
.config("spark.dynamicAllocation.enabled","false")
.master("local[*]")
.getOrCreate()
// .withJTS
try {
// Create DataFrame using the "geomesa" forma
基于Scala Web项目使用单机版spark查询大规模矢量数据
最新推荐文章于 2024-06-10 09:30:42 发布