Skip to content

Commit

Permalink
Add back-compatible constructor for FSDS
Browse files Browse the repository at this point in the history
  • Loading branch information
elahrvivaz committed Nov 6, 2024
1 parent fc476aa commit 4b6c33f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ package org.locationtech.geomesa.fs.data

import com.typesafe.scalalogging.LazyLogging
import org.apache.hadoop.conf.Configuration
import org.apache.hadoop.fs.{FileSystem, Path}
import org.apache.hadoop.fs.{FileContext, FileSystem, Path}
import org.geotools.api.data.Query
import org.geotools.api.feature.`type`.Name
import org.geotools.api.feature.simple.SimpleFeatureType
Expand Down Expand Up @@ -49,6 +49,18 @@ class FileSystemDataStore(
namespace: Option[String]
) extends ContentDataStore with HasGeoMesaStats with LazyLogging {

// noinspection ScalaUnusedSymbol
@deprecated("Use FileSystem instead of FileContext")
def this(
fc: FileContext,
conf: Configuration,
root: Path,
readThreads: Int,
writeTimeout: Duration,
defaultEncoding: Option[String],
namespace: Option[String]) =
this(FileSystem.get(root.toUri, conf), conf, root, readThreads, writeTimeout, defaultEncoding, namespace)

namespace.foreach(setNamespaceURI)

private val manager = FileSystemStorageManager(fs, conf, root, namespace)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import org.junit.runner.RunWith
import org.locationtech.geomesa.features.ScalaSimpleFeature
import org.locationtech.geomesa.fs.HadoopSharedCluster
import org.locationtech.geomesa.fs.data.FileSystemDataStore
import org.locationtech.geomesa.fs.storage.common.utils.PathCache
import org.locationtech.geomesa.utils.collection.SelfClosingIterator
import org.locationtech.geomesa.utils.geotools.{FeatureUtils, SimpleFeatureTypes}
import org.locationtech.geomesa.utils.io.WithClose
Expand Down

0 comments on commit 4b6c33f

Please sign in to comment.