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
211 Views Asked by RO RO At
1
There are 1 best solutions below
Related Questions in GEMFIRE
- Gemfire offers Time To Live for an element?
- Gemfire HTTP Session Manager EntryIdleTimeout is not the same error
- GemfireXD - PreparedStatement setArray for String(VARCHAR) array not working
- Gemfire Junit for multi module project tests are taking too long
- How to know Gemfire/Geode cluster size from the client
- How to use GFSH to connect peer to peer environment?
- GemfireXD - How to parallelize data processing for bigger data size
- Using Gemfire on high volume transaction system
- Gemfire - Cannot start locator
- Gemfire WAN Gateway-sender configuration
- Gemfire WAN Gateway-senders/receivers members
- Gemfire, JMX Manager startup to fail because: 'HTTP service failed to start'
- Can GemFire cache clients create Regions on servers?
- Gemfire/Geode Back-ups
- Gemfire client/server architecture and region lock
Related Questions in SPRING-DATA-GEMFIRE
- Gemfire Junit for multi module project tests are taking too long
- Using Gemfire on high volume transaction system
- Gemfire - Cannot start locator
- Gemfire WAN Gateway-sender configuration
- Gemfire WAN Gateway-senders/receivers members
- Gemfire, JMX Manager startup to fail because: 'HTTP service failed to start'
- Can GemFire cache clients create Regions on servers?
- Gemfire client/server architecture and region lock
- Gemfire - Crud Repository - findBy Implementation
- GemFire CacheLoader from Cassandra
- Gemfire Pdx Serialization Put All
- How can i get complete data from apache geode if geode is having partial data and other data is present in external datasource
- calling getall in apache geode to getall data for the keys in the list is slow
- Way to call data source only once for multiple keys in apache geode
- Dynamic GemFire Region Creation with PCC
Related Questions in OQL
- VisualVM 1.3.8 OQL - TypeError: [RegExp /java.lang./] is not a function
- VisualVM OQL filter not working as expected
- VisualVM OQL: how to search for primitive float values rather than actual Float instances?
- Java heap analysis with OQL/VisualVM: find path from indirect referrer to referee?
- VisualVM OQL: find object that has (indirect) reachables/references to two object IDs?
- How to make $lookup in MongoDB work with _id?
- Using HINT and TRACE with GemfireTemplate.query method
- GemFire Select * Query with index returns inconsistent results
- OQL and SQL queries. Select all department numbers whose employees have the same salary
- In Eclipse MAT's OQL: how to construct a date from a long integer?
- Eclipse MAT OQL list of classes in a certain package
- GemFire OQL Query - How do I use the count of a SELECT statement in the WHERE clause?
- Formatting the result of oql in VisualVM
- How to access gemfire cache from jdbc driver
- How do I find what an object refers to?
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 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.