Scan query vs Sql query
>From performance point of view which type of query is better? When should we use scan query and when should we use sql query? -- View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Scan-query-vs-Sql-query-tp9793.html Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: Partitions within single node in Apache Ignite
Can you give example for how we can scan query by partition id in single node? -- View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Partitions-within-single-node-in-Apache-Ignite-tp9726p9792.html Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: Afinity Key
Hi, cache1.put(new AffinityKey<>(*pk0*, eqID), value2); cache2.put(new AffinityKey<>(*pk1*, eqID), value2); If we are using 2 different primary key for eqId then data of cache1 and cache2 will collocated on the basis of *eqID* Thanks & regards Tejas On Thu, Dec 29, 2016 at 10:25 AM, Tejashwa Kumar Verma < tejashwa.ve...@gmail.com> wrote: > Hi, > > I think this affinity part is working fine, but now i am seeing data > discrepancy. Do we need to enable 'distributed join' also? > > > > Thanks & regards > Tejas > > On Wed, Dec 28, 2016 at 5:24 PM, dkarachentsev > wrote: > >> Duplicates [1] >> >> [1] http://apache-ignite-users.70518.x6.nabble.com/Affinity-Key- >> td9772.html >> >> >> >> -- >> View this message in context: http://apache-ignite-users.705 >> 18.x6.nabble.com/Re-Afinity-Key-tp9774p9778.html >> Sent from the Apache Ignite Users mailing list archive at Nabble.com. >> > >
Re: Afinity Key
Hi, I think this affinity part is working fine, but now i am seeing data discrepancy. Do we need to enable 'distributed join' also? Thanks & regards Tejas On Wed, Dec 28, 2016 at 5:24 PM, dkarachentsev wrote: > Duplicates [1] > > [1] http://apache-ignite-users.70518.x6.nabble.com/Affinity- > Key-td9772.html > > > > -- > View this message in context: http://apache-ignite-users. > 70518.x6.nabble.com/Re-Afinity-Key-tp9774p9778.html > Sent from the Apache Ignite Users mailing list archive at Nabble.com. >
Re: Ignite cluster
Understood. But adding some kind of merge policy (keeping latest entry and ignore other copies) and allowing node rejoin may be good option. Thanks. On 28 December 2016 at 21:33, vkulichenko wrote: > Hi Anil, > > Because that's how it works :) Main reason behind this is to ensure data > consistency. When you restart the node, its memory is cleaned up and it > joins as a brand new node. Rejoin with existing data will require > additional > processing and in general case will not guarantee consistency. > > Makes sense? > > -Val > > > > -- > View this message in context: http://apache-ignite-users. > 70518.x6.nabble.com/Ignite-cluster-tp9527p9784.html > Sent from the Apache Ignite Users mailing list archive at Nabble.com. >
Re: IgniteDataStreamer with Continuous Query
Thanks On Dec 28, 2016 7:12 PM, "dkarachentsev" wrote: > Hi Ankit, > > Yes, you can use ContinuousQuery with DataStreamer. Code samples you may > found here [1] and [2]. > > [1] > https://github.com/apache/ignite/blob/master/examples/ > src/main/java/org/apache/ignite/examples/streaming/ > StreamTransformerExample.java > > [2] > https://github.com/apache/ignite/blob/master/examples/ > src/main/java/org/apache/ignite/examples/datagrid/ > CacheContinuousQueryExample.java > > > > -- > View this message in context: http://apache-ignite-users. > 70518.x6.nabble.com/IgniteDataStreamer-with-Continuous-Query-tp9779p9781. > html > Sent from the Apache Ignite Users mailing list archive at Nabble.com. >
Re: How to query data from List
Thanks Val On Dec 28, 2016 9:33 PM, "vkulichenko" wrote: > Yes, this is possible. See this thread: > http://apache-ignite-users.70518.x6.nabble.com/Does- > Ignite-support-query-and-index-the-embedded-object-column-td9663.html > > -Val > > > > -- > View this message in context: http://apache-ignite-users. > 70518.x6.nabble.com/How-to-query-data-from-List-tp9766p9785.html > Sent from the Apache Ignite Users mailing list archive at Nabble.com. >
Re: Error while writethrough operation in Ignite
Dmitry, I probably do not correctly understand what is wrong, but it feels like something needs to be fixed anyway. If you agree, can you please move this to dev list? -Val -- View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Error-while-writethrough-operation-in-Ignite-tp9696p9786.html Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: How to query data from List
Yes, this is possible. See this thread: http://apache-ignite-users.70518.x6.nabble.com/Does-Ignite-support-query-and-index-the-embedded-object-column-td9663.html -Val -- View this message in context: http://apache-ignite-users.70518.x6.nabble.com/How-to-query-data-from-List-tp9766p9785.html Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: Ignite cluster
Hi Anil, Because that's how it works :) Main reason behind this is to ensure data consistency. When you restart the node, its memory is cleaned up and it joins as a brand new node. Rejoin with existing data will require additional processing and in general case will not guarantee consistency. Makes sense? -Val -- View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Ignite-cluster-tp9527p9784.html Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: Make changes to cache entry before data rebalanicng.
Igor, it is impossible to alter the value since it may cause data inconsistency. Imagine you have 2 nodes and cache with 1 backup. 3 node joins and you alter cache entries being sent from node 1 and 2 to 3, but those entries are currently backed up on 2 and 1 respectively. Please explain why you need this? I will try to come up with suggestions. Btw, what if rebalancing never happen? :) this is still possible, you know --Yakov 2016-12-28 14:49 GMT+03:00 Igor Gnatyuk : > Is there a way to make changes to cache entry before it is sent to another > node during rebalance? I want new node receive some additional data with > every cache entry. This data should be added to the object before > marshaling on the node where it was before rebalancing. >
Re: Make changes to cache entry before data rebalanicng.
No, but you can subscribe on such events: EventType.EVT_CACHE_REBALANCE_OBJECT_LOADED, EventType.EVT_CACHE_REBALANCE_OBJECT_UNLOADED [1] and, for example, update another cache with some metadata. [1] https://apacheignite.readme.io/v1.8/docs/events -- View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Make-changes-to-cache-entry-before-data-rebalanicng-tp9777p9782.html Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: IgniteDataStreamer with Continuous Query
Hi Ankit, Yes, you can use ContinuousQuery with DataStreamer. Code samples you may found here [1] and [2]. [1] https://github.com/apache/ignite/blob/master/examples/src/main/java/org/apache/ignite/examples/streaming/StreamTransformerExample.java [2] https://github.com/apache/ignite/blob/master/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheContinuousQueryExample.java -- View this message in context: http://apache-ignite-users.70518.x6.nabble.com/IgniteDataStreamer-with-Continuous-Query-tp9779p9781.html Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: Affinity Key
Tejas, What is your use-case? AffinityKey helps collocate related data. F.e. if you have Person and Organization entities and want that Person`s related to Organization was resided on the same node, you may use AffinityKey: // Organizations. Organization org1 = new Organization("ApacheIgnite"); Organization org2 = new Organization("Other"); orgCache.put(org1.id(), org1); orgCache.put(org2.id(), org2); // People. Person p1 = new Person(org1, "John", "Doe", 2000, "John Doe has Master Degree."); Person p2 = new Person(org2, "John", "Smith", 1000, "John Smith has Bachelor Degree."); // These persons are collocated with their organizations. // Preson.key() returns new AffinityKey(personId, organizationId) colPersonCache.put(p1.key(), p1); colPersonCache.put(p2.key(), p2); // These Person objects are not collocated with their organizations. personCache.put(p1.id, p1); personCache.put(p2.id, p2); Note that if you saved entry with AffinityKey you have to use that same key to retrieve values. -- View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Affinity-Key-tp9772p9780.html Sent from the Apache Ignite Users mailing list archive at Nabble.com.
IgniteDataStreamer with Continuous Query
Hi All, Can we have DataStreamerer pushing data via StreamTransformer to an cache and an ContinousQuery executing on cache to raise the event when the condition meets? Any sample would do lot of help. Thanks Ankit Singhai -- View this message in context: http://apache-ignite-users.70518.x6.nabble.com/IgniteDataStreamer-with-Continuous-Query-tp9779.html Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: Afinity Key
Duplicates [1] [1] http://apache-ignite-users.70518.x6.nabble.com/Affinity-Key-td9772.html -- View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Re-Afinity-Key-tp9774p9778.html Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Make changes to cache entry before data rebalanicng.
Is there a way to make changes to cache entry before it is sent to another node during rebalance? I want new node receive some additional data with every cache entry. This data should be added to the object before marshaling on the node where it was before rebalancing.
Re: Affinity Key
Hi dkarachentsev, I had tried below way to implement affinityKey.. cache1.put(new AffinityKey<>(pk0, eqID), value2); cache2.put(new AffinityKey<>(pk, eqID), value2); But after doing above. full data was not getting loaded in cache . It was loading only 2 records and getting stuck there only . Regards Tejas On Wed, Dec 28, 2016 at 3:01 PM, dkarachentsev wrote: > Hi Tejas, > > You may do the following: > > cache1.put(eqID, value1); or cache1.put(new AffinityKey<>(pk0, eqID), > value2); > cache2.put(new AffinityKey<>(pk, eqID), value2); > > In that case keys in Cache 2 will be collocated with keys in Cache 1. > > > > -- > View this message in context: http://apache-ignite-users. > 70518.x6.nabble.com/Affinity-Key-tp9772p9775.html > Sent from the Apache Ignite Users mailing list archive at Nabble.com. >
Re: Affinity Key
Hi Tejas, You may do the following: cache1.put(eqID, value1); or cache1.put(new AffinityKey<>(pk0, eqID), value2); cache2.put(new AffinityKey<>(pk, eqID), value2); In that case keys in Cache 2 will be collocated with keys in Cache 1. -- View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Affinity-Key-tp9772p9775.html Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: Afinity Key
Hi, I have doubt regarding affinity key. I have 2 cache : Cache 1 and 2 both should be related with "equipmentID". Hence "equipmentID" should be affinity key for cache2. Hence in Cache2 creating affinity key like --new AffinityKey<>(pk, eqID); now the question is how to relate this with cache1?? Thanks & Regards Tejas
Re: Error while writethrough operation in Ignite
Val, Of course it's possible, but why Ignite should restrict this case? Why not to build such update request: UPDATE table_name SET col1=1, col2=2, col3=3 WHERE (col1=1 AND col2=1 AND col3=1) ? -- View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Error-while-writethrough-operation-in-Ignite-tp9696p9773.html Sent from the Apache Ignite Users mailing list archive at Nabble.com.