diff --git a/README.md b/README.md index 481e02fb4c8e..f3aa50fa4843 100644 --- a/README.md +++ b/README.md @@ -40,13 +40,13 @@ geospatial analytics. **Current release: [3.2.0](https://github.com/locationtech/geomesa/releases/tag/geomesa-3.2.0)**      - [**HBase**](https://github.com/locationtech/geomesa/releases/download/geomesa-3.2.0/geomesa-hbase_2.12-3.2.0-bin.tar.gz) | - [**Accumulo**](https://github.com/locationtech/geomesa/releases/download/geomesa-3.2.0/geomesa-accumulo_2.12-3.2.0-bin.tar.gz) | - [**Cassandra**](https://github.com/locationtech/geomesa/releases/download/geomesa-3.2.0/geomesa-cassandra_2.12-3.2.0-bin.tar.gz) | - [**Kafka**](https://github.com/locationtech/geomesa/releases/download/geomesa-3.2.0/geomesa-kafka_2.12-3.2.0-bin.tar.gz) | - [**Redis**](https://github.com/locationtech/geomesa/releases/download/geomesa-3.2.0/geomesa-redis_2.12-3.2.0-bin.tar.gz) | - [**FileSystem**](https://github.com/locationtech/geomesa/releases/download/geomesa-3.2.0/geomesa-fs_2.12-3.2.0-bin.tar.gz) | - [**Bigtable**](https://github.com/locationtech/geomesa/releases/download/geomesa-3.2.0/geomesa-bigtable_2.12-3.2.0-bin.tar.gz) + [**HBase**](https://github.com/locationtech/geomesa/releases/download/geomesa-3.2.0/geomesa-hbase_2.11-3.2.0-bin.tar.gz) | + [**Accumulo**](https://github.com/locationtech/geomesa/releases/download/geomesa-3.2.0/geomesa-accumulo_2.11-3.2.0-bin.tar.gz) | + [**Cassandra**](https://github.com/locationtech/geomesa/releases/download/geomesa-3.2.0/geomesa-cassandra_2.11-3.2.0-bin.tar.gz) | + [**Kafka**](https://github.com/locationtech/geomesa/releases/download/geomesa-3.2.0/geomesa-kafka_2.11-3.2.0-bin.tar.gz) | + [**Redis**](https://github.com/locationtech/geomesa/releases/download/geomesa-3.2.0/geomesa-redis_2.11-3.2.0-bin.tar.gz) | + [**FileSystem**](https://github.com/locationtech/geomesa/releases/download/geomesa-3.2.0/geomesa-fs_2.11-3.2.0-bin.tar.gz) | + [**Bigtable**](https://github.com/locationtech/geomesa/releases/download/geomesa-3.2.0/geomesa-bigtable_2.11-3.2.0-bin.tar.gz) ### Verifying Downloads @@ -60,7 +60,7 @@ $ gpg2 --keyserver hkp://pool.sks-keyservers.net --recv-keys CD24F317 Then verify the file: ```bash -$ gpg2 --verify geomesa-accumulo_2.12-3.2.0-bin.tar.gz.asc geomesa-accumulo_2.12-3.2.0-bin.tar.gz +$ gpg2 --verify geomesa-accumulo_2.11-3.2.0-bin.tar.gz.asc geomesa-accumulo_2.11-3.2.0-bin.tar.gz ``` The keys currently used for signing are: @@ -97,7 +97,7 @@ You may then include the desired `geomesa-*` dependencies, for example: ```xml org.locationtech.geomesa - geomesa-utils_2.12 + geomesa-utils_2.11 3.2.0 ``` diff --git a/geomesa-accumulo/geomesa-accumulo-datastore/src/test/scala/org/locationtech/geomesa/accumulo/data/AccumuloDataStoreKeywordsTest.scala b/geomesa-accumulo/geomesa-accumulo-datastore/src/test/scala/org/locationtech/geomesa/accumulo/data/AccumuloDataStoreKeywordsTest.scala index 8cfe0838def2..7f32a21c6bc7 100644 --- a/geomesa-accumulo/geomesa-accumulo-datastore/src/test/scala/org/locationtech/geomesa/accumulo/data/AccumuloDataStoreKeywordsTest.scala +++ b/geomesa-accumulo/geomesa-accumulo-datastore/src/test/scala/org/locationtech/geomesa/accumulo/data/AccumuloDataStoreKeywordsTest.scala @@ -9,12 +9,15 @@ package org.locationtech.geomesa.accumulo.data import com.typesafe.config.ConfigFactory +import org.junit.runner.RunWith import org.locationtech.geomesa.accumulo.TestWithMultipleSfts import org.locationtech.geomesa.utils.geotools.RichSimpleFeatureType.RichSimpleFeatureType import org.locationtech.geomesa.utils.geotools.SimpleFeatureTypes +import org.specs2.runner.JUnitRunner import scala.collection.JavaConversions._ +@RunWith(classOf[JUnitRunner]) class AccumuloDataStoreKeywordsTest extends TestWithMultipleSfts { "AccumuloDataStore" should { diff --git a/geomesa-utils/src/main/scala/org/locationtech/geomesa/utils/geotools/Conversions.scala b/geomesa-utils/src/main/scala/org/locationtech/geomesa/utils/geotools/Conversions.scala index 00204213d07d..926f24445bca 100644 --- a/geomesa-utils/src/main/scala/org/locationtech/geomesa/utils/geotools/Conversions.scala +++ b/geomesa-utils/src/main/scala/org/locationtech/geomesa/utils/geotools/Conversions.scala @@ -27,6 +27,7 @@ import org.locationtech.jts.geom._ import org.opengis.feature.`type`.AttributeDescriptor import org.opengis.feature.simple.{SimpleFeature, SimpleFeatureType} +import scala.collection.JavaConverters.asScalaBufferConverter import scala.reflect.ClassTag import scala.util.Try @@ -328,8 +329,14 @@ object RichSimpleFeatureType extends Conversions { def getRemoteVersion: Option[SemanticVersion] = userData[String](RemoteVersion).map(SemanticVersion.apply) - def getKeywords: Set[String] = - userData[String](Keywords).map(_.split(KeywordsDelimiter).toSet).getOrElse(Set.empty) + def getKeywords: Set[String] = { + val foo: Set[String] = getIndices.flatMap(_.attributes).toSet + val extraKeyword: Set[String] = if (foo.nonEmpty) { + Set(s"geomesa.indices=${foo.mkString(",")}") + } else { Set() } + sft.getAttributeDescriptors.asScala.foreach{_.getType} + userData[String](Keywords).map(_.split(KeywordsDelimiter).toSet).getOrElse(Set.empty).union(extraKeyword) + } def addKeywords(keywords: Set[String]): Unit = sft.getUserData.put(Keywords, getKeywords.union(keywords).mkString(KeywordsDelimiter)) diff --git a/geomesa-utils/src/main/scala/org/locationtech/geomesa/utils/geotools/sft/SimpleFeatureSpec.scala b/geomesa-utils/src/main/scala/org/locationtech/geomesa/utils/geotools/sft/SimpleFeatureSpec.scala index f824c1a417c3..d359b6997292 100644 --- a/geomesa-utils/src/main/scala/org/locationtech/geomesa/utils/geotools/sft/SimpleFeatureSpec.scala +++ b/geomesa-utils/src/main/scala/org/locationtech/geomesa/utils/geotools/sft/SimpleFeatureSpec.scala @@ -86,6 +86,7 @@ object SimpleFeatureSpec { */ def toDescriptor: AttributeDescriptor = { val builder = new AttributeTypeBuilder().binding(clazz) + builder.setDescription("GeoMesa Description!") descriptorOptions.foreach { case (k, v) => builder.userData(k, v) } builderHook(builder) builder.buildDescriptor(name)