Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [geomesa-dev] Geomesa Feature Count always returning zero!!!

Sure.
I will re-run my benchmarks after removing cardinality. Answering to your question "How many of the records actually match your query?", well it is 1 million.

On Wed, Apr 26, 2017 at 7:20 PM, Emilio Lahr-Vivaz <elahrvivaz@xxxxxxxx> wrote:
Oh, I wanted to point out one other thing. Setting 'cardinality=low' on an attribute will effectively prevent that attribute index from ever being used. It's kind of pointless, as it would be better to just not index it at all... as an alternative to 'high' (which prioritizes the attribute index), just don't set any cardinality hint.

Thanks,

Emilio

On 04/26/2017 09:29 AM, Emilio Lahr-Vivaz wrote:
Hi Suresh,

It looks from the explain logging like everything is running correctly. I'm guessing that the slowness is due to lack of parallelism. By default we split the attribute table with one split per attribute being indexed. How many of the records actually match your query? If the number is large, then likely the entire processing is being done on a single tablet server, so you're not taking advantage of your full cluster. If this is indeed the problem, you can manually add split points, or lower the split threshold for the attribute table to spread the load some.

You can can check split points through the accumulo shell, or through the accumulo monitor UI. You can also verify which tablet servers are being hit by by your query through the monitor UI.

Hope that helps, if not circle back and let us know.

Thanks,

Emilio

On 04/26/2017 07:41 AM, Suresh Prajapati wrote:
I am not able to understand why stats count is taking such a long time though only 1 million record exists?.
What factors can affect this time?
What going miserably wrong?

On Wed, Apr 26, 2017 at 4:26 PM, Suresh Prajapati <sureshpraja1234@xxxxxxxxx> wrote:
Thank You Emillio

I enabled explain logging. Here is my log details.

