You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Ahmad Al-Masry <ma...@harri.com> on 2017/12/11 08:36:17 UTC

Data lose in query

Dears;
The when I execute the attached query on Mysql data source or on a single node ignite, it returns about 25k records.
When multiple node, it gives me about 3500 records.
The caches are atomic and partitioned.
Any suggestions.
BR

-- 



This email, and the content it contains, are intended only for the persons 
or entities to which it is addressed. It may contain sensitive, 
confidential and/or privileged material. Any review, retransmission, 
dissemination or other use of, or taking of any action in reliance upon, 
this information by persons or entities other than the intended 
recipient(s) is prohibited. If you received this email in error, please 
immediately contact security[at]harri[dot]com and delete it from any device 
or system on which it may be stored.

Re: Data lose in query

Posted by vkulichenko <va...@gmail.com>.
Web Console currently does not allow to specify affinity keys on
configuration screen, there is a ticket for this improvement:
https://issues.apache.org/jira/browse/IGNITE-4709

For now the only option is to manually set the required annotations in
generated classes.

-Val



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: Data lose in query

Posted by Naveen Kumar <na...@gmail.com>.
Exactly, I have faced the same problem and posted this question to the
forum, not yet got any response.

Thanks

On 12-Dec-2017 1:48 PM, "Ahmad Al-Masry" <ma...@harri.com> wrote:

