cql - GeoMesa导出查询错误

标签 cql accumulo 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)

最佳答案

此错误发生在 Java 7 上。GeoMesa 需要 Java 8。命令“java --version”将显示您正在使用的 Java 版本的详细信息。

您需要检查您的操作系统如何处理多个版本的 Java,并更新 JAVA_HOME 以指向 Java 8 安装。之后,您将回到正轨!

您的 CQL 过滤器和命令的其余部分看起来很棒。就我个人而言,我更喜欢“bbox”或“intersects”,因为我不必考虑参数顺序。 (如果A与B相交,则B与A相交。当A在B内时,并不意味着B在A内。)

关于cql - GeoMesa导出查询错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42784884/

相关文章:

在时间戳列上使用等于运算符的 Cassandra 查询不起作用

cassandra - 如何获取 Cassandra 中所有记录的主键?

scala - 使用 scala 迭代 Accumlo 表

Java - OSX Mavericks 上的 Accumulo init 异常 - log4j 记录器

java - 在 geomesa accumulo 数据存储中获取动物园实例的异常

hadoop - geomesa 添加属性索引失败

cassandra:您可以查询集合字段吗?

java - 如何从 java 程序启动 Hadoop、Accumulo 和 ZooKeeper?

cassandra - 时空序列的复合分区键(Cassandra)与交错索引(Accumulo、BigTable)

cassandra - 选择与特定日期对应的 timeuuid 列