I am trying to add a Trace to an OQL Query as mentioned in the docs, using GemfireTemplate query method. But the OQL validation fails with QueryInvalidException "unexpected tokern: <". Any ideas?
Using HINT and TRACE with GemfireTemplate.query method
215 Views Asked by RO RO At
1
There are 1 best solutions below
Related Questions in GEMFIRE
- VMWare Geode (Gemfire) is terribly slow after migrating to 9.15.x
- How to persist data into Gemfire region permanently?
- java.lang.NoClassDefFoundError: org/springframework/data/gemfire/util/SpringExtensions - Spring Gemfire
- How to connect to Gemfire docker instance?
- When the locator in the cluster loses network connectivity, the client attempts to connect to other locator , but the connection is refused
- SAS Web App Server SASServer6_1 is still in the process of starting up, proceeding with additional servers
- ClassCastException when creating geode ClientCacheFactory object
- Geode member configuration for 2 node cluster
- How to do SubString in gemfire Query?
- How to resolve corrupted index for region in GEMFIRE
- Apache Commons security vulnerability in Apache Geode
- Using @Region with conditionals
- How to specify groups while creating a region using spring data geode?
- How to verify that the gemfire.EXPIRY_THREADS property is set for the server and that the configured number of threads are used?
- Is it possible to have 2 Gemfire clients in the same JVM?
Related Questions in SPRING-DATA-GEMFIRE
- How to do SubString in gemfire Query?
- Using @Region with conditionals
- How to specify groups while creating a region using spring data geode?
- Is it possible to have 2 Gemfire clients in the same JVM?
- Fetch Last 24 hour data using Gemfire OQL
- PartitionOfflineException getting spring + geode + kubernetes
- Integration tests with Cucumber using embedded GemFire for a Spring Boot application deployed in an Apache Geode client/server topology
- Pivotal Gemfire: Cannot create GemfireCache; NoSuchMethodError Jgroups
- Unable to create Global region using Spring Data Geode/Gemfire
- CacheServerApplication unable to connect to Gemfire cluster running apart from localhost
- Spring Boot Data Geode Fails to Start Docker Container
- Can persistent databases and in-memory database work together?
- Geode Authentication implementation using TLS/SSL certificate
- <gfe:entry-ttl> and <gfe:entry-tti> elements are not allowed under <gfe:replicated-region>
- Issue with Spring Boot Gemfire Integration
Related Questions in OQL
- Convert bytes to base64 encoded string with OQL query
- How to convert LocalDateTime to human readable string in OQL
- Fetch Last 24 hour data using Gemfire OQL
- How to run Gemfire query for LocalDate?
- Gemfire - How to restrict/limit OQL queries for a region
- Find out which class/instance holds a reference to an open file
- OQL and SQL queries. Select all department numbers whose employees have the same salary
- GemFire OQL Query - How do I use the count of a SELECT statement in the WHERE clause?
- How to make $lookup in MongoDB work with _id?
- GemFire Select * Query with index returns inconsistent results
- Using HINT and TRACE with GemfireTemplate.query method
- Eclipse MAT OQL list of classes in a certain package
- Is there any way to get unreachable objects using OQL in mat?
- Show String contents in the OQL result when using MAT
- Can Eclipse MAT's ParseHeapDump utility run OQL?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
This is not a bug with SDG's
GemfireTemplate, nor a problem with SDG in general.There are 2 ways to query in GemFire/Geode.
First, is to use the
QueryService, which can be obtained from the cache. Alternatively, you can obtai theQueryServicefrom theClientCacheor even from thePoolattached to theRegionon which you are running the OQL query. This is all handled for you automatically when using SDG's Repository abstraction extension.The second way to query a
Regionis to pass a query "PREDICATE" to theRegion.query(:String)method.Which GemFire/Geode API do you think the
GemfireTemplate.query(:String)method is using?GemfireTemplate.query(:String)uses theRegion.query(:String)API.The
GemfireTemplate.find(:String)method uses theQueryService.Only the
QueryServicecan accept fully valid OQL queries, e.g.<TRACE> SELECT * FROM /SomeRegion WHERE id = 1, where as theRegion.query(:String)method ONLY accepts the OQL Query PREDICATE, i.e.id = 1.Any other OQL Query reserved words or query syntax in general, passed to the
GemfireTemplate.query(:String)method (and by extensionRegion.query(:String)API) results in a invalid OQL Query.If you want to pass
<HINT 'IDIndex', ...> <TRACE> SELECT * FROM /SomeRegion WHERE id = 1 AND ..., then you should callGemfireTemplate.find(:String), which uses the GemFire/GeodeQueryServicethat accepts the complete OQL Query syntax.Alternatively, you can use the Spring Data for Apache Geode (or VMware Tanzu GemFire) Repository extension.
It is even still possible to add HINTS, TRACES, LIMITS or other query facilities to derived Repository query methods as well as query methods annotated with
@Query. See the documentation for more details.