geotrellis.spark.io.accumulo.AccumuloLayerManager.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of geotrellis-accumulo_2.11 Show documentation
Show all versions of geotrellis-accumulo_2.11 Show documentation
GeoTrellis is an open source geographic data processing engine for high performance applications.
package geotrellis.spark.io.accumulo
import geotrellis.spark._
import geotrellis.spark.io._
import geotrellis.spark.io.AttributeStore.Fields
import geotrellis.spark.io.avro.AvroRecordCodec
import geotrellis.spark.io.index._
import geotrellis.spark.io.json._
import geotrellis.util._
import org.apache.spark.SparkContext
import org.apache.spark.rdd.RDD
import spray.json.JsonFormat
import scala.reflect.ClassTag
class AccumuloLayerManager(attributeStore: AccumuloAttributeStore, instance: AccumuloInstance)(implicit sc: SparkContext)
extends LayerManager[LayerId]{
def delete(id: LayerId): Unit =
AccumuloLayerDeleter(attributeStore, instance).delete(id)
def copy[
K: AvroRecordCodec: Boundable: JsonFormat: ClassTag,
V: AvroRecordCodec: ClassTag,
M: JsonFormat: GetComponent[?, Bounds[K]]
](from: LayerId, to: LayerId): Unit =
AccumuloLayerCopier(instance).copy[K, V, M](from, to)
def move[
K: AvroRecordCodec: Boundable: JsonFormat: ClassTag,
V: AvroRecordCodec: ClassTag,
M: JsonFormat: GetComponent[?, Bounds[K]]
](from: LayerId, to: LayerId): Unit =
AccumuloLayerMover(instance).move[K, V, M](from, to)
def reindex[
K: AvroRecordCodec: Boundable: JsonFormat: ClassTag,
V: AvroRecordCodec: ClassTag,
M: JsonFormat: GetComponent[?, Bounds[K]]
](id: LayerId, keyIndexMethod: KeyIndexMethod[K]): Unit =
AccumuloLayerReindexer(instance).reindex[K, V, M](id, keyIndexMethod)
def reindex[
K: AvroRecordCodec: Boundable: JsonFormat: ClassTag,
V: AvroRecordCodec: ClassTag,
M: JsonFormat: GetComponent[?, Bounds[K]]
](id: LayerId, keyIndex: KeyIndex[K]): Unit =
AccumuloLayerReindexer(instance).reindex[K, V, M](id, keyIndex)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy