locationtech/geomesa — pull request #391 by jnh5y (2014-12-11 21:57:17+00:00)
Title: GEOMESA-126 Improve GeoServer WMS GetCapabilities handling for time enab...

...led layers

For time-enabled layers, GeoServer calculates the time extent by looking at all the features in a FeatureStore.
For large datasets, this is incredibly slow. This pr helps rectify this issue by

* Calculating and updating a time interval while writing features to GeoMesa.
* AccumuloFeatureCollections retrieve stored time extent data in response to Min/MaxVisitors.
If no such metadata is present, the interval returned is 1970 until now.
* Updating the Caching functionality to return a new CachingAccumuloFeatureCollection.
Such CachingAFCs provide access to the AFC class and store the results of 'features' in a private lazy val.

NB: In order for this to work properly, there are two GeoServer related caveats:
1. The SimpleFeatureType's name must match the layer name in GeoServer.
If not, then GeoServer will wrap the AFC in a retyping collection.
2. Given the current state of CRS handling, the layer must use SRS Handling 'Keep Native'.
If not, GeoServer will wrap the AFC in a collection to force the declared CRS.

Either of these wrappings mess prevent GeoMesa from intercepting the visitors as intended and produce full table scans.