Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GEOMESA-176 Implement an 'explain' query feature.
Adds an 'explainQuery' feature. As a rough example/guide try this in the Maven Scala console (i.e., run 'mvn scala:console -pl geomesa-core'): import org.geotools.data._ import geomesa.core.filter.TestFilters._ import org.geotools.filter.text.ecql.ECQL val aparams = Map( "instanceId" -> "INSTANCE_ID", "zookeepers" -> "ZOOKEEPERS", "user" -> "USERNAME", "password"-> new String("PASSWORD"), "auths"-> "AUTHS", "tableName"-> "TABLE_NAME", "useMapReduce" -> "false") val ds = DataStoreFinder.getDataStore(aparams) val q = new Query() val t = Transaction.AUTO_COMMIT q.setTypeName("gdelt") val afr = ds.getFeatureReader(q, t).asInstanceOf[AccumuloFeatureReader] val is = afr.indexSchema is.explainQuery(q) val fs = "INTERSECTS(geom, POLYGON ((41 28, 42 28, 42 29, 41 29, 41 28)))" val f = ECQL.toFilter(fs) q.setFilter(f) is.explainQuery(q)
- Loading branch information
Showing
10 changed files
with
299 additions
and
83 deletions.
There are no files selected for viewing
32 changes: 32 additions & 0 deletions
32
geomesa-core/src/main/scala/geomesa/core/data/AccumuloConnectorCreator.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package geomesa.core.data | ||
|
||
import com.typesafe.scalalogging.slf4j.Logging | ||
import org.apache.accumulo.core.client.{BatchScanner, Scanner} | ||
import org.opengis.feature.simple.SimpleFeatureType | ||
|
||
trait AccumuloConnectorCreator extends Logging { | ||
|
||
/** | ||
* Create a BatchScanner for the SpatioTemporal Index Table | ||
* | ||
* @param numThreads number of threads for the BatchScanner | ||
*/ | ||
def createSpatioTemporalIdxScanner(sft: SimpleFeatureType, numThreads: Int): BatchScanner | ||
|
||
/** | ||
* Create a BatchScanner for the SpatioTemporal Index Table | ||
*/ | ||
def createSTIdxScanner(sft: SimpleFeatureType): BatchScanner | ||
|
||
/** | ||
* Create a Scanner for the Attribute Table (Inverted Index Table) | ||
*/ | ||
def createAttrIdxScanner(sft: SimpleFeatureType): Scanner | ||
|
||
/** | ||
* Create a BatchScanner to retrieve only Records (SimpleFeatures) | ||
*/ | ||
def createRecordScanner(sft: SimpleFeatureType, numThreads: Int = 0) : BatchScanner | ||
|
||
def catalogTableFormat(sft: SimpleFeatureType): Boolean | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.