From 757ce6efedfb1d7e420ab8cab1ed6028909ff246 Mon Sep 17 00:00:00 2001 From: lossyrob Date: Tue, 22 Sep 2015 13:01:36 -0400 Subject: [PATCH] Adding applys to HadoopRasterCatalog --- .../spark/io/hadoop/HadoopRasterCatalog.scala | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/spark/src/main/scala/geotrellis/spark/io/hadoop/HadoopRasterCatalog.scala b/spark/src/main/scala/geotrellis/spark/io/hadoop/HadoopRasterCatalog.scala index 9a6e0c7ed3..a8e21549d6 100644 --- a/spark/src/main/scala/geotrellis/spark/io/hadoop/HadoopRasterCatalog.scala +++ b/spark/src/main/scala/geotrellis/spark/io/hadoop/HadoopRasterCatalog.scala @@ -44,9 +44,18 @@ object HadoopRasterCatalogConfig { object HadoopRasterCatalog { + def apply(rootPath: String)(implicit sc: SparkContext): HadoopRasterCatalog = + apply(new Path(rootPath)) + + def apply(rootPath: String, catalogConfig: HadoopRasterCatalogConfig)(implicit sc: SparkContext): HadoopRasterCatalog = + apply(new Path(rootPath), catalogConfig) + + def apply(rootPath: Path)(implicit sc: SparkContext): HadoopRasterCatalog = + apply(rootPath, HadoopRasterCatalogConfig.DEFAULT) + def apply( rootPath: Path, - catalogConfig: HadoopRasterCatalogConfig = HadoopRasterCatalogConfig.DEFAULT)(implicit sc: SparkContext + catalogConfig: HadoopRasterCatalogConfig)(implicit sc: SparkContext ): HadoopRasterCatalog = { HdfsUtils.ensurePathExists(rootPath, sc.hadoopConfiguration) val attributeStore = new HadoopAttributeStore(sc.hadoopConfiguration, new Path(rootPath, "attributes"))