> Hi;
> I added @AffinityKeyMapped to the fields in the model generated by web
> console.
> But I also noticed that when I load the data using the load
> commands generated from the web console, the data is not collocated and the
> query will return reduced data.
> Do you have any hints?
> BR
>
>
> On Dec 11, 2017, at 3:12 PM, Nikolai Tikhonov <nt...@apache.org>
> wrote:
>
> It depends from your data model and can't be enabled via one property.
> Please, look at the following documentation pages:
>
> https://apacheignite.readme.io/docs/affinity-collocation
> https://apacheignite-sql.readme.io/docs/distributed-joins#collocated-joins
>
> On Mon, Dec 11, 2017 at 4:02 PM, Ahmad Al-Masry <ma...@harri.com> wrote:
>
>> How can I enable this on the server configuration XML?
>> BR
>>
>>
>> On Dec 11, 2017, at 2:31 PM, Nikolai Tikhonov <nt...@apache.org>
>> wrote:
>>
>> Hi,
>>
>> Strongly recommend to care about collocation of your data (as above
>> suggested by Vlad) instead of enable DistributedJoins flag. The performance
>> of this type of joins is worse then the performance of the affinity
>> collocation based joins due to the fact that there will be much more
>> network round-trips and data movement between the nodes to fulfill a query
>> [1].
>>
>> 1. https://apacheignite-sql.readme.io/docs/distributed-joins
>> #non-collocated-joins
>>
>>
>> On Mon, Dec 11, 2017 at 3:03 PM, Ahmad Al-Masry <ma...@harri.com> wrote:
>>
>>> Hi;
>>> When I enabled the distributed JOIN, get the following Exception:
>>>
>>> java.sql.SQLException: javax.cache.CacheException: Failed to prepare
>>> distributed join query: join condition does not use index
>>> [joinedCache=PositionTypeCache
>>>
>>> Should I remove the indexes before doing distributed joins?
>>> BR
>>>
>>>
>>> On Dec 11, 2017, at 10:43 AM, Vladislav Pyatkov <vl...@gmail.com>
>>> wrote:
>>>
>>> Hi,
>>>
>>> When you use JOIN, you should to enable DistributedJoins flag[1], or
>>> tack care about collocated of each joined entry[2].
>>>
>>> [1]: org.apache.ignite.cache.query.SqlFieldsQuery#setDistributedJoins
>>> [2]: https://apacheignite.readme.io/docs
>>>
>>> On Mon, Dec 11, 2017 at 11:36 AM, Ahmad Al-Masry <ma...@harri.com>
>>> wrote:
>>>
>>>> Dears;
>>>> The when I execute the attached query on Mysql data source or on a
>>>> single node ignite, it returns about 25k records.
>>>> When multiple node, it gives me about 3500 records.
>>>> The caches are atomic and partitioned.
>>>> Any suggestions.
>>>> BR
>>>>
>>>> --
>>>>
>>>>
>>>>
>>>> This email, and the content it contains, are intended only for the
>>>> persons
>>>> or entities to which it is addressed. It may contain sensitive,
>>>> confidential and/or privileged material. Any review, retransmission,
>>>> dissemination or other use of, or taking of any action in reliance upon,
>>>> this information by persons or entities other than the intended
>>>> recipient(s) is prohibited. If you received this email in error, please
>>>> immediately contact security[at]harri[dot]com and delete it from any
>>>> device
>>>> or system on which it may be stored.
>>>>
>>>
>>>
>>>
>>> --
>>> Vladislav Pyatkov
>>>
>>>
>>>
>>>
>>> This email, and the content it contains, are intended only for the
>>> persons or entities to which it is addressed. It may contain sensitive,
>>> confidential and/or privileged material. Any review, retransmission,
>>> dissemination or other use of, or taking of any action in reliance upon,
>>> this information by persons or entities other than the intended
>>> recipient(s) is prohibited. If you received this email in error, please
>>> immediately contact security[at]harri[dot]com and delete it from any device
>>> or system on which it may be stored.
>>>
>>
>>
>>
>>
>> This email, and the content it contains, are intended only for the
>> persons or entities to which it is addressed. It may contain sensitive,
>> confidential and/or privileged material. Any review, retransmission,
>> dissemination or other use of, or taking of any action in reliance upon,
>> this information by persons or entities other than the intended
>> recipient(s) is prohibited. If you received this email in error, please
>> immediately contact security[at]harri[dot]com and delete it from any device
>> or system on which it may be stored.
>>
>
>
>
>
> This email, and the content it contains, are intended only for the persons
> or entities to which it is addressed. It may contain sensitive,
> confidential and/or privileged material. Any review, retransmission,
> dissemination or other use of, or taking of any action in reliance upon,
> this information by persons or entities other than the intended
> recipient(s) is prohibited. If you received this email in error, please
> immediately contact security[at]harri[dot]com and delete it from any device
> or system on which it may be stored.
>

Re: Data lose in query

Posted by Ahmad Al-Masry <ma...@harri.com>.
Hi;
I added @AffinityKeyMapped to the fields in the model generated by web console.
But I also noticed that when I load the data using the load commands generated from the web console, the data is not collocated and the query will return reduced data.
Do you have any hints?
BR


> On Dec 11, 2017, at 3:12 PM, Nikolai Tikhonov <nt...@apache.org> wrote:
> 
> It depends from your data model and can't be enabled via one property. Please, look at the following documentation pages:
> 
> https://apacheignite.readme.io/docs/affinity-collocation <https://apacheignite.readme.io/docs/affinity-collocation>
> https://apacheignite-sql.readme.io/docs/distributed-joins#collocated-joins <https://apacheignite-sql.readme.io/docs/distributed-joins#collocated-joins>
> 
> On Mon, Dec 11, 2017 at 4:02 PM, Ahmad Al-Masry <masry@harri.com <ma...@harri.com>> wrote:
> How can I enable this on the server configuration XML?
> BR
> 
> 
>> On Dec 11, 2017, at 2:31 PM, Nikolai Tikhonov <ntikhonov@apache.org <ma...@apache.org>> wrote:
>> 
>> Hi,
>> 
>> Strongly recommend to care about collocation of your data (as above suggested by Vlad) instead of enable DistributedJoins flag. The performance of this type of joins is worse then the performance of the affinity collocation based joins due to the fact that there will be much more network round-trips and data movement between the nodes to fulfill a query [1].
>> 
>> 1. https://apacheignite-sql.readme.io/docs/distributed-joins#non-collocated-joins <https://apacheignite-sql.readme.io/docs/distributed-joins#non-collocated-joins>
>> 
>> 
>> On Mon, Dec 11, 2017 at 3:03 PM, Ahmad Al-Masry <masry@harri.com <ma...@harri.com>> wrote:
>> Hi;
>> When I enabled the distributed JOIN, get the following Exception:
>> 
>> java.sql.SQLException: javax.cache.CacheException: Failed to prepare distributed join query: join condition does not use index [joinedCache=PositionTypeCache
>> 
>> Should I remove the indexes before doing distributed joins?
>> BR
>> 
>> 
>>> On Dec 11, 2017, at 10:43 AM, Vladislav Pyatkov <vldpyatkov@gmail.com <ma...@gmail.com>> wrote:
>>> 
>>> Hi,
>>> 
>>> When you use JOIN, you should to enable DistributedJoins flag[1], or tack care about collocated of each joined entry[2].
>>> 
>>> [1]: org.apache.ignite.cache.query.SqlFieldsQuery#setDistributedJoins
>>> [2]: https://apacheignite.readme.io/docs <https://apacheignite.readme.io/docs>
>>> 
>>> On Mon, Dec 11, 2017 at 11:36 AM, Ahmad Al-Masry <masry@harri.com <ma...@harri.com>> wrote:
>>> Dears;
>>> The when I execute the attached query on Mysql data source or on a single node ignite, it returns about 25k records.
>>> When multiple node, it gives me about 3500 records.
>>> The caches are atomic and partitioned.
>>> Any suggestions.
>>> BR
>>> 
>>> --
>>> 
>>> 
>>> 
>>> This email, and the content it contains, are intended only for the persons
>>> or entities to which it is addressed. It may contain sensitive,
>>> confidential and/or privileged material. Any review, retransmission,
>>> dissemination or other use of, or taking of any action in reliance upon,
>>> this information by persons or entities other than the intended
>>> recipient(s) is prohibited. If you received this email in error, please
>>> immediately contact security[at]harri[dot]com and delete it from any device
>>> or system on which it may be stored.
>>> 
>>> 
>>> 
>>> -- 
>>> Vladislav Pyatkov
>> 
>> 
>> 
>> This email, and the content it contains, are intended only for the persons or entities to which it is addressed. It may contain sensitive, confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient(s) is prohibited. If you received this email in error, please immediately contact security[at]harri[dot]com and delete it from any device or system on which it may be stored.
>> 
> 
> 
> 
> This email, and the content it contains, are intended only for the persons or entities to which it is addressed. It may contain sensitive, confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient(s) is prohibited. If you received this email in error, please immediately contact security[at]harri[dot]com and delete it from any device or system on which it may be stored.
> 


-- 



This email, and the content it contains, are intended only for the persons 
or entities to which it is addressed. It may contain sensitive, 
confidential and/or privileged material. Any review, retransmission, 
dissemination or other use of, or taking of any action in reliance upon, 
this information by persons or entities other than the intended 
recipient(s) is prohibited. If you received this email in error, please 
immediately contact security[at]harri[dot]com and delete it from any device 
or system on which it may be stored.

Re: Data lose in query

Posted by Nikolai Tikhonov <nt...@apache.org>.
It depends from your data model and can't be enabled via one property.
Please, look at the following documentation pages:

https://apacheignite.readme.io/docs/affinity-collocation
https://apacheignite-sql.readme.io/docs/distributed-joins#collocated-joins

On Mon, Dec 11, 2017 at 4:02 PM, Ahmad Al-Masry <ma...@harri.com> wrote:

> How can I enable this on the server configuration XML?
> BR
>
>
> On Dec 11, 2017, at 2:31 PM, Nikolai Tikhonov <nt...@apache.org>
> wrote:
>
> Hi,
>
> Strongly recommend to care about collocation of your data (as above
> suggested by Vlad) instead of enable DistributedJoins flag. The performance
> of this type of joins is worse then the performance of the affinity
> collocation based joins due to the fact that there will be much more
> network round-trips and data movement between the nodes to fulfill a query
> [1].
>
> 1. https://apacheignite-sql.readme.io/docs/distributed-
> joins#non-collocated-joins
>
>
> On Mon, Dec 11, 2017 at 3:03 PM, Ahmad Al-Masry <ma...@harri.com> wrote:
>
>> Hi;
>> When I enabled the distributed JOIN, get the following Exception:
>>
>> java.sql.SQLException: javax.cache.CacheException: Failed to prepare
>> distributed join query: join condition does not use index
>> [joinedCache=PositionTypeCache
>>
>> Should I remove the indexes before doing distributed joins?
>> BR
>>
>>
>> On Dec 11, 2017, at 10:43 AM, Vladislav Pyatkov <vl...@gmail.com>
>> wrote:
>>
>> Hi,
>>
>> When you use JOIN, you should to enable DistributedJoins flag[1], or tack
>> care about collocated of each joined entry[2].
>>
>> [1]: org.apache.ignite.cache.query.SqlFieldsQuery#setDistributedJoins
>> [2]: https://apacheignite.readme.io/docs
>>
>> On Mon, Dec 11, 2017 at 11:36 AM, Ahmad Al-Masry <ma...@harri.com> wrote:
>>
>>> Dears;
>>> The when I execute the attached query on Mysql data source or on a
>>> single node ignite, it returns about 25k records.
>>> When multiple node, it gives me about 3500 records.
>>> The caches are atomic and partitioned.
>>> Any suggestions.
>>> BR
>>>
>>> --
>>>
>>>
>>>
>>> This email, and the content it contains, are intended only for the
>>> persons
>>> or entities to which it is addressed. It may contain sensitive,
>>> confidential and/or privileged material. Any review, retransmission,
>>> dissemination or other use of, or taking of any action in reliance upon,
>>> this information by persons or entities other than the intended
>>> recipient(s) is prohibited. If you received this email in error, please
>>> immediately contact security[at]harri[dot]com and delete it from any
>>> device
>>> or system on which it may be stored.
>>>
>>
>>
>>
>> --
>> Vladislav Pyatkov
>>
>>
>>
>>
>> This email, and the content it contains, are intended only for the
>> persons or entities to which it is addressed. It may contain sensitive,
>> confidential and/or privileged material. Any review, retransmission,
>> dissemination or other use of, or taking of any action in reliance upon,
>> this information by persons or entities other than the intended
>> recipient(s) is prohibited. If you received this email in error, please
>> immediately contact security[at]harri[dot]com and delete it from any device
>> or system on which it may be stored.
>>
>
>
>
>
> This email, and the content it contains, are intended only for the persons
> or entities to which it is addressed. It may contain sensitive,
> confidential and/or privileged material. Any review, retransmission,
> dissemination or other use of, or taking of any action in reliance upon,
> this information by persons or entities other than the intended
> recipient(s) is prohibited. If you received this email in error, please
> immediately contact security[at]harri[dot]com and delete it from any device
> or system on which it may be stored.
>

Re: Data lose in query

Posted by Ahmad Al-Masry <ma...@harri.com>.
How can I enable this on the server configuration XML?
BR

> On Dec 11, 2017, at 2:31 PM, Nikolai Tikhonov <nt...@apache.org> wrote:
> 
> Hi,
> 
> Strongly recommend to care about collocation of your data (as above suggested by Vlad) instead of enable DistributedJoins flag. The performance of this type of joins is worse then the performance of the affinity collocation based joins due to the fact that there will be much more network round-trips and data movement between the nodes to fulfill a query [1].
> 
> 1. https://apacheignite-sql.readme.io/docs/distributed-joins#non-collocated-joins <https://apacheignite-sql.readme.io/docs/distributed-joins#non-collocated-joins>
> 
> 
> On Mon, Dec 11, 2017 at 3:03 PM, Ahmad Al-Masry <masry@harri.com <ma...@harri.com>> wrote:
> Hi;
> When I enabled the distributed JOIN, get the following Exception:
> 
> java.sql.SQLException: javax.cache.CacheException: Failed to prepare distributed join query: join condition does not use index [joinedCache=PositionTypeCache
> 
> Should I remove the indexes before doing distributed joins?
> BR
> 
> 
>> On Dec 11, 2017, at 10:43 AM, Vladislav Pyatkov <vldpyatkov@gmail.com <ma...@gmail.com>> wrote:
>> 
>> Hi,
>> 
>> When you use JOIN, you should to enable DistributedJoins flag[1], or tack care about collocated of each joined entry[2].
>> 
>> [1]: org.apache.ignite.cache.query.SqlFieldsQuery#setDistributedJoins
>> [2]: https://apacheignite.readme.io/docs <https://apacheignite.readme.io/docs>
>> 
>> On Mon, Dec 11, 2017 at 11:36 AM, Ahmad Al-Masry <masry@harri.com <ma...@harri.com>> wrote:
>> Dears;
>> The when I execute the attached query on Mysql data source or on a single node ignite, it returns about 25k records.
>> When multiple node, it gives me about 3500 records.
>> The caches are atomic and partitioned.
>> Any suggestions.
>> BR
>> 
>> --
>> 
>> 
>> 
>> This email, and the content it contains, are intended only for the persons
>> or entities to which it is addressed. It may contain sensitive,
>> confidential and/or privileged material. Any review, retransmission,
>> dissemination or other use of, or taking of any action in reliance upon,
>> this information by persons or entities other than the intended
>> recipient(s) is prohibited. If you received this email in error, please
>> immediately contact security[at]harri[dot]com and delete it from any device
>> or system on which it may be stored.
>> 
>> 
>> 
>> -- 
>> Vladislav Pyatkov
> 
> 
> 
> This email, and the content it contains, are intended only for the persons or entities to which it is addressed. It may contain sensitive, confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient(s) is prohibited. If you received this email in error, please immediately contact security[at]harri[dot]com and delete it from any device or system on which it may be stored.
> 


-- 



This email, and the content it contains, are intended only for the persons 
or entities to which it is addressed. It may contain sensitive, 
confidential and/or privileged material. Any review, retransmission, 
dissemination or other use of, or taking of any action in reliance upon, 
this information by persons or entities other than the intended 
recipient(s) is prohibited. If you received this email in error, please 
immediately contact security[at]harri[dot]com and delete it from any device 
or system on which it may be stored.

Re: Data lose in query

Posted by Nikolai Tikhonov <nt...@apache.org>.
Hi,

Strongly recommend to care about collocation of your data (as above
suggested by Vlad) instead of enable DistributedJoins flag. The performance
of this type of joins is worse then the performance of the affinity
collocation based joins due to the fact that there will be much more
network round-trips and data movement between the nodes to fulfill a query
[1].

1.
https://apacheignite-sql.readme.io/docs/distributed-joins#non-collocated-joins


On Mon, Dec 11, 2017 at 3:03 PM, Ahmad Al-Masry <ma...@harri.com> wrote:

> Hi;
> When I enabled the distributed JOIN, get the following Exception:
>
> java.sql.SQLException: javax.cache.CacheException: Failed to prepare
> distributed join query: join condition does not use index
> [joinedCache=PositionTypeCache
>
> Should I remove the indexes before doing distributed joins?
> BR
>
>
> On Dec 11, 2017, at 10:43 AM, Vladislav Pyatkov <vl...@gmail.com>
> wrote:
>
> Hi,
>
> When you use JOIN, you should to enable DistributedJoins flag[1], or tack
> care about collocated of each joined entry[2].
>
> [1]: org.apache.ignite.cache.query.SqlFieldsQuery#setDistributedJoins
> [2]: https://apacheignite.readme.io/docs
>
> On Mon, Dec 11, 2017 at 11:36 AM, Ahmad Al-Masry <ma...@harri.com> wrote:
>
>> Dears;
>> The when I execute the attached query on Mysql data source or on a single
>> node ignite, it returns about 25k records.
>> When multiple node, it gives me about 3500 records.
>> The caches are atomic and partitioned.
>> Any suggestions.
>> BR
>>
>> --
>>
>>
>>
>> This email, and the content it contains, are intended only for the persons
>> or entities to which it is addressed. It may contain sensitive,
>> confidential and/or privileged material. Any review, retransmission,
>> dissemination or other use of, or taking of any action in reliance upon,
>> this information by persons or entities other than the intended
>> recipient(s) is prohibited. If you received this email in error, please
>> immediately contact security[at]harri[dot]com and delete it from any
>> device
>> or system on which it may be stored.
>>
>
>
>
> --
> Vladislav Pyatkov
>
>
>
>
> This email, and the content it contains, are intended only for the persons
> or entities to which it is addressed. It may contain sensitive,
> confidential and/or privileged material. Any review, retransmission,
> dissemination or other use of, or taking of any action in reliance upon,
> this information by persons or entities other than the intended
> recipient(s) is prohibited. If you received this email in error, please
> immediately contact security[at]harri[dot]com and delete it from any device
> or system on which it may be stored.
>

Re: Data lose in query

Posted by Ahmad Al-Masry <ma...@harri.com>.
Hi;
When I enabled the distributed JOIN, get the following Exception:

java.sql.SQLException: javax.cache.CacheException: Failed to prepare distributed join query: join condition does not use index [joinedCache=PositionTypeCache

Should I remove the indexes before doing distributed joins?
BR

> On Dec 11, 2017, at 10:43 AM, Vladislav Pyatkov <vl...@gmail.com> wrote:
> 
> Hi,
> 
> When you use JOIN, you should to enable DistributedJoins flag[1], or tack care about collocated of each joined entry[2].
> 
> [1]: org.apache.ignite.cache.query.SqlFieldsQuery#setDistributedJoins
> [2]: https://apacheignite.readme.io/docs <https://apacheignite.readme.io/docs>
> 
> On Mon, Dec 11, 2017 at 11:36 AM, Ahmad Al-Masry <masry@harri.com <ma...@harri.com>> wrote:
> Dears;
> The when I execute the attached query on Mysql data source or on a single node ignite, it returns about 25k records.
> When multiple node, it gives me about 3500 records.
> The caches are atomic and partitioned.
> Any suggestions.
> BR
> 
> --
> 
> 
> 
> This email, and the content it contains, are intended only for the persons
> or entities to which it is addressed. It may contain sensitive,
> confidential and/or privileged material. Any review, retransmission,
> dissemination or other use of, or taking of any action in reliance upon,
> this information by persons or entities other than the intended
> recipient(s) is prohibited. If you received this email in error, please
> immediately contact security[at]harri[dot]com and delete it from any device
> or system on which it may be stored.
> 
> 
> 
> -- 
> Vladislav Pyatkov


-- 



This email, and the content it contains, are intended only for the persons 
or entities to which it is addressed. It may contain sensitive, 
confidential and/or privileged material. Any review, retransmission, 
dissemination or other use of, or taking of any action in reliance upon, 
this information by persons or entities other than the intended 
recipient(s) is prohibited. If you received this email in error, please 
immediately contact security[at]harri[dot]com and delete it from any device 
or system on which it may be stored.

Re: Data lose in query

Posted by Vladislav Pyatkov <vl...@gmail.com>.
Hi,

When you use JOIN, you should to enable DistributedJoins flag[1], or tack
care about collocated of each joined entry[2].

[1]: org.apache.ignite.cache.query.SqlFieldsQuery#setDistributedJoins
[2]: https://apacheignite.readme.io/docs

On Mon, Dec 11, 2017 at 11:36 AM, Ahmad Al-Masry <ma...@harri.com> wrote:

> Dears;
> The when I execute the attached query on Mysql data source or on a single
> node ignite, it returns about 25k records.
> When multiple node, it gives me about 3500 records.
> The caches are atomic and partitioned.
> Any suggestions.
> BR
>
> --
>
>
>
> This email, and the content it contains, are intended only for the persons
> or entities to which it is addressed. It may contain sensitive,
> confidential and/or privileged material. Any review, retransmission,
> dissemination or other use of, or taking of any action in reliance upon,
> this information by persons or entities other than the intended
> recipient(s) is prohibited. If you received this email in error, please
> immediately contact security[at]harri[dot]com and delete it from any device
> or system on which it may be stored.
>



-- 
Vladislav Pyatkov