2017-03-14 73 views
4

問題: 當我嘗試運行下面的查詢時,它會給出錯誤。 CQL查詢中是否缺少某些內容或缺少一個jar文件?還有它是否只是一個GeoMesa錯誤或accumulo錯誤。有沒有其他的方式來查詢GeoMesa並獲得CSV文件的結果?GeoMesa導出查詢錯誤

命名空間: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) 

回答

3

與Java 7中會出現此錯誤GeoMesa需要Java 8。命令'java --version'會顯示告訴你正在使用的Java版本的細節。

您需要檢查您的操作系統如何處理多個版本的Java,並將JAVA_HOME更新爲指向Java 8安裝。之後,你會回到正軌!

您的CQL過濾器和其他命令看起來不錯。我個人更喜歡'bbox'或'intersects',因爲我不必考慮論證順序。 (如果A與B相交,則B與A相交。當A在B內時,並不意味着B在A內。)

+0

謝謝你做了個訣竅。我安裝了Java 7。切換到Java 8工作。 – kaxil

+0

太棒了!聽到那個消息很開心! – GeoMesaJim