[2017-04-26 16:16:31,537] TRACE Explainer: Planning 'aj_v53' r = 31
0 [Thread-5] TRACE org.locationtech.geomesa.index.utils.Explainer  - Planning 'aj_v53' r = 31
[2017-04-26 16:16:31,539] TRACE Explainer:   Original filter: r = 31
2 [Thread-5] TRACE org.locationtech.geomesa.index.utils.Explainer  -   Original filter: r = 31
[2017-04-26 16:16:31,540] TRACE Explainer:   Hints: density[false] bin[false] stats[false] map-aggregate[false] sampling[none]
3 [Thread-5] TRACE org.locationtech.geomesa.index.utils.Explainer  -   Hints: density[false] bin[false] stats[false] map-aggregate[false] sampling[none]
[2017-04-26 16:16:31,541] TRACE Explainer:   Sort: none
4 [Thread-5] TRACE org.locationtech.geomesa.index.utils.Explainer  -   Sort: none
[2017-04-26 16:16:31,542] TRACE Explainer:   Transforms: g=g
5 [Thread-5] TRACE org.locationtech.geomesa.index.utils.Explainer  -   Transforms: g=g
[2017-04-26 16:16:31,543] TRACE Explainer:   Strategy selection:
6 [Thread-5] TRACE org.locationtech.geomesa.index.utils.Explainer  -   Strategy selection:
[2017-04-26 16:16:31,565] TRACE Explainer:     Query processing took 19ms and produced 1 options
28 [Thread-5] TRACE org.locationtech.geomesa.index.utils.Explainer  -     Query processing took 19ms and produced 1 options
[2017-04-26 16:16:31,567] TRACE Explainer:     Filter plan: FilterPlan[AttributeIndex[r = 31][None]]
30 [Thread-5] TRACE org.locationtech.geomesa.index.utils.Explainer  -     Filter plan: FilterPlan[AttributeIndex[r = 31][None]]
[2017-04-26 16:16:31,568] TRACE Explainer:     Strategy selection took 2ms for 1 options
31 [Thread-5] TRACE org.locationtech.geomesa.index.utils.Explainer  -     Strategy selection took 2ms for 1 options
[2017-04-26 16:16:31,569] TRACE Explainer:   Strategy 1 of 1: AttributeIndex
32 [Thread-5] TRACE org.locationtech.geomesa.index.utils.Explainer  -   Strategy 1 of 1: AttributeIndex
[2017-04-26 16:16:31,570] TRACE Explainer:     Strategy filter: AttributeIndex[r = 31][None]
33 [Thread-5] TRACE org.locationtech.geomesa.index.utils.Explainer  -     Strategy filter: AttributeIndex[r = 31][None]
[2017-04-26 16:16:31,620] TRACE Explainer:     Plan: org.locationtech.geomesa.accumulo.index.BatchScanPlan
83 [Thread-5] TRACE org.locationtech.geomesa.index.utils.Explainer  -     Plan: org.locationtech.geomesa.accumulo.index.BatchScanPlan
[2017-04-26 16:16:31,621] TRACE Explainer:       Table: aj_v53_attr_v4
84 [Thread-5] TRACE org.locationtech.geomesa.index.utils.Explainer  -       Table: aj_v53_attr_v4
[2017-04-26 16:16:31,622] TRACE Explainer:       Deduplicate: false
85 [Thread-5] TRACE org.locationtech.geomesa.index.utils.Explainer  -       Deduplicate: false
[2017-04-26 16:16:31,622] TRACE Explainer:       Column Families (1): List(I)
85 [Thread-5] TRACE org.locationtech.geomesa.index.utils.Explainer  -       Column Families (1): List(I)
[2017-04-26 16:16:31,624] TRACE Explainer:       Ranges (1): [%01;%00;%00;800000000000001f%00;::%01;%00;%00;800000000000001f%01;)
87 [Thread-5] TRACE org.locationtech.geomesa.index.utils.Explainer  -       Ranges (1): [%01;%00;%00;800000000000001f%00;::%01;%00;%00;800000000000001f%01;)
[2017-04-26 16:16:31,626] TRACE Explainer:       Iterators (1):
89 [Thread-5] TRACE org.locationtech.geomesa.index.utils.Explainer  -       Iterators (1):
[2017-04-26 16:16:31,628] TRACE Explainer:         name:filter-transform-iter, priority:25, class:org.locationtech.geomesa.accumulo.iterators.KryoLazyFilterTransformIterator, properties:{sft=*g:Point:srid=4326,ts:Date;geomesa.index.dtg='ts',geomesa.table.sharing='true',geomesa.indices='attr:4:3,records:2:3,z2:3:3',geomesa.table.sharing.prefix='\u0001', tdefs=g=g, index=attr:4, tsft=*g:Point:srid=4326}
91 [Thread-5] TRACE org.locationtech.geomesa.index.utils.Explainer  -         name:filter-transform-iter, priority:25, class:org.locationtech.geomesa.accumulo.iterators.KryoLazyFilterTransformIterator, properties:{sft=*g:Point:srid=4326,ts:Date;geomesa.index.dtg='ts',geomesa.table.sharing='true',geomesa.indices='attr:4:3,records:2:3,z2:3:3',geomesa.table.sharing.prefix='\u0001', tdefs=g=g, index=attr:4, tsft=*g:Point:srid=4326}
[2017-04-26 16:16:31,629] TRACE Explainer:     Plan creation took 49ms
92 [Thread-5] TRACE org.locationtech.geomesa.index.utils.Explainer  -     Plan creation took 49ms
[2017-04-26 16:16:31,630] TRACE Explainer:   Query planning took 137ms
93 [Thread-5] TRACE org.locationtech.geomesa.index.utils.Explainer  -   Query planning took 137ms
[2017-04-26 16:16:31,644] TRACE Explainer: Planning 'aj_v53' r = 31
107 [Thread-5] TRACE org.locationtech.geomesa.index.utils.Explainer  - Planning 'aj_v53' r = 31
[2017-04-26 16:16:31,644] TRACE Explainer:   Original filter: r = 31
107 [Thread-5] TRACE org.locationtech.geomesa.index.utils.Explainer  -   Original filter: r = 31
[2017-04-26 16:16:31,644] TRACE Explainer:   Hints: density[false] bin[false] stats[true] map-aggregate[false] sampling[none]
107 [Thread-5] TRACE org.locationtech.geomesa.index.utils.Explainer  -   Hints: density[false] bin[false] stats[true] map-aggregate[false] sampling[none]
[2017-04-26 16:16:31,644] TRACE Explainer:   Sort: none
107 [Thread-5] TRACE org.locationtech.geomesa.index.utils.Explainer  -   Sort: none
[2017-04-26 16:16:31,644] TRACE Explainer:   Transforms: None
107 [Thread-5] TRACE org.locationtech.geomesa.index.utils.Explainer  -   Transforms: None
[2017-04-26 16:16:31,644] TRACE Explainer:   Strategy selection:
107 [Thread-5] TRACE org.locationtech.geomesa.index.utils.Explainer  -   Strategy selection:
[2017-04-26 16:16:31,646] TRACE Explainer:     Query processing took 1ms and produced 1 options
109 [Thread-5] TRACE org.locationtech.geomesa.index.utils.Explainer  -     Query processing took 1ms and produced 1 options
[2017-04-26 16:16:31,646] TRACE Explainer:     Filter plan: FilterPlan[AttributeIndex[r = 31][None]]
109 [Thread-5] TRACE org.locationtech.geomesa.index.utils.Explainer  -     Filter plan: FilterPlan[AttributeIndex[r = 31][None]]
[2017-04-26 16:16:31,647] TRACE Explainer:     Strategy selection took 0ms for 1 options
110 [Thread-5] TRACE org.locationtech.geomesa.index.utils.Explainer  -     Strategy selection took 0ms for 1 options
[2017-04-26 16:16:31,647] TRACE Explainer:   Strategy 1 of 1: AttributeIndex
110 [Thread-5] TRACE org.locationtech.geomesa.index.utils.Explainer  -   Strategy 1 of 1: AttributeIndex
[2017-04-26 16:16:31,647] TRACE Explainer:     Strategy filter: AttributeIndex[r = 31][None]
110 [Thread-5] TRACE org.locationtech.geomesa.index.utils.Explainer  -     Strategy filter: AttributeIndex[r = 31][None]
[2017-04-26 16:16:31,656] TRACE Explainer:     Plan: org.locationtech.geomesa.accumulo.index.BatchScanPlan
119 [Thread-5] TRACE org.locationtech.geomesa.index.utils.Explainer  -     Plan: org.locationtech.geomesa.accumulo.index.BatchScanPlan
[2017-04-26 16:16:31,656] TRACE Explainer:       Table: aj_v53_attr_v4
119 [Thread-5] TRACE org.locationtech.geomesa.index.utils.Explainer  -       Table: aj_v53_attr_v4
[2017-04-26 16:16:31,656] TRACE Explainer:       Deduplicate: false
119 [Thread-5] TRACE org.locationtech.geomesa.index.utils.Explainer  -       Deduplicate: false
[2017-04-26 16:16:31,656] TRACE Explainer:       Column Families (1): List(I)
119 [Thread-5] TRACE org.locationtech.geomesa.index.utils.Explainer  -       Column Families (1): List(I)
[2017-04-26 16:16:31,657] TRACE Explainer:       Ranges (1): [%01;%00;%00;800000000000001f%00;::%01;%00;%00;800000000000001f%01;)
120 [Thread-5] TRACE org.locationtech.geomesa.index.utils.Explainer  -       Ranges (1): [%01;%00;%00;800000000000001f%00;::%01;%00;%00;800000000000001f%01;)
[2017-04-26 16:16:31,657] TRACE Explainer:       Iterators (1):
120 [Thread-5] TRACE org.locationtech.geomesa.index.utils.Explainer  -       Iterators (1):
[2017-04-26 16:16:31,657] TRACE Explainer:         name:stats-iter, priority:30, class:org.locationtech.geomesa.accumulo.iterators.KryoLazyStatsIterator, properties:{sft=*g:Point:srid=4326,ts:Date;geomesa.index.dtg='ts',geomesa.table.sharing='true',geomesa.indices='attr:4:3,records:2:3,z2:3:3',geomesa.table.sharing.prefix='\u0001', dupes=false, index=attr:4, geomesa.stats.string=Count()}
120 [Thread-5] TRACE org.locationtech.geomesa.index.utils.Explainer  -         name:stats-iter, priority:30, class:org.locationtech.geomesa.accumulo.iterators.KryoLazyStatsIterator, properties:{sft=*g:Point:srid=4326,ts:Date;geomesa.index.dtg='ts',geomesa.table.sharing='true',geomesa.indices='attr:4:3,records:2:3,z2:3:3',geomesa.table.sharing.prefix='\u0001', dupes=false, index=attr:4, geomesa.stats.string=Count()}
[2017-04-26 16:16:31,657] TRACE Explainer:     Plan creation took 9ms
120 [Thread-5] TRACE org.locationtech.geomesa.index.utils.Explainer  -     Plan creation took 9ms
[2017-04-26 16:16:31,658] TRACE Explainer:   Query planning took 17ms
121 [Thread-5] TRACE org.locationtech.geomesa.index.utils.Explainer  -   Query planning took 17ms


