Hello,
I seem to be having some problems making
spatio-temporal queries in geomesa 1.1.0-rc2; notably, it
looks like something odd is happening to the temporal part of
the query. Before I show the query planner output and the
stack trace, a bit more info. Here’s the table description
from Accumulo:
~METADATA_ais_report attributes: []
mmsi:Long:index=full,latitude:Double,longitude:Double,observationTime:Date,currentHeading:Float,currentSpeed:Double,trueHeading:Integer,*geom:Point:srid=4326:index=full:index-value=true
~METADATA_ais_report dtgfield: []
observationTime
~METADATA_ais_report featureEncoding: []
kryo
~METADATA_ais_report schema: []
%~#s%2#r%#i%ais_report#cstr%0,3#gh%yyyyMMddHH#d::%~#s%3,2#gh::%~#s%#id
~METADATA_ais_report tables.idx.attr.name:
[] nrl_global_ais_500k_attr_idx
~METADATA_ais_report tables.idx.st.name:
[] nrl_global_ais_500k_st_idx
~METADATA_ais_report tables.queries.name:
[] nrl_global_ais_500k_queries
~METADATA_ais_report tables.record.name:
[] nrl_global_ais_500k_records
~METADATA_ais_report tables.sharing: []
true
~METADATA_ais_report tables.z3.name: []
nrl_global_ais_500k_ais_5freport_z3
~METADATA_ais_report version: [] 5
~METADATA_ais_report visibilities: []
If I make just the spatial query,
it works. If I make
just the temporal query, it works. It looks like both
of those queries are planned using the STIdxStrategy.
I’ve a small Accumulo cluster (3 nodes)
with geomesa-distributed-runtime-1.1.0-rc.2.jar installed in
the lib/ext directory of each node’s ACCUMULO_HOME.
It’s when I do a combined (“AND”) query
that problems occur - here’s the output of the query planner,
followed by the exception, which seems to indicate that the
temporal part is causing problems:
--
Planning Query: feature type: ais_report,
filter: [[ observationTime > Tue Jul 10 00:00:00 EDT 2012 ]
AND [ geom intersects POLYGON ((-170 -80, -170 -79, -169 -79,
-169 -80, -170 -80)) ]], [properties: ALL ]
Original filter: [[ observationTime >
Tue Jul 10 00:00:00 EDT 2012 ] AND [ geom intersects POLYGON
((-170 -80, -170 -79, -169 -79, -169 -80, -170 -80)) ]]
Rewritten filter: [[ observationTime >
Tue Jul 10 00:00:00 EDT 2012 ] AND [ geom intersects POLYGON
((-170 -80, -170 -79, -169 -79, -169 -80, -170 -80)) ]]
Strategy:
org.locationtech.geomesa.accumulo.index.Z3IdxStrategy
Transforms: None
Geometry filters: ArrayBuffer([ geom
intersects POLYGON ((-170 -80, -170 -79, -169 -79, -169 -80,
-170 -80)) ])
Temporal filters: ArrayBuffer([
observationTime > Tue Jul 10 00:00:00 EDT 2012 ])
Other filters: ArrayBuffer()
Tweaked geom filters are ArrayBuffer([ geom
intersects POLYGON ((-170 -80, -170 -79, -169 -79, -169 -80,
-170 -80)) ])
GeomsToCover: GEOMETRYCOLLECTION (POLYGON
((-170 -80, -170 -79, -169 -79, -169 -80, -170 -80)))
Interval:
2012-07-10T04:00:00.000Z/9999-12-31T23:59:59.000Z
Transforms: None
java.lang.ArithmeticException: Value cannot
fit in an int: 253402300799
at
org.joda.time.field.FieldUtils.safeToInt(FieldUtils.java:190)
at
org.joda.time.field.BaseDurationField.getDifference(BaseDurationField.java:141)
at
org.joda.time.chrono.ZonedChronology$ZonedDurationField.getDifference(ZonedChronology.java:328)
at
org.joda.time.base.BaseSingleFieldPeriod.between(BaseSingleFieldPeriod.java:72)
at
org.joda.time.Seconds.secondsBetween(Seconds.java:101)
at
org.locationtech.geomesa.accumulo.data.tables.Z3Table$.secondsInCurrentWeek(Z3Table.scala:41)
at
org.locationtech.geomesa.accumulo.index.Z3IdxStrategy.getQueryPlans(Z3IdxStrategy.scala:134)
at
org.locationtech.geomesa.accumulo.index.QueryPlanner$$anonfun$4$$anonfun$5.apply(QueryPlanner.scala:130)
at
org.locationtech.geomesa.accumulo.index.QueryPlanner$$anonfun$4$$anonfun$5.apply(QueryPlanner.scala:126)
at
scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:251)
at
scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:251)
at
scala.collection.immutable.List.foreach(List.scala:318)
at
scala.collection.TraversableLike$class.flatMap(TraversableLike.scala:251)
at
scala.collection.AbstractTraversable.flatMap(Traversable.scala:105)
at
org.locationtech.geomesa.accumulo.index.QueryPlanner$$anonfun$4.apply(QueryPlanner.scala:126)
at
org.locationtech.geomesa.accumulo.index.QueryPlanner$$anonfun$4.apply(QueryPlanner.scala:113)
at
org.locationtech.geomesa.utils.stats.MethodProfiling$class.profile(MethodProfiling.scala:26)
at
org.locationtech.geomesa.accumulo.index.QueryPlanner.profile(QueryPlanner.scala:50)
at
org.locationtech.geomesa.accumulo.index.QueryPlanner.getStrategyPlans(QueryPlanner.scala:113)
at
org.locationtech.geomesa.accumulo.index.QueryPlanner.planQuery(QueryPlanner.scala:69)
at
org.locationtech.geomesa.accumulo.data.AccumuloDataStore.planQuery(AccumuloDataStore.scala:844)
at
org.locationtech.geomesa.accumulo.data.AccumuloDataStore.explainQuery(AccumuloDataStore.scala:836)
at
sri.mast.MastQuery.main(MastQuery.java:185)
--
Any help gratefully received!
Thanks,
Ben