[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [geomesa-users] Error while parsing action exception when calling store.getFeatureWriter
|
Hi David,
I haven't had a chance to check out your issue yet, but one of our
developers pointed to this fix as a possible solution to your issue:
https://github.com/locationtech/geomesa/commit/893549ea47cd07bfcd8257087e200c37609fa312
It was added a couple weeks after 1.3.1, and hasn't been released yet.
You could try building master from source, and see if that solves your
problem.
Thanks,
Emilio
On 07/03/2017 04:41 PM, David Boyd wrote:
All:
I think I have an ugly edge case here.
I have data that can have 0 or more coordinates in a field.
My featuretype has a multipoint geometry to deal with this.
Since geomesa requires a valid valid geometry in all features if there
are no coordinates
in the record I set a single point of lat: -90 lon: -180 in my geometry.
In this case I have created one record previously in the
OSINTRecordset feature type that has the single
dummy value.
When I go back through my code to see if I have a new record or if I
need to update an existing (See code segment below)
I get the below parsing error (See stack trace below) on the
store.getFeatureWriter call. Since the filter is only for the fid
I am not certain why geometry coordinates are even playing in the mix.
So I ran a test, and changed the coordinate in the initial record to
(50.0, 50.0). And the problem went away.
Now I do something similiar with point geometries and I do not have an
issue.
The error conditions that seem to cause this error are:
1. Multi-point geometry
2. All records with no points other than lat: -90, lon: -180
3. Call to store.getFeatureWriter with a query.
FYI - I have another data type where this also occurs.
private boolean updateFeatureIfExists(String featuresetname,
CoalesceRecord record)
throws IOException, CQLException,
CoalesceDataFormatException
{
boolean updated = false;
DataStore store = connect.getGeoDataStore();
FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2();
FeatureId fid =ff.featureId(record.getKey());
// TODO Need to add compare of modified time to see if there
was an update
Filter filter = ff.id(Collections.singleton(fid));
// Need to escape the fully qualified column in the feature
set for filters
//Filter filter =
CQL.toFilter("\""+featuresetname+".recordKey\" =" + "'" +
record.getKey() + "'");
LOGGER.warn("Check if feature for key {} exists in
featuresetname: {} , using filter:
{}",record.getKey(),featuresetname,filter.toString());
FeatureWriter<SimpleFeatureType, SimpleFeature> writer =
store.getFeatureWriter(featuresetname, filter, Transaction.AUTO_COMMIT);
if (writer.hasNext() )
{ .....
2017-07-03 15:47:18,171 | WARN | [Thread-12] |
(AccumuloPersistor.java:1620) - Check if feature for key
2f9d7f5d-6e85-4897-b418-6e5aebc442ed exists in featuresetname:
ReportArtifactRecordset , using filter: [
2f9d7f5d-6e85-4897-b418-6e5aebc442ed ]
2017-07-03 15:47:25,821 | WARN | [Thread-12] |
(AccumuloPersistor.java:1620) - Check if feature for key
3e4707b3-10b8-42dd-b7db-9fc950b9dae8 exists in featuresetname:
OERecordset , using filter: [ 3e4707b3-10b8-42dd-b7db-9fc950b9dae8 ]
2017-07-03 15:47:34,886 | WARN | [Thread-12] |
(AccumuloPersistor.java:1620) - Check if feature for key
c4f1c655-d3f9-42b0-abd3-53c7b9383d25 exists in featuresetname:
OSINTRecordset , using filter: [ c4f1c655-d3f9-42b0-abd3-53c7b9383d25 ]
2017-07-03 15:48:03,230 | ERROR | [Thread-12] |
(Reports_Consumer.java:122) - Error while parsing action
'stat/OneOrMore/ZeroOrMore/Sequence/org$locationtech$geomesa$utils$stats$StatParser$$singleStat/org$locationtech$geomesa$utils$stats$StatParser$$histogram/org$locationtech$geomesa$utils$stats$StatParser$$histogramAction1'
at input position (line 1, pos 159):
Count();MinMax("GeoLocation");MinMax("ReportDate");MinMax("recordKey");TopK("recordKey");Histogram("GeoLocation",10000,"POINT
(-190 -100)","POINT (-170
-80)");Histogram("ReportDate",1000,"2016-01-19T20:59:00.000Z","2016-01-19T21:01:00.000Z");Histogram("recordKey",1000,"7ef4d1e4-f5c4-4014-8c3c-125b86d3f8860","7ef4d1e4-f5c4-4014-8c3c-125b86d3f886z");Frequency("recordKey","ReportDate",week,20);Frequency("recordKey",20);Z3Histogram("GeoLocation","ReportDate",week,10000)
^
java.lang.IllegalArgumentException: requirement failed: Value out of
bounds ([-180.0 180.0]): -190.0
org.parboiled.errors.ParserRuntimeException: Error while parsing
action
'stat/OneOrMore/ZeroOrMore/Sequence/org$locationtech$geomesa$utils$stats$StatParser$$singleStat/org$locationtech$geomesa$utils$stats$StatParser$$histogram/org$locationtech$geomesa$utils$stats$StatParser$$histogramAction1'
at input position (line 1, pos 159):
Count();MinMax("GeoLocation");MinMax("ReportDate");MinMax("recordKey");TopK("recordKey");Histogram("GeoLocation",10000,"POINT
(-190 -100)","POINT (-170
-80)");Histogram("ReportDate",1000,"2016-01-19T20:59:00.000Z","2016-01-19T21:01:00.000Z");Histogram("recordKey",1000,"7ef4d1e4-f5c4-4014-8c3c-125b86d3f8860","7ef4d1e4-f5c4-4014-8c3c-125b86d3f886z");Frequency("recordKey","ReportDate",week,20);Frequency("recordKey",20);Z3Histogram("GeoLocation","ReportDate",week,10000)
^
java.lang.IllegalArgumentException: requirement failed: Value out of
bounds ([-180.0 180.0]): -190.0
at org.parboiled.MatcherContext.runMatcher(MatcherContext.java:366)
at
org.parboiled.matchers.SequenceMatcher.match(SequenceMatcher.java:46)
at
org.parboiled.parserunners.BasicParseRunner.match(BasicParseRunner.java:77)
at org.parboiled.MatcherContext.runMatcher(MatcherContext.java:351)
at
org.parboiled.matchers.FirstOfMatcher.match(FirstOfMatcher.java:41)
at
org.parboiled.parserunners.BasicParseRunner.match(BasicParseRunner.java:77)
at org.parboiled.MatcherContext.runMatcher(MatcherContext.java:351)
at
org.parboiled.matchers.SequenceMatcher.match(SequenceMatcher.java:46)
at
org.parboiled.parserunners.BasicParseRunner.match(BasicParseRunner.java:77)
at org.parboiled.MatcherContext.runMatcher(MatcherContext.java:351)
at
org.parboiled.matchers.ZeroOrMoreMatcher.match(ZeroOrMoreMatcher.java:39)
at
org.parboiled.parserunners.BasicParseRunner.match(BasicParseRunner.java:77)
at org.parboiled.MatcherContext.runMatcher(MatcherContext.java:351)
at
org.parboiled.matchers.SequenceMatcher.match(SequenceMatcher.java:46)
at
org.parboiled.parserunners.BasicParseRunner.match(BasicParseRunner.java:77)
at org.parboiled.MatcherContext.runMatcher(MatcherContext.java:351)
at
org.parboiled.matchers.SequenceMatcher.match(SequenceMatcher.java:46)
at
org.parboiled.parserunners.BasicParseRunner.match(BasicParseRunner.java:77)
at org.parboiled.MatcherContext.runMatcher(MatcherContext.java:351)
at
org.parboiled.parserunners.BasicParseRunner.run(BasicParseRunner.java:72)
at
org.parboiled.parserunners.ReportingParseRunner.runBasicMatch(ReportingParseRunner.java:86)
at
org.parboiled.parserunners.ReportingParseRunner.run(ReportingParseRunner.java:66)
at
org.parboiled.scala.parserunners.ReportingParseRunner.run(ReportingParseRunner.scala:34)
at
org.locationtech.geomesa.utils.stats.StatParser$.parse(StatParser.scala:36)
at org.locationtech.geomesa.utils.stats.Stat$.apply(Stat.scala:115)
at
org.locationtech.geomesa.accumulo.data.stats.AccumuloGeoMesaStats$$anonfun$statUpdater$1.apply(AccumuloGeoMesaStats.scala:116)
at
org.locationtech.geomesa.accumulo.data.stats.AccumuloGeoMesaStats$$anonfun$statUpdater$1.apply(AccumuloGeoMesaStats.scala:116)
at
org.locationtech.geomesa.index.stats.MetadataStatUpdater.<init>(MetadataBackedStats.scala:323)
at
org.locationtech.geomesa.accumulo.data.stats.AccumuloGeoMesaStats.statUpdater(AccumuloGeoMesaStats.scala:116)
at
org.locationtech.geomesa.index.geotools.GeoMesaFeatureWriter.<init>(GeoMesaFeatureWriter.scala:112)
at
org.locationtech.geomesa.accumulo.data.AccumuloModifyFeatureWriter.<init>(AccumuloFeatureWriter.scala:30)
at
org.locationtech.geomesa.accumulo.data.AccumuloDataStore.createFeatureWriterModify(AccumuloDataStore.scala:87)
at
org.locationtech.geomesa.index.geotools.GeoMesaDataStore.getFeatureWriter(GeoMesaDataStore.scala:387)
at
org.locationtech.geomesa.index.geotools.GeoMesaDataStore.getFeatureWriter(GeoMesaDataStore.scala:49)
at
com.incadencecorp.coalesce.framework.persistance.accumulo.AccumuloPersistor.updateFeatureIfExists(AccumuloPersistor.java:1621)
at
com.incadencecorp.coalesce.framework.persistance.accumulo.AccumuloPersistor.addNewFeatureForRecordSet(AccumuloPersistor.java:1499)
at
com.incadencecorp.coalesce.framework.persistance.accumulo.AccumuloPersistor.persistEntitySearchData(AccumuloPersistor.java:1337)
at
com.incadencecorp.coalesce.framework.persistance.accumulo.AccumuloPersistor.persistEntityObject(AccumuloPersistor.java:1144)
at
com.incadencecorp.coalesce.framework.persistance.accumulo.AccumuloPersistor.flattenObject(AccumuloPersistor.java:1057)
at
com.incadencecorp.coalesce.framework.persistance.CoalescePersistorBase.saveEntity(CoalescePersistorBase.java:99)
at
com.incadencecorp.coalesce.framework.CoalesceFramework.saveCoalesceEntity(CoalesceFramework.java:451)
at
com.incadencecorp.oe.ingest.reports.Reports_Consumer.run(Reports_Consumer.java:83)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalArgumentException: requirement failed:
Value out of bounds ([-180.0 180.0]): -190.0
at scala.Predef$.require(Predef.scala:224)
at
org.locationtech.geomesa.curve.NormalizedDimension$class.normalize(NormalizedDimension.scala:17)
at
org.locationtech.geomesa.curve.NormalizedLon.normalize(NormalizedDimension.scala:28)
at org.locationtech.geomesa.curve.Z2SFC$.index(Z2SFC.scala:22)
at
org.locationtech.geomesa.utils.stats.BinnedGeometryArray.convertToLong(BinnedArray.scala:221)
at
org.locationtech.geomesa.utils.stats.BinnedGeometryArray.convertToLong(BinnedArray.scala:212)
at
org.locationtech.geomesa.utils.stats.WholeNumberBinnedArray.<init>(BinnedArray.scala:131)
at
org.locationtech.geomesa.utils.stats.BinnedGeometryArray.<init>(BinnedArray.scala:213)
at
org.locationtech.geomesa.utils.stats.BinnedArray$.apply(BinnedArray.scala:121)
at
org.locationtech.geomesa.utils.stats.Histogram.<init>(Histogram.scala:36)
at
org.locationtech.geomesa.utils.stats.StatParser$$anonfun$org$locationtech$geomesa$utils$stats$StatParser$$histogram$1$$anonfun$apply$7.apply(StatParser.scala:113)
at
org.locationtech.geomesa.utils.stats.StatParser$$anonfun$org$locationtech$geomesa$utils$stats$StatParser$$histogram$1$$anonfun$apply$7.apply(StatParser.scala:107)
at
org.parboiled.scala.rules.Rule$$anonfun$exec$4.apply(Rule.scala:221)
at
org.parboiled.scala.rules.Rule$$anonfun$exec$4.apply(Rule.scala:217)
at
org.parboiled.scala.rules.Rule$$anonfun$push$1.apply(Rule.scala:133)
at
org.parboiled.scala.rules.Rule$$anonfun$push$1.apply(Rule.scala:132)
at org.parboiled.scala.rules.Rule$$anon$1.run(Rule.scala:129)
at org.parboiled.matchers.ActionMatcher.match(ActionMatcher.java:96)
at
org.parboiled.parserunners.BasicParseRunner.match(BasicParseRunner.java:77)
at org.parboiled.MatcherContext.runMatcher(MatcherContext.java:351)
... 42 more