Once again
Thank You
Suresh Prajapati

On Tue, Apr 25, 2017 at 6:51 PM, Emilio Lahr-Vivaz <elahrvivaz@xxxxxxxx> wrote:
Hi Suresh,

By default count will return an estimate using cached statistics. You can force it to make an exact count using query hints or system properties:

http://www.geomesa.org/documentation/user/datastores/query_config.html#exact-counts

Note, however, that in the end it will still be calling the stats.getCount method that you were trying earlier. The hints/sys props just control the 'exact' flag that gets passed into that method.

In general counts in a no-sql database are expensive...

Can you try enabling explain logging and report back what it says for your stats query? You just need to configure your logger so that ' org.locationtech.geomesa.index.utils.Explainer' is set to trace logging. E.g. for log4j xml it would be like:

https://github.com/locationtech/geomesa/blob/master/geomesa-accumulo/geomesa-accumulo-datastore/src/test/resources/log4j.xml#L27-L29

Thanks,

Emilio


On 04/25/2017 06:16 AM, Suresh Prajapati wrote:
Hello Everyone

I am developing geomesa client to perform basic read write and delete operations. I have also created a function which will return matching feature count for specified query, however it always returns zero, i also tried DataStore stats for fetching the matching feature count but it is very slow. Below is my client code: 

