From 3010a897111652db6a3b2cb67e4cf6212194d161 Mon Sep 17 00:00:00 2001 From: Emilio Lahr-Vivaz Date: Mon, 27 Apr 2026 19:19:04 -0400 Subject: [PATCH 1/3] GEOMESA-3565 FSDS - Standardize query threads parameter --- docs/user/filesystem/usage.rst | 4 ++-- .../fs/data/FileSystemDataStoreFactory.scala | 4 ++-- .../fs/data/FileSystemDataStoreParams.scala | 14 ++++++++------ 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/docs/user/filesystem/usage.rst b/docs/user/filesystem/usage.rst index 29103e64170..259c3f0e40a 100644 --- a/docs/user/filesystem/usage.rst +++ b/docs/user/filesystem/usage.rst @@ -18,11 +18,11 @@ Parameter Type Description ``fs.config.file`` String The name of a file containing storage configuration properties, in Java properties format. See :ref:`fsds_config_props` and :ref:`fsds_metadata` for available properties. Environment variables in property values will be interpolated using ``${...}`` syntax -``fs.encoding`` String The file storage to use, defaults to ``parquet``. Provided implementations are +``fs.encoding`` String The file format to use, defaults to ``parquet``. Provided implementations are ``parquet`` and ``converter`` -``fs.read-threads`` Int The number of threads used for each query ``fs.writer.partition.timeout`` String Timeout for closing a partition file after write, e.g. '60 seconds'. This is to prevent too many open files during large write operations +``geomesa.query.threads`` Int The number of threads used for each query, defaults to ``4`` ``geomesa.query.timeout`` String The max time a query will be allowed to run before being killed. The timeout is specified as a duration, e.g. ``1 minute`` or ``60 seconds`` ``geomesa.security.auths`` String Comma-delimited superset of authorizations that will be used for queries. See diff --git a/geomesa-fs/geomesa-fs-datastore/src/main/scala/org/locationtech/geomesa/fs/data/FileSystemDataStoreFactory.scala b/geomesa-fs/geomesa-fs-datastore/src/main/scala/org/locationtech/geomesa/fs/data/FileSystemDataStoreFactory.scala index 7be67ab2907..34d0dd29200 100644 --- a/geomesa-fs/geomesa-fs-datastore/src/main/scala/org/locationtech/geomesa/fs/data/FileSystemDataStoreFactory.scala +++ b/geomesa-fs/geomesa-fs-datastore/src/main/scala/org/locationtech/geomesa/fs/data/FileSystemDataStoreFactory.scala @@ -100,7 +100,7 @@ class FileSystemDataStoreFactory extends DataStoreFactorySpi with LazyLogging { // However, if you are doing lots of filtering it appears that bumping the threads up high // can be very useful. Seems possibly numcores/2 might is a good setting (which is a standard idea) - val readThreads = ReadThreadsParam.lookup(params) + val readThreads = QueryThreadsParam.lookup(params) val writeTimeout = WriteTimeoutParam.lookup(params) val queryTimeout = QueryTimeoutParam.lookupOpt(params).filter(_.isFinite) @@ -147,8 +147,8 @@ object FileSystemDataStoreFactory extends GeoMesaDataStoreInfo { org.locationtech.geomesa.fs.data.FileSystemDataStoreParams.MetadataTypeParam, org.locationtech.geomesa.fs.data.FileSystemDataStoreParams.ConfigParam, org.locationtech.geomesa.fs.data.FileSystemDataStoreParams.ConfigFileParam, - org.locationtech.geomesa.fs.data.FileSystemDataStoreParams.ReadThreadsParam, org.locationtech.geomesa.fs.data.FileSystemDataStoreParams.WriteTimeoutParam, + org.locationtech.geomesa.fs.data.FileSystemDataStoreParams.QueryThreadsParam, org.locationtech.geomesa.fs.data.FileSystemDataStoreParams.QueryTimeoutParam, org.locationtech.geomesa.fs.data.FileSystemDataStoreParams.AuthProviderParam, org.locationtech.geomesa.fs.data.FileSystemDataStoreParams.AuthsParam, diff --git a/geomesa-fs/geomesa-fs-datastore/src/main/scala/org/locationtech/geomesa/fs/data/FileSystemDataStoreParams.scala b/geomesa-fs/geomesa-fs-datastore/src/main/scala/org/locationtech/geomesa/fs/data/FileSystemDataStoreParams.scala index 73e9237b020..9d34106d375 100644 --- a/geomesa-fs/geomesa-fs-datastore/src/main/scala/org/locationtech/geomesa/fs/data/FileSystemDataStoreParams.scala +++ b/geomesa-fs/geomesa-fs-datastore/src/main/scala/org/locationtech/geomesa/fs/data/FileSystemDataStoreParams.scala @@ -71,13 +71,15 @@ trait FileSystemDataStoreParams extends SecurityParams with NamespaceParams { readWrite = ReadWriteFlag.ReadWrite, ) - val ReadThreadsParam = + val QueryThreadsParam = new GeoMesaParam[Integer]( - "fs.read-threads", - "Read Threads", - default = 4, - supportsNiFiExpressions = true, - readWrite = ReadWriteFlag.ReadOnly + GeoMesaDataStoreFactory.QueryThreadsParam.key, + GeoMesaDataStoreFactory.QueryThreadsParam.description.toString, + default = Int.box(4), + deprecatedKeys = Seq("fs.read-threads"), + systemProperty = GeoMesaDataStoreFactory.QueryThreadsParam.systemProperty, + supportsNiFiExpressions = GeoMesaDataStoreFactory.QueryThreadsParam.supportsNiFiExpressions, + readWrite = GeoMesaDataStoreFactory.QueryThreadsParam.readWrite ) val WriteTimeoutParam = From 05a1f980ca78b52ee1dba3a2f2b69a2598293672 Mon Sep 17 00:00:00 2001 From: Emilio Lahr-Vivaz Date: Mon, 27 Apr 2026 19:31:27 -0400 Subject: [PATCH 2/3] fix param --- .../locationtech/geomesa/fs/tools/export/FsExportCommand.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/geomesa-fs/geomesa-fs-tools/src/main/scala/org/locationtech/geomesa/fs/tools/export/FsExportCommand.scala b/geomesa-fs/geomesa-fs-tools/src/main/scala/org/locationtech/geomesa/fs/tools/export/FsExportCommand.scala index 62d681d6930..d045b50a60f 100644 --- a/geomesa-fs/geomesa-fs-tools/src/main/scala/org/locationtech/geomesa/fs/tools/export/FsExportCommand.scala +++ b/geomesa-fs/geomesa-fs-tools/src/main/scala/org/locationtech/geomesa/fs/tools/export/FsExportCommand.scala @@ -21,7 +21,7 @@ class FsExportCommand extends ExportCommand[FileSystemDataStore] with FsDistribu override val params = new FsExportParams override def connection: Map[String, String] = - super.connection + (FileSystemDataStoreParams.ReadThreadsParam.getName -> params.threads.toString) + super.connection + (FileSystemDataStoreParams.QueryThreadsParam.getName -> params.threads.toString) } object FsExportCommand { From 2c6c3b3cfbb4022b8b68c5f12bb7b3e443086125 Mon Sep 17 00:00:00 2001 From: Emilio Lahr-Vivaz Date: Mon, 27 Apr 2026 20:01:54 -0400 Subject: [PATCH 3/3] fix param --- .../geomesa/fs/tools/export/FsPlaybackCommand.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/geomesa-fs/geomesa-fs-tools/src/main/scala/org/locationtech/geomesa/fs/tools/export/FsPlaybackCommand.scala b/geomesa-fs/geomesa-fs-tools/src/main/scala/org/locationtech/geomesa/fs/tools/export/FsPlaybackCommand.scala index e678be69c03..3815b46de29 100644 --- a/geomesa-fs/geomesa-fs-tools/src/main/scala/org/locationtech/geomesa/fs/tools/export/FsPlaybackCommand.scala +++ b/geomesa-fs/geomesa-fs-tools/src/main/scala/org/locationtech/geomesa/fs/tools/export/FsPlaybackCommand.scala @@ -21,7 +21,7 @@ class FsPlaybackCommand extends PlaybackCommand[FileSystemDataStore] with FsDist override val params = new FsPlaybackParams override def connection: Map[String, String] = - super.connection + (FileSystemDataStoreParams.ReadThreadsParam.getName -> params.threads.toString) + super.connection + (FileSystemDataStoreParams.QueryThreadsParam.getName -> params.threads.toString) } object FsPlaybackCommand {