From 8107b1c4b54b41f6bf0a64660d630e792f65c38e Mon Sep 17 00:00:00 2001 From: Austin Heyne Date: Wed, 1 Nov 2023 10:53:24 -0400 Subject: [PATCH] GEOMESA-3310 HBase - Expose additional HBase configurations as system properties. Expose - hbase.coprocessor.threads - hbase.ranges.max-per-extended-scan - hbase.ranges.max-per-coprocessor-scan Signed-off-by: Austin Heyne --- .../geomesa/hbase/data/HBaseDataStoreFactory.scala | 3 +++ .../geomesa/hbase/data/HBaseDataStoreParams.scala | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/geomesa-hbase/geomesa-hbase-datastore/src/main/scala/org/locationtech/geomesa/hbase/data/HBaseDataStoreFactory.scala b/geomesa-hbase/geomesa-hbase-datastore/src/main/scala/org/locationtech/geomesa/hbase/data/HBaseDataStoreFactory.scala index 29112fd9e28d..bf151cc4880d 100644 --- a/geomesa-hbase/geomesa-hbase-datastore/src/main/scala/org/locationtech/geomesa/hbase/data/HBaseDataStoreFactory.scala +++ b/geomesa-hbase/geomesa-hbase-datastore/src/main/scala/org/locationtech/geomesa/hbase/data/HBaseDataStoreFactory.scala @@ -136,6 +136,9 @@ object HBaseDataStoreFactory extends GeoMesaDataStoreInfo with LazyLogging { val RemoteDensityProperty : SystemProperty = SystemProperty("geomesa.hbase.coprocessor.density.enable") val RemoteStatsProperty : SystemProperty = SystemProperty("geomesa.hbase.coprocessor.stats.enable") val YieldPartialResultsProperty : SystemProperty = SystemProperty("geomesa.hbase.coprocessor.yield.partial.results") + val CoprocessorThreadsProperty : SystemProperty = SystemProperty("hbase.coprocessor.threads", "16") + val MaxRangesPerExtendedScanProperty : SystemProperty = SystemProperty("hbase.ranges.max-per-extended-scan", "100") + val MaxRangesPerCoprocessorScanProperty : SystemProperty = SystemProperty("hbase.ranges.max-per-coprocessor-scan", Int.MaxValue.toString) override val DisplayName = "HBase (GeoMesa)" override val Description = "Apache HBase\u2122 distributed key/value store" diff --git a/geomesa-hbase/geomesa-hbase-datastore/src/main/scala/org/locationtech/geomesa/hbase/data/HBaseDataStoreParams.scala b/geomesa-hbase/geomesa-hbase-datastore/src/main/scala/org/locationtech/geomesa/hbase/data/HBaseDataStoreParams.scala index 5cd8bce18e86..4612e963858f 100644 --- a/geomesa-hbase/geomesa-hbase-datastore/src/main/scala/org/locationtech/geomesa/hbase/data/HBaseDataStoreParams.scala +++ b/geomesa-hbase/geomesa-hbase-datastore/src/main/scala/org/locationtech/geomesa/hbase/data/HBaseDataStoreParams.scala @@ -13,7 +13,7 @@ import org.apache.hadoop.hbase.client.Connection import org.locationtech.geomesa.index.geotools.GeoMesaDataStoreFactory.GeoMesaDataStoreParams import org.locationtech.geomesa.security.SecurityParams import org.locationtech.geomesa.utils.geotools.GeoMesaParam -import org.locationtech.geomesa.utils.geotools.GeoMesaParam.{ReadWriteFlag, SystemPropertyBooleanParam} +import org.locationtech.geomesa.utils.geotools.GeoMesaParam.{ReadWriteFlag, SystemPropertyBooleanParam, SystemPropertyIntegerParam} object HBaseDataStoreParams extends GeoMesaDataStoreParams with SecurityParams { @@ -56,6 +56,7 @@ object HBaseDataStoreParams extends GeoMesaDataStoreParams with SecurityParams { "The number of HBase RPC threads to use per coprocessor query", default = Int.box(16), supportsNiFiExpressions = true, + systemProperty = Some(SystemPropertyIntegerParam(HBaseDataStoreFactory.CoprocessorThreadsProperty)), readWrite = ReadWriteFlag.ReadOnly ) @@ -83,6 +84,7 @@ object HBaseDataStoreParams extends GeoMesaDataStoreParams with SecurityParams { default = 100, deprecatedKeys = Seq("max.ranges.per.extended.scan"), supportsNiFiExpressions = true, + systemProperty = Some(SystemPropertyIntegerParam(HBaseDataStoreFactory.MaxRangesPerExtendedScanProperty)), readWrite = ReadWriteFlag.ReadUpdate ) @@ -92,6 +94,7 @@ object HBaseDataStoreParams extends GeoMesaDataStoreParams with SecurityParams { "Max ranges per coprocessor scan. Ranges will be grouped into scans based on this setting", default = Int.MaxValue, supportsNiFiExpressions = true, + systemProperty = Some(SystemPropertyIntegerParam(HBaseDataStoreFactory.MaxRangesPerCoprocessorScanProperty)), readWrite = ReadWriteFlag.ReadOnly )