package com.hps;


import java.io.FileInputStream;

import java.nio.ByteBuffer;

import java.nio.channels.FileChannel;

import java.util.Arrays;

import java.util.Map;


import org.geotools.data.DataStore;

import org.geotools.data.DataStoreFinder;

import org.geotools.data.FeatureSource;

import org.geotools.data.FeatureStore;

import org.geotools.data.Query;

import org.geotools.data.Transaction;

import org.geotools.data.shapefile.dbf.DbaseFileHeader;

import org.geotools.data.simple.SimpleFeatureIterator;

import org.geotools.data.simple.SimpleFeatureSource;

import org.geotools.factory.Hints;

import org.geotools.filter.text.cql2.CQL;

import org.geotools.filter.text.ecql.ECQL;

import org.geotools.geometry.jts.JTSFactoryFinder;

import org.locationtech.geomesa.accumulo.data.AccumuloAppendFeatureWriter;

import org.locationtech.geomesa.accumulo.data.AccumuloDataStore;

import org.locationtech.geomesa.index.utils.ExplainLogging;

import org.locationtech.geomesa.utils.interop.SimpleFeatureTypes;

import org.opengis.feature.simple.SimpleFeature;

import org.opengis.feature.simple.SimpleFeatureType;


import com.hps.schemas.Event;

import com.hps.schemas.QueryAdvanced;

import com.hps.schemas.QueryBasic;

import com.vividsolutions.jts.geom.Coordinate;


public class GeomesaClient {

  private AccumuloDataStore ds = null;

  private AccumuloAppendFeatureWriter fw = null;

  private SimpleFeatureSource sfs = null;

  private FeatureSource fs = null;

  private String tableName = "";

  private boolean isFlushed = true;

  private long lastFlushTs = 0;

  private FeatureStore fst = null;

  private SimpleFeatureType sft;


  public interface QueryListener {

    public void onFeature(SimpleFeature f);

  }


