一.简介
- 基于对象存储,矢量数据的写入
- 基于对象存储,矢量数据的读取
二. 代码
1. 写入矢量数据到Minio
def write_s3(inputRdd: SpatialRDD, hdfsHost: String, hdfsPath: String, hdfsFile: String)
(implicit sparkContext: SparkContext) = {
val reRdd = inputRdd.repartition(1)
val hdfsConf: Configuration = new Configuration();
hdfsConf.set("fs.defaultFS", hdfsHost)
val hdfs = FileSystem.get(hdfsConf)
hdfs.mkdirs(new Path(hdfsPath.concat(hdfsFile)))
val hdfsShapePath = hdfsHost + hdfsPath + hdfsFile
var outputParams: Map[String, String] = Map()
outputParams += ("fs.path" -> hdfsShapePath)
val dataStore = DataStoreFinder.getData