Ошибка запроса экспорта GeoMesa

Проблема: когда я пытаюсь выполнить запрос ниже, возникает ошибка. Что-то отсутствует в запросе CQL или отсутствует файл jar? Также, является ли это просто ошибкой GeoMesa или накопительной ошибкой. Есть ли другой способ запросить GeoMesa и получить результаты в файле CSV?

Пространство имен: myNamespace
Коллекция: d1temp

Запрос:

geomesa export -u user -p password -c myNamespace.d1temp -f d1-json -q "WITHIN(geom, POLYGON((-6.4101 55.597244,-6.4101 50.947156,0.656067 50.947156,0.656067 55.597244,-6.4101 55.597244)))"

Ошибка:

id,*geom:Point:srid=4326,short_text_field:String,long_text_field_1:String,long_text_field_2:String,security_tag:String,numerical_tag_1:Integer,numerical_tag_2:Double,timestamp:Date
Exception in thread "main" java.lang.NoSuchMethodError: java.util.ArrayList.sort(Ljava/util/Comparator;)V
    at org.locationtech.sfcurve.zorder.ZN.zranges(ZN.scala:212)
    at org.locationtech.geomesa.curve.Z2SFC$.ranges(Z2SFC.scala:33)
    at org.locationtech.geomesa.accumulo.index.z2.Z2QueryableIndex$class.getQueryPlan(Z2QueryableIndex.scala:119)
    at org.locationtech.geomesa.accumulo.index.z2.Z2Index$.getQueryPlan(Z2Index.scala:20)
    at org.locationtech.geomesa.accumulo.index.z2.Z2Index$.getQueryPlan(Z2Index.scala:20)
    at org.locationtech.geomesa.accumulo.index.QueryPlanner$$anonfun$getQueryPlans$7$$anonfun$4.apply(QueryPlanner.scala:150)
    at org.locationtech.geomesa.accumulo.index.QueryPlanner$$anonfun$getQueryPlans$7$$anonfun$4.apply(QueryPlanner.scala:150)
    at org.locationtech.geomesa.utils.stats.MethodProfiling$class.profile(MethodProfiling.scala:20)
    at org.locationtech.geomesa.accumulo.index.QueryPlanner.profile(QueryPlanner.scala:56)
    at org.locationtech.geomesa.accumulo.index.QueryPlanner$$anonfun$getQueryPlans$7.apply(QueryPlanner.scala:150)
    at org.locationtech.geomesa.accumulo.index.QueryPlanner$$anonfun$getQueryPlans$7.apply(QueryPlanner.scala:144)
    at scala.collection.Iterator$$anon$12.hasNext(Iterator.scala:396)
    at org.locationtech.geomesa.accumulo.util.CloseableIterator$$anon$5.hasNext(CloseableIterator.scala:34)
    at org.locationtech.geomesa.accumulo.util.SelfClosingIterator$$anon$1.hasNext(CloseableIterator.scala:100)
    at org.locationtech.geomesa.accumulo.util.CloseableIterator$$anon$2.<init>(CloseableIterator.scala:66)
    at org.locationtech.geomesa.accumulo.util.CloseableIterator$class.ciFlatMap(CloseableIterator.scala:65)
    at org.locationtech.geomesa.accumulo.util.SelfClosingIterator$$anon$1.ciFlatMap(CloseableIterator.scala:98)
    at org.locationtech.geomesa.accumulo.index.QueryPlanner.scan$1(QueryPlanner.scala:87)
    at org.locationtech.geomesa.accumulo.index.QueryPlanner.executePlans(QueryPlanner.scala:108)
    at org.locationtech.geomesa.accumulo.index.QueryPlanner.runQuery(QueryPlanner.scala:78)
    at org.locationtech.geomesa.accumulo.data.AccumuloFeatureReaderWithStats$$anonfun$2.apply(AccumuloFeatureReader.scala:86)
    at org.locationtech.geomesa.accumulo.data.AccumuloFeatureReaderWithStats$$anonfun$2.apply(AccumuloFeatureReader.scala:86)
    at org.locationtech.geomesa.utils.stats.MethodProfiling$class.profile(MethodProfiling.scala:26)
    at org.locationtech.geomesa.accumulo.data.AccumuloFeatureReaderWithStats.profile(AccumuloFeatureReader.scala:77)
    at org.locationtech.geomesa.accumulo.data.AccumuloFeatureReaderWithStats.<init>(AccumuloFeatureReader.scala:86)
    at org.locationtech.geomesa.accumulo.data.AccumuloFeatureReader$$anon$3.<init>(AccumuloFeatureReader.scala:55)
    at org.locationtech.geomesa.accumulo.data.AccumuloFeatureReader$.apply(AccumuloFeatureReader.scala:55)
    at org.locationtech.geomesa.accumulo.data.AccumuloDataStore.getFeatureReader(AccumuloDataStore.scala:439)
    at org.locationtech.geomesa.accumulo.data.AccumuloFeatureCollection.reader(AccumuloFeatureSource.scala:171)
    at org.geotools.data.store.DataFeatureCollection.openIterator(DataFeatureCollection.java:230)
    at org.locationtech.geomesa.accumulo.data.AccumuloFeatureCollection.openIterator(AccumuloFeatureSource.scala:134)
    at org.geotools.data.store.DataFeatureCollection.iterator(DataFeatureCollection.java:198)
    at org.geotools.data.store.DataFeatureCollection.features(DataFeatureCollection.java:187)
    at org.locationtech.geomesa.tools.accumulo.DelimitedExport.write(FeatureExporter.scala:156)
    at org.locationtech.geomesa.tools.accumulo.commands.ExportCommand.execute(ExportCommand.scala:52)
    at org.locationtech.geomesa.tools.common.Runner$class.main(Runner.scala:26)
    at org.locationtech.geomesa.tools.accumulo.AccumuloRunner$.main(AccumuloRunner.scala:20)
    at org.locationtech.geomesa.tools.accumulo.AccumuloRunner.main(AccumuloRunner.scala)

person kaxil    schedule 14.03.2017    source источник


Ответы (1)


Эта ошибка возникает с Java 7. Для GeoMesa требуется Java 8. Команда 'java --version' покажет вам сведения об используемой вами версии Java.

Вам нужно будет проверить, как ваша ОС обрабатывает несколько версий Java, и обновить JAVA_HOME, чтобы указать на установку Java 8. После этого вы вернетесь на правильный путь!

Ваши фильтры CQL и остальная часть команды выглядят великолепно. Лично я предпочитаю "bbox" или "intersects", так как мне не нужно думать о порядке аргументов. (Если A пересекает B, то B пересекает A. Когда A находится внутри B, это не означает, что B находится внутри A.)

person GeoMesaJim    schedule 14.03.2017
comment
Спасибо, это сработало. У меня была установлена ​​Java 7. Переход на Java 8 сработал. - person kaxil; 14.03.2017
comment
Потрясающий! Рад это слышать! - person GeoMesaJim; 14.03.2017