  public GeomesaClient(Map<String, String> dsConfthrows Exception {

    this.ds = (AccumuloDataStore) DataStoreFinder.getDataStore(dsConf);

    this.tableName = dsConf.get("tableName");


    sft = createFeatureType();


    if(!Arrays.asList(this.ds.getTypeNames()).contains(sft.getTypeName())){

      ds.createSchema(sft);

    }


    this.fw = (AccumuloAppendFeatureWriter) (this.ds.getFeatureWriterAppend(sft.getTypeName(),

        Transaction.AUTO_COMMIT));

    this.sfs = ds.getFeatureSource(sft.getTypeName());

    this.fs = ((DataStore) ds).getFeatureSource(sft.getTypeName());


    this.fst = (FeatureStoresfs;

  }


  private SimpleFeatureType createFeatureType() {

    try{

      StringBuilder simpleFeatureTypeBuilder = new StringBuilder();

      simpleFeatureTypeBuilder.append("r:Long:index=true:cardinality=high,");


      // device data

      // "*g:Point:srid=4326," + "di:Integer:index=full:cardinality=high," +

      // "al:Float:index=join:cardinality=low,"

      // + "s:Float:index=join:cardinality=low," +

      // "b:Float:index=join:cardinality=low,"

      // + "an:Float:index=join:cardinality=low," +

      // "he:Float:index=join:cardinality=low,"

      // + "ve:Float:index=join:cardinality=low," +

      // "t:Float:index=join:cardinality=low,"

      // + "m:Boolean:index=join:cardinality=low," +

      // "i:Boolean:index=join:cardinality=low,"

      // + "ts:Long:index=join:cardinality=low;" +

      // "geomesa.indexes.enabled='attr_idx,records,z2'";


      // simpleFeatureTypeBuilder.append("*g:Point:srid=4326,");

      // simpleFeatureTypeBuilder.append("di:Integer,");

      // simpleFeatureTypeBuilder.append("al:Float:index=join:cardinality=low,");

      // simpleFeatureTypeBuilder.append("s:Float:index=join:cardinality=low,");

      // simpleFeatureTypeBuilder.append("b:Float:index=join:cardinality=low,");

      // simpleFeatureTypeBuilder.append("an:Float:index=join:cardinality=low,");

      // simpleFeatureTypeBuilder.append("he:Float:index=join:cardinality=low,");

      // simpleFeatureTypeBuilder.append("ve:Float:index=join:cardinality=low,");

      // simpleFeatureTypeBuilder.append("t:Float:index=join:cardinality=low,");

      // simpleFeatureTypeBuilder.append("m:Boolean:index=join:cardinality=low,");

      // simpleFeatureTypeBuilder.append("i:Boolean:index=join:cardinality=low,");

      // simpleFeatureTypeBuilder.append("ts:Long:index=join:cardinality=low;");


      simpleFeatureTypeBuilder.append("*g:Point:srid=4326,");

      simpleFeatureTypeBuilder.append("di:Integer,");

      simpleFeatureTypeBuilder.append("al:Float,");

      simpleFeatureTypeBuilder.append("s:Float,");

      simpleFeatureTypeBuilder.append("b:Float,");

      simpleFeatureTypeBuilder.append("an:Float,");

      simpleFeatureTypeBuilder.append("he:Float,");

      simpleFeatureTypeBuilder.append("ve:Float,");

      simpleFeatureTypeBuilder.append("t:Float,");

      simpleFeatureTypeBuilder.append("m:Boolean,");

      simpleFeatureTypeBuilder.append("i:Boolean,");

      simpleFeatureTypeBuilder.append("ts:Long;");


      simpleFeatureTypeBuilder.append("geomesa.indexes.enabled='attr,records,z2'");

      return SimpleFeatureTypes.createType(tableNamesimpleFeatureTypeBuilder.toString());

    }

    catch(Exception ex){

      ex.printStackTrace();

      return null;

    }

  }


  public void insert(Event event) {

    try{

      SimpleFeature sf = fw.next();

      sf.getUserData().put(Hints.USE_PROVIDED_FID, java.lang.Boolean.FALSE);


      sf.setAttribute("r"event.rideid);

      sf.setAttribute("di"event.devid);

      sf.setAttribute("g", JTSFactoryFinder.getGeometryFactory().createPoint(new Coordinate(event.latevent.lng)));

      sf.setAttribute("al"event.alt);

      sf.setAttribute("s"event.spd);

      sf.setAttribute("b"event.brg);

      sf.setAttribute("an"event.ang);

      sf.setAttribute("he"event.hepe);

      sf.setAttribute("ve"event.vepe);

      sf.setAttribute("t"event.temp);

      sf.setAttribute("m"event.motion);

      sf.setAttribute("i"event.ignition);

      sf.setAttribute("ts"event.ts);


      fw.write();

      isFlushed = false;

      flush(false);

    }

    catch(Exception ex){

      ex.printStackTrace();

    }

  }


  public void flush(boolean force) {

    if(!isFlushed && System.currentTimeMillis() - lastFlushTs >= 1000){

      fw.flush();

      isFlushed = true;

      lastFlushTs = System.currentTimeMillis();

      System.out.println("flush success");

    }

    else if(force){

      System.out.println("flush failed");

      lastFlushTs = System.currentTimeMillis();

    }

  }


  public void query(String queryStr, Integer limit, Integer offset, QueryListener ql) {

    System.out.println("queryString : " + queryStr);

    System.out.println("limit : " + limit);

    System.out.println("offset : " + offset);

    SimpleFeatureIterator iterator = null;

    try{

      if(queryStr != null && !queryStr.isEmpty()){


        Query query = new Query(tableName, CQL.toFilter(queryStr));

        // FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2();

        // SortBy[] sort = new SortBy[] { ff.sort("ts", SortOrder.DESCENDING) };

        // query.setSortBy(sort);

        if(limit != null && limit > 0)

          query.setMaxFeatures(limit);

        if(offset != null && offset > 0)

          query.setStartIndex(offset);

        System.out.println("Query : " + query.toString());

        iterator = sfs.getFeatures(query).features();

        System.out.println("Before iterator while");

        while(iterator.hasNext()){

          ql.onFeature(iterator.next());

        }

        System.out.println("Exiting iterator while");

      }

    }

    catch(Exception ex){

      ex.printStackTrace();

    }

    finally{

      if(iterator != null)

        iterator.close();

    }

  }


  public int getRideCount(Long rideIdthrows Exception {

    int count = 0;

    if(rideId != null){

      count = fs.getCount(new Query(tableName, CQL.toFilter("r="+rideId)));

      //count = ((Long) (ds.stats().getCount(sft, CQL.toFilter("r=" + rideId), true).get())).intValue();

    }

    return count;

  }


  public void delete(QueryBasicriteriathrows Exception {

    fst.removeFeatures(ECQL.toFilter(getQuery(criteria)));

  }


  /*

   * Query/Filter functions

   */

  private void appendQuery(StringBuilder original, String query) {

    if(original.length() > 0)

      original.append(" AND ");

    original.append(query);

  }


  public String getQuery(QueryBasic filter) {

    StringBuilder qryStrBldr = null;

    try{


      if(filter != null){

        qryStrBldr = new StringBuilder();

        if(filter.rideid != null && filter.rideid >= -1){

          appendQuery(qryStrBldr"r = " + filter.rideid);

        }

        if(filter.devid != null && filter.devid > 0){

          appendQuery(qryStrBldr"di = " + filter.devid);

        }

        if(filter.tsFr != null && filter.tsFr > 0){

          appendQuery(qryStrBldr"ts >= " + filter.tsFr);

        }

        if(filter.tsTo != null && filter.tsTo > 0){

          appendQuery(qryStrBldr"ts <= " + filter.tsTo);

        }

      }

    }

    catch(Exception ex){

      ex.printStackTrace();

    }

    return qryStrBldr.toString();

  }


  public String getQuery(QueryAdvanced advanceFilter) {

    try{

      if(advanceFilter != null){

        QueryBasic basic = advanceFilter.basic;

        StringBuilder qryStrBldr = new StringBuilder();

        qryStrBldr.append(getQuery(basic));

        if(qryStrBldr.length() > 0){

          if(advanceFilter.latFr != null && advanceFilter.latTo != null && advanceFilter.lngFr != null

              && advanceFilter.lngTo != null){

            appendQuery(qryStrBldr"BBOX(g, " + advanceFilter.latFr + ", " + advanceFilter.lngFr + ", "

                + advanceFilter.latTo + ", " + advanceFilter.lngTo + ")");

          }

          if(advanceFilter.altFr != null && advanceFilter.altFr > 0){

            appendQuery(qryStrBldr"al >= " + advanceFilter.altFr);

          }

          if(advanceFilter.altTo != null && advanceFilter.altTo > 0){

            appendQuery(qryStrBldr"al <= " + advanceFilter.altTo);

          }

          if(advanceFilter.spdFr != null && advanceFilter.spdFr > 0){

            appendQuery(qryStrBldr"s >= " + advanceFilter.spdFr);

          }

          if(advanceFilter.spdTo != null && advanceFilter.spdTo > 0){

            appendQuery(qryStrBldr"s <= " + advanceFilter.spdTo);

          }

          if(advanceFilter.brgFr != null && advanceFilter.brgFr > 0){

            appendQuery(qryStrBldr"b >= " + advanceFilter.brgFr);

          }

          if(advanceFilter.brgTo != null && advanceFilter.brgTo > 0){

            appendQuery(qryStrBldr"b <= " + advanceFilter.brgTo);

          }

          if(advanceFilter.angFr != null && advanceFilter.angFr > 0){

            appendQuery(qryStrBldr"an >= " + advanceFilter.angFr);

          }

          if(advanceFilter.angTo != null && advanceFilter.angTo > 0){

            appendQuery(qryStrBldr"an <= " + advanceFilter.angTo);

          }

          if(advanceFilter.hepeFr != null && advanceFilter.hepeFr > 0){

            appendQuery(qryStrBldr"he >= " + advanceFilter.hepeFr);

          }

          if(advanceFilter.hepeTo != null && advanceFilter.hepeTo > 0){

            appendQuery(qryStrBldr"he <= " + advanceFilter.hepeTo);

          }

          if(advanceFilter.vepeFr != null && advanceFilter.vepeFr > 0){

            appendQuery(qryStrBldr"ve >= " + advanceFilter.vepeFr);

          }

          if(advanceFilter.vepeTo != null && advanceFilter.vepeTo > 0){

            appendQuery(qryStrBldr"ve <= " + advanceFilter.vepeTo);

          }

          if(advanceFilter.tempFr != null && advanceFilter.tempFr > 0){

            appendQuery(qryStrBldr"t >= " + advanceFilter.tempFr);

          }

          if(advanceFilter.tempTo != null && advanceFilter.tempTo > 0){

            appendQuery(qryStrBldr"t <= " + advanceFilter.tempTo);

          }

          if(advanceFilter.motion != null){

            appendQuery(qryStrBldr"m = " + advanceFilter.motion);

          }

          if(advanceFilter.ignition != null){

            appendQuery(qryStrBldr"i = " + advanceFilter.ignition);

          }

        }

        return qryStrBldr.toString();

      }

      return "";

    }

    catch(Exception ex){

      ex.printStackTrace();

      return "";

    }

  }

}



I am using getRideCount(Long rideId) function for fetching count. Can anyone help me in finding why it returning 0 though features exists in feature collections. or there exists other preferred techniques to fetch the matching feature count?. Any suggestion or clarifications are welcomed.

Thank You

Suresh Prajapati



_______________________________________________
geomesa-dev mailing list
geomesa-dev@xxxxxxxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.locationtech.org/mailman/listinfo/geomesa-dev
_______________________________________________ geomesa-dev mailing list geomesa-dev@xxxxxxxxxxxxxxxx To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.locationtech.org/mailman/listinfo/geomesa-dev
_______________________________________________
geomesa-dev mailing list
geomesa-dev@xxxxxxxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.locationtech.org/mailman/listinfo/geomesa-dev
_______________________________________________
geomesa-dev mailing list
geomesa-dev@xxxxxxxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.locationtech.org/mailman/listinfo/geomesa-dev

_______________________________________________
geomesa-dev mailing list
geomesa-dev@xxxxxxxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.locationtech.org/mailman/listinfo/geomesa-dev


Back to the top