locationtech/geomesa — pull request #180 by jnh5y (2014-07-31 04:24:01+00:00)
Title: GEOMESA-240 Re-enable explainQuery

* The explainQuery function was disabled. This pr adds back an explainQuery function to the
AccumuloFeatureReader class.
* Additional planning time information has been added.

An archetypal invocation now looks like

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]

afr.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)

afr.explainQuery(q)