Skip to content

Commit 11625d5

Browse files
authored
GEOMESA-3565 FSDS - Standardize query threads parameter (#3538)
1 parent c85d83a commit 11625d5

5 files changed

Lines changed: 14 additions & 12 deletions

File tree

docs/user/filesystem/usage.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ Parameter Type Description
1818
``fs.config.file`` String The name of a file containing storage configuration properties, in Java properties
1919
format. See :ref:`fsds_config_props` and :ref:`fsds_metadata` for available properties.
2020
Environment variables in property values will be interpolated using ``${...}`` syntax
21-
``fs.encoding`` String The file storage to use, defaults to ``parquet``. Provided implementations are
21+
``fs.encoding`` String The file format to use, defaults to ``parquet``. Provided implementations are
2222
``parquet`` and ``converter``
23-
``fs.read-threads`` Int The number of threads used for each query
2423
``fs.writer.partition.timeout`` String Timeout for closing a partition file after write, e.g. '60 seconds'. This is to
2524
prevent too many open files during large write operations
25+
``geomesa.query.threads`` Int The number of threads used for each query, defaults to ``4``
2626
``geomesa.query.timeout`` String The max time a query will be allowed to run before being killed. The
2727
timeout is specified as a duration, e.g. ``1 minute`` or ``60 seconds``
2828
``geomesa.security.auths`` String Comma-delimited superset of authorizations that will be used for queries. See

geomesa-fs/geomesa-fs-datastore/src/main/scala/org/locationtech/geomesa/fs/data/FileSystemDataStoreFactory.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ class FileSystemDataStoreFactory extends DataStoreFactorySpi with LazyLogging {
100100
// However, if you are doing lots of filtering it appears that bumping the threads up high
101101
// can be very useful. Seems possibly numcores/2 might is a good setting (which is a standard idea)
102102

103-
val readThreads = ReadThreadsParam.lookup(params)
103+
val readThreads = QueryThreadsParam.lookup(params)
104104
val writeTimeout = WriteTimeoutParam.lookup(params)
105105
val queryTimeout = QueryTimeoutParam.lookupOpt(params).filter(_.isFinite)
106106

@@ -147,8 +147,8 @@ object FileSystemDataStoreFactory extends GeoMesaDataStoreInfo {
147147
org.locationtech.geomesa.fs.data.FileSystemDataStoreParams.MetadataTypeParam,
148148
org.locationtech.geomesa.fs.data.FileSystemDataStoreParams.ConfigParam,
149149
org.locationtech.geomesa.fs.data.FileSystemDataStoreParams.ConfigFileParam,
150-
org.locationtech.geomesa.fs.data.FileSystemDataStoreParams.ReadThreadsParam,
151150
org.locationtech.geomesa.fs.data.FileSystemDataStoreParams.WriteTimeoutParam,
151+
org.locationtech.geomesa.fs.data.FileSystemDataStoreParams.QueryThreadsParam,
152152
org.locationtech.geomesa.fs.data.FileSystemDataStoreParams.QueryTimeoutParam,
153153
org.locationtech.geomesa.fs.data.FileSystemDataStoreParams.AuthProviderParam,
154154
org.locationtech.geomesa.fs.data.FileSystemDataStoreParams.AuthsParam,

geomesa-fs/geomesa-fs-datastore/src/main/scala/org/locationtech/geomesa/fs/data/FileSystemDataStoreParams.scala

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,15 @@ trait FileSystemDataStoreParams extends SecurityParams with NamespaceParams {
7171
readWrite = ReadWriteFlag.ReadWrite,
7272
)
7373

74-
val ReadThreadsParam =
74+
val QueryThreadsParam =
7575
new GeoMesaParam[Integer](
76-
"fs.read-threads",
77-
"Read Threads",
78-
default = 4,
79-
supportsNiFiExpressions = true,
80-
readWrite = ReadWriteFlag.ReadOnly
76+
GeoMesaDataStoreFactory.QueryThreadsParam.key,
77+
GeoMesaDataStoreFactory.QueryThreadsParam.description.toString,
78+
default = Int.box(4),
79+
deprecatedKeys = Seq("fs.read-threads"),
80+
systemProperty = GeoMesaDataStoreFactory.QueryThreadsParam.systemProperty,
81+
supportsNiFiExpressions = GeoMesaDataStoreFactory.QueryThreadsParam.supportsNiFiExpressions,
82+
readWrite = GeoMesaDataStoreFactory.QueryThreadsParam.readWrite
8183
)
8284

8385
val WriteTimeoutParam =

geomesa-fs/geomesa-fs-tools/src/main/scala/org/locationtech/geomesa/fs/tools/export/FsExportCommand.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class FsExportCommand extends ExportCommand[FileSystemDataStore] with FsDistribu
2121
override val params = new FsExportParams
2222

2323
override def connection: Map[String, String] =
24-
super.connection + (FileSystemDataStoreParams.ReadThreadsParam.getName -> params.threads.toString)
24+
super.connection + (FileSystemDataStoreParams.QueryThreadsParam.getName -> params.threads.toString)
2525
}
2626

2727
object FsExportCommand {

geomesa-fs/geomesa-fs-tools/src/main/scala/org/locationtech/geomesa/fs/tools/export/FsPlaybackCommand.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class FsPlaybackCommand extends PlaybackCommand[FileSystemDataStore] with FsDist
2121
override val params = new FsPlaybackParams
2222

2323
override def connection: Map[String, String] =
24-
super.connection + (FileSystemDataStoreParams.ReadThreadsParam.getName -> params.threads.toString)
24+
super.connection + (FileSystemDataStoreParams.QueryThreadsParam.getName -> params.threads.toString)
2525
}
2626

2727
object FsPlaybackCommand {

0 commit comments

Comments
 (0)