You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ignite.apache.org by Taras Ledkov <tl...@gridgain.com> on 2016/07/06 09:23:48 UTC

ignite-2310

Igniters,

Lets discuss the changes of public API at the IgniteCompute.
The new methods affinityRun & affinityCall is added by working on 
IGNITE-2310.

https://issues.apache.org/jira/browse/IGNITE-2310

Please take a look at the signature of the new methods:

https://github.com/gridgain/apache-ignite/commit/991fb60f563ee1630152ca0159d04b4969f883bf#diff-b276b8e6e14915f9e5f2f5daeeddec8a

void affinityRun(@Nullable String cacheName, Object affKey, 
IgniteRunnable job, Map<String, int[]> partsToLock)

The parameter Map<String, int[]> partsToLock is added.
Map contains the pairs of the cache name and array of partitions that 
must be reserved on the target node before job execution.

Dmitry, colleagues, please comment or approve.

-- 
Taras Ledkov
Mail-To: tledkov@gridgain.com


Re: ignite-2310

Posted by Taras Ledkov <tl...@gridgain.com>.
What would you say about:

- proposal #0:  affinityRun(String cacheName, Object affKey, 
IgniteRunnable job, Collection<String> extraCaches);
- proposal #1:  affinityRun(Collection<String> caches, int part, 
IgniteRunnable job).

06.07.2016 15:18, Semyon Boikov \u043f\u0438\u0448\u0435\u0442:
> I think we should detect such situation and throw exception. As I remember
> for cross cache qieries we throw exception if caches have different
> partitions distribution.
>
> On Wed, Jul 6, 2016 at 3:14 PM, Yakov Zhdanov <yz...@apache.org> wrote:
>
>> Guys, this does not work in general case. If you provide more than one
>> partition you can end up with a situation when they reside on more than one
>> node.
>>
>> --Yakov
>>
>> 2016-07-06 13:50 GMT+03:00 Vladimir Ozerov <vo...@gridgain.com>:
>>
>>> If we add "partsToLock" to job execute request, then why we allow it only
>>> for "affinity" methods? We can resort to "with" semantics instead:
>>>
>>> IgniteCompute.*withPartitionsToLock*(...).affinityRun();
>>>
>>> On Wed, Jul 6, 2016 at 12:23 PM, Taras Ledkov <tl...@gridgain.com>
>>> wrote:
>>>
>>>> Igniters,
>>>>
>>>> Lets discuss the changes of public API at the IgniteCompute.
>>>> The new methods affinityRun & affinityCall is added by working on
>>>> IGNITE-2310.
>>>>
>>>> https://issues.apache.org/jira/browse/IGNITE-2310
>>>>
>>>> Please take a look at the signature of the new methods:
>>>>
>>>>
>>>>
>> https://github.com/gridgain/apache-ignite/commit/991fb60f563ee1630152ca0159d04b4969f883bf#diff-b276b8e6e14915f9e5f2f5daeeddec8a
>>>> void affinityRun(@Nullable String cacheName, Object affKey,
>>> IgniteRunnable
>>>> job, Map<String, int[]> partsToLock)
>>>>
>>>> The parameter Map<String, int[]> partsToLock is added.
>>>> Map contains the pairs of the cache name and array of partitions that
>>> must
>>>> be reserved on the target node before job execution.
>>>>
>>>> Dmitry, colleagues, please comment or approve.
>>>>
>>>> --
>>>> Taras Ledkov
>>>> Mail-To: tledkov@gridgain.com
>>>>
>>>>

-- 
Taras Ledkov
Mail-To: tledkov@gridgain.com


Re: ignite-2310

Posted by Taras Ledkov <tl...@gridgain.com>.
Guys,

Please review the last version of the public API
https://issues.apache.org/jira/browse/IGNITE-2310?focusedCommentId=15407375&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15407375

Ambiguity will be fixed on the client side. Tests has been fixed.

On 11.07.2016 12:59, Yakov Zhdanov wrote:
> I replied in the ticket.
>
> --Yakov
>
> 2016-07-11 12:43 GMT+03:00 Taras Ledkov <tl...@gridgain.com>:
>
>> Hi,
>>
>> Dmitry, thanks for your comments.
>> I've updated the ticket with the reasons of my version of the API changes.
>> I'm OK with the both version of the API.
>>
>> Igniters, please any comments.
>>
>>
>> 09.07.2016 4:22, Dmitriy Setrakyan \u043f\u0438\u0448\u0435\u0442:
>>
>> Thanks Taras, I have added my comments in the ticket.
>>> On Thu, Jul 7, 2016 at 5:44 AM, Taras Ledkov <tl...@gridgain.com>
>>> wrote:
>>>
>>> Igniters,
>>>> The issue https://issues.apache.org/jira/browse/IGNITE-2310 is updated
>>>> with comment
>>>> about the changes at the IgniteCompute. Please comment the ticket.
>>>>
>>>> The changed javadoc of the affinityRun/Call is available to review at the
>>>> branch
>>>>
>>>>
>>>> https://github.com/gridgain/apache-ignite/blob/ignite-2310/modules/core/src/main/java/org/apache/ignite/IgniteCompute.java#L123
>>>>
>>>> 07.07.2016 14:13, Dmitriy Setrakyan \u043f\u0438\u0448\u0435\u0442:
>>>>
>>>> Taras, it is very difficult to review API changes this way. Can you
>>>> please
>>>>
>>>>> provide additional APIs in the ticket?
>>>>>
>>>>> Also, we should add documentation about reserving partitions as well. To
>>>>> my
>>>>> knowledge, this feature ensures that a partition will not be migrated
>>>>> while
>>>>> affinityRun/Call is executed, right?
>>>>>
>>>>> On Thu, Jul 7, 2016 at 3:02 AM, Taras Ledkov <tl...@gridgain.com>
>>>>> wrote:
>>>>>
>>>>> Igniters,
>>>>>
>>>>>> Please take a look at the next proposal of changes at
>>>>>> IgniteCompute.affinityRun / affinityCall:
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> https://github.com/gridgain/apache-ignite/commit/c57f009c44e07240fc8c8e6feed3271c63f31664#diff-b276b8e6e14915f9e5f2f5daeeddec8a
>>>>>>
>>>>>> So, two methods is added affinityRun and affinityCall. There is
>>>>>> additional
>>>>>> parameter Collection of extra caches names.
>>>>>> An affinity job without the extra caches reserves only one partition
>>>>>> (that
>>>>>> contains affinity key) of the affinity cache.
>>>>>> An affinity job with the extra caches parameter reserves the partitions
>>>>>> (similar to affinity partition) of all extra caches.
>>>>>>
>>>>>>
>>>>>> 06.07.2016 15:18, Semyon Boikov wrote:
>>>>>>
>>>>>> I think we should detect such situation and throw exception. As I
>>>>>>
>>>>>>> remember
>>>>>>> for cross cache qieries we throw exception if caches have different
>>>>>>> partitions distribution.
>>>>>>>
>>>>>>> On Wed, Jul 6, 2016 at 3:14 PM, Yakov Zhdanov <yz...@apache.org>
>>>>>>> wrote:
>>>>>>>
>>>>>>> Guys, this does not work in general case. If you provide more than one
>>>>>>>
>>>>>>> partition you can end up with a situation when they reside on more
>>>>>>>> than
>>>>>>>> one
>>>>>>>> node.
>>>>>>>>
>>>>>>>> --Yakov
>>>>>>>>
>>>>>>>> 2016-07-06 13:50 GMT+03:00 Vladimir Ozerov <vo...@gridgain.com>:
>>>>>>>>
>>>>>>>> If we add "partsToLock" to job execute request, then why we allow it
>>>>>>>> only
>>>>>>>>
>>>>>>>> for "affinity" methods? We can resort to "with" semantics instead:
>>>>>>>>> IgniteCompute.*withPartitionsToLock*(...).affinityRun();
>>>>>>>>>
>>>>>>>>> On Wed, Jul 6, 2016 at 12:23 PM, Taras Ledkov <tledkov@gridgain.com
>>>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>> Igniters,
>>>>>>>>>
>>>>>>>>> Lets discuss the changes of public API at the IgniteCompute.
>>>>>>>>>> The new methods affinityRun & affinityCall is added by working on
>>>>>>>>>> IGNITE-2310.
>>>>>>>>>>
>>>>>>>>>> https://issues.apache.org/jira/browse/IGNITE-2310
>>>>>>>>>>
>>>>>>>>>> Please take a look at the signature of the new methods:
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>> https://github.com/gridgain/apache-ignite/commit/991fb60f563ee1630152ca0159d04b4969f883bf#diff-b276b8e6e14915f9e5f2f5daeeddec8a
>>>>>>>>
>>>>>>>> void affinityRun(@Nullable String cacheName, Object affKey,
>>>>>>>>
>>>>>>>>> IgniteRunnable
>>>>>>>>>
>>>>>>>>> job, Map<String, int[]> partsToLock)
>>>>>>>>>
>>>>>>>>>> The parameter Map<String, int[]> partsToLock is added.
>>>>>>>>>> Map contains the pairs of the cache name and array of partitions
>>>>>>>>>> that
>>>>>>>>>>
>>>>>>>>>> must
>>>>>>>>>>
>>>>>>>>> be reserved on the target node before job execution.
>>>>>>>>>
>>>>>>>>>> Dmitry, colleagues, please comment or approve.
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> Taras Ledkov
>>>>>>>>>> Mail-To: tledkov@gridgain.com
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>>
>>>>>>>>> Taras Ledkov
>>>>>> Mail-To: tledkov@gridgain.com
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>> Taras Ledkov
>>>> Mail-To: tledkov@gridgain.com
>>>>
>>>>
>>>>
>> --
>> Taras Ledkov
>> Mail-To: tledkov@gridgain.com
>>
>>

-- 
Taras Ledkov
Mail-To: tledkov@gridgain.com


Re: ignite-2310

Posted by Taras Ledkov <tl...@gridgain.com>.
Thanks,

I updated the ticket because proposed API is ambiguous.
e.g.: affinityRun(null, 0, job);

The fist parameter is a collection or a cache name?
My changes are at the ticket.


11.07.2016 12:59, Yakov Zhdanov \u043f\u0438\u0448\u0435\u0442:
> I replied in the ticket.
>
> --Yakov
>
> 2016-07-11 12:43 GMT+03:00 Taras Ledkov <tl...@gridgain.com>:
>
>> Hi,
>>
>> Dmitry, thanks for your comments.
>> I've updated the ticket with the reasons of my version of the API changes.
>> I'm OK with the both version of the API.
>>
>> Igniters, please any comments.
>>
>>
>> 09.07.2016 4:22, Dmitriy Setrakyan \u043f\u0438\u0448\u0435\u0442:
>>
>> Thanks Taras, I have added my comments in the ticket.
>>> On Thu, Jul 7, 2016 at 5:44 AM, Taras Ledkov <tl...@gridgain.com>
>>> wrote:
>>>
>>> Igniters,
>>>> The issue https://issues.apache.org/jira/browse/IGNITE-2310 is updated
>>>> with comment
>>>> about the changes at the IgniteCompute. Please comment the ticket.
>>>>
>>>> The changed javadoc of the affinityRun/Call is available to review at the
>>>> branch
>>>>
>>>>
>>>> https://github.com/gridgain/apache-ignite/blob/ignite-2310/modules/core/src/main/java/org/apache/ignite/IgniteCompute.java#L123
>>>>
>>>> 07.07.2016 14:13, Dmitriy Setrakyan \u043f\u0438\u0448\u0435\u0442:
>>>>
>>>> Taras, it is very difficult to review API changes this way. Can you
>>>> please
>>>>
>>>>> provide additional APIs in the ticket?
>>>>>
>>>>> Also, we should add documentation about reserving partitions as well. To
>>>>> my
>>>>> knowledge, this feature ensures that a partition will not be migrated
>>>>> while
>>>>> affinityRun/Call is executed, right?
>>>>>
>>>>> On Thu, Jul 7, 2016 at 3:02 AM, Taras Ledkov <tl...@gridgain.com>
>>>>> wrote:
>>>>>
>>>>> Igniters,
>>>>>
>>>>>> Please take a look at the next proposal of changes at
>>>>>> IgniteCompute.affinityRun / affinityCall:
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> https://github.com/gridgain/apache-ignite/commit/c57f009c44e07240fc8c8e6feed3271c63f31664#diff-b276b8e6e14915f9e5f2f5daeeddec8a
>>>>>>
>>>>>> So, two methods is added affinityRun and affinityCall. There is
>>>>>> additional
>>>>>> parameter Collection of extra caches names.
>>>>>> An affinity job without the extra caches reserves only one partition
>>>>>> (that
>>>>>> contains affinity key) of the affinity cache.
>>>>>> An affinity job with the extra caches parameter reserves the partitions
>>>>>> (similar to affinity partition) of all extra caches.
>>>>>>
>>>>>>
>>>>>> 06.07.2016 15:18, Semyon Boikov wrote:
>>>>>>
>>>>>> I think we should detect such situation and throw exception. As I
>>>>>>
>>>>>>> remember
>>>>>>> for cross cache qieries we throw exception if caches have different
>>>>>>> partitions distribution.
>>>>>>>
>>>>>>> On Wed, Jul 6, 2016 at 3:14 PM, Yakov Zhdanov <yz...@apache.org>
>>>>>>> wrote:
>>>>>>>
>>>>>>> Guys, this does not work in general case. If you provide more than one
>>>>>>>
>>>>>>> partition you can end up with a situation when they reside on more
>>>>>>>> than
>>>>>>>> one
>>>>>>>> node.
>>>>>>>>
>>>>>>>> --Yakov
>>>>>>>>
>>>>>>>> 2016-07-06 13:50 GMT+03:00 Vladimir Ozerov <vo...@gridgain.com>:
>>>>>>>>
>>>>>>>> If we add "partsToLock" to job execute request, then why we allow it
>>>>>>>> only
>>>>>>>>
>>>>>>>> for "affinity" methods? We can resort to "with" semantics instead:
>>>>>>>>> IgniteCompute.*withPartitionsToLock*(...).affinityRun();
>>>>>>>>>
>>>>>>>>> On Wed, Jul 6, 2016 at 12:23 PM, Taras Ledkov <tledkov@gridgain.com
>>>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>> Igniters,
>>>>>>>>>
>>>>>>>>> Lets discuss the changes of public API at the IgniteCompute.
>>>>>>>>>> The new methods affinityRun & affinityCall is added by working on
>>>>>>>>>> IGNITE-2310.
>>>>>>>>>>
>>>>>>>>>> https://issues.apache.org/jira/browse/IGNITE-2310
>>>>>>>>>>
>>>>>>>>>> Please take a look at the signature of the new methods:
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>> https://github.com/gridgain/apache-ignite/commit/991fb60f563ee1630152ca0159d04b4969f883bf#diff-b276b8e6e14915f9e5f2f5daeeddec8a
>>>>>>>>
>>>>>>>> void affinityRun(@Nullable String cacheName, Object affKey,
>>>>>>>>
>>>>>>>>> IgniteRunnable
>>>>>>>>>
>>>>>>>>> job, Map<String, int[]> partsToLock)
>>>>>>>>>
>>>>>>>>>> The parameter Map<String, int[]> partsToLock is added.
>>>>>>>>>> Map contains the pairs of the cache name and array of partitions
>>>>>>>>>> that
>>>>>>>>>>
>>>>>>>>>> must
>>>>>>>>>>
>>>>>>>>> be reserved on the target node before job execution.
>>>>>>>>>
>>>>>>>>>> Dmitry, colleagues, please comment or approve.
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> Taras Ledkov
>>>>>>>>>> Mail-To: tledkov@gridgain.com
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>>
>>>>>>>>> Taras Ledkov
>>>>>> Mail-To: tledkov@gridgain.com
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>> Taras Ledkov
>>>> Mail-To: tledkov@gridgain.com
>>>>
>>>>
>>>>
>> --
>> Taras Ledkov
>> Mail-To: tledkov@gridgain.com
>>
>>

-- 
Taras Ledkov
Mail-To: tledkov@gridgain.com


Re: ignite-2310

Posted by Yakov Zhdanov <yz...@apache.org>.
I replied in the ticket.

--Yakov

2016-07-11 12:43 GMT+03:00 Taras Ledkov <tl...@gridgain.com>:

> Hi,
>
> Dmitry, thanks for your comments.
> I've updated the ticket with the reasons of my version of the API changes.
> I'm OK with the both version of the API.
>
> Igniters, please any comments.
>
>
> 09.07.2016 4:22, Dmitriy Setrakyan пишет:
>
> Thanks Taras, I have added my comments in the ticket.
>>
>> On Thu, Jul 7, 2016 at 5:44 AM, Taras Ledkov <tl...@gridgain.com>
>> wrote:
>>
>> Igniters,
>>>
>>> The issue https://issues.apache.org/jira/browse/IGNITE-2310 is updated
>>> with comment
>>> about the changes at the IgniteCompute. Please comment the ticket.
>>>
>>> The changed javadoc of the affinityRun/Call is available to review at the
>>> branch
>>>
>>>
>>> https://github.com/gridgain/apache-ignite/blob/ignite-2310/modules/core/src/main/java/org/apache/ignite/IgniteCompute.java#L123
>>>
>>> 07.07.2016 14:13, Dmitriy Setrakyan пишет:
>>>
>>> Taras, it is very difficult to review API changes this way. Can you
>>> please
>>>
>>>> provide additional APIs in the ticket?
>>>>
>>>> Also, we should add documentation about reserving partitions as well. To
>>>> my
>>>> knowledge, this feature ensures that a partition will not be migrated
>>>> while
>>>> affinityRun/Call is executed, right?
>>>>
>>>> On Thu, Jul 7, 2016 at 3:02 AM, Taras Ledkov <tl...@gridgain.com>
>>>> wrote:
>>>>
>>>> Igniters,
>>>>
>>>>> Please take a look at the next proposal of changes at
>>>>> IgniteCompute.affinityRun / affinityCall:
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> https://github.com/gridgain/apache-ignite/commit/c57f009c44e07240fc8c8e6feed3271c63f31664#diff-b276b8e6e14915f9e5f2f5daeeddec8a
>>>>>
>>>>> So, two methods is added affinityRun and affinityCall. There is
>>>>> additional
>>>>> parameter Collection of extra caches names.
>>>>> An affinity job without the extra caches reserves only one partition
>>>>> (that
>>>>> contains affinity key) of the affinity cache.
>>>>> An affinity job with the extra caches parameter reserves the partitions
>>>>> (similar to affinity partition) of all extra caches.
>>>>>
>>>>>
>>>>> 06.07.2016 15:18, Semyon Boikov wrote:
>>>>>
>>>>> I think we should detect such situation and throw exception. As I
>>>>>
>>>>>> remember
>>>>>> for cross cache qieries we throw exception if caches have different
>>>>>> partitions distribution.
>>>>>>
>>>>>> On Wed, Jul 6, 2016 at 3:14 PM, Yakov Zhdanov <yz...@apache.org>
>>>>>> wrote:
>>>>>>
>>>>>> Guys, this does not work in general case. If you provide more than one
>>>>>>
>>>>>> partition you can end up with a situation when they reside on more
>>>>>>> than
>>>>>>> one
>>>>>>> node.
>>>>>>>
>>>>>>> --Yakov
>>>>>>>
>>>>>>> 2016-07-06 13:50 GMT+03:00 Vladimir Ozerov <vo...@gridgain.com>:
>>>>>>>
>>>>>>> If we add "partsToLock" to job execute request, then why we allow it
>>>>>>> only
>>>>>>>
>>>>>>> for "affinity" methods? We can resort to "with" semantics instead:
>>>>>>>>
>>>>>>>> IgniteCompute.*withPartitionsToLock*(...).affinityRun();
>>>>>>>>
>>>>>>>> On Wed, Jul 6, 2016 at 12:23 PM, Taras Ledkov <tledkov@gridgain.com
>>>>>>>> >
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>> Igniters,
>>>>>>>>
>>>>>>>> Lets discuss the changes of public API at the IgniteCompute.
>>>>>>>>> The new methods affinityRun & affinityCall is added by working on
>>>>>>>>> IGNITE-2310.
>>>>>>>>>
>>>>>>>>> https://issues.apache.org/jira/browse/IGNITE-2310
>>>>>>>>>
>>>>>>>>> Please take a look at the signature of the new methods:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>> https://github.com/gridgain/apache-ignite/commit/991fb60f563ee1630152ca0159d04b4969f883bf#diff-b276b8e6e14915f9e5f2f5daeeddec8a
>>>>>>>
>>>>>>> void affinityRun(@Nullable String cacheName, Object affKey,
>>>>>>>
>>>>>>>> IgniteRunnable
>>>>>>>>
>>>>>>>> job, Map<String, int[]> partsToLock)
>>>>>>>>
>>>>>>>>> The parameter Map<String, int[]> partsToLock is added.
>>>>>>>>> Map contains the pairs of the cache name and array of partitions
>>>>>>>>> that
>>>>>>>>>
>>>>>>>>> must
>>>>>>>>>
>>>>>>>> be reserved on the target node before job execution.
>>>>>>>>
>>>>>>>>> Dmitry, colleagues, please comment or approve.
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> Taras Ledkov
>>>>>>>>> Mail-To: tledkov@gridgain.com
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>>
>>>>>>>> Taras Ledkov
>>>>> Mail-To: tledkov@gridgain.com
>>>>>
>>>>>
>>>>>
>>>>> --
>>> Taras Ledkov
>>> Mail-To: tledkov@gridgain.com
>>>
>>>
>>>
> --
> Taras Ledkov
> Mail-To: tledkov@gridgain.com
>
>

Re: ignite-2310

Posted by Taras Ledkov <tl...@gridgain.com>.
Hi,

Dmitry, thanks for your comments.
I've updated the ticket with the reasons of my version of the API changes.
I'm OK with the both version of the API.

Igniters, please any comments.


09.07.2016 4:22, Dmitriy Setrakyan \u043f\u0438\u0448\u0435\u0442:
> Thanks Taras, I have added my comments in the ticket.
>
> On Thu, Jul 7, 2016 at 5:44 AM, Taras Ledkov <tl...@gridgain.com> wrote:
>
>> Igniters,
>>
>> The issue https://issues.apache.org/jira/browse/IGNITE-2310 is updated
>> with comment
>> about the changes at the IgniteCompute. Please comment the ticket.
>>
>> The changed javadoc of the affinityRun/Call is available to review at the
>> branch
>>
>> https://github.com/gridgain/apache-ignite/blob/ignite-2310/modules/core/src/main/java/org/apache/ignite/IgniteCompute.java#L123
>>
>> 07.07.2016 14:13, Dmitriy Setrakyan \u043f\u0438\u0448\u0435\u0442:
>>
>> Taras, it is very difficult to review API changes this way. Can you please
>>> provide additional APIs in the ticket?
>>>
>>> Also, we should add documentation about reserving partitions as well. To
>>> my
>>> knowledge, this feature ensures that a partition will not be migrated
>>> while
>>> affinityRun/Call is executed, right?
>>>
>>> On Thu, Jul 7, 2016 at 3:02 AM, Taras Ledkov <tl...@gridgain.com>
>>> wrote:
>>>
>>> Igniters,
>>>> Please take a look at the next proposal of changes at
>>>> IgniteCompute.affinityRun / affinityCall:
>>>>
>>>>
>>>>
>>>> https://github.com/gridgain/apache-ignite/commit/c57f009c44e07240fc8c8e6feed3271c63f31664#diff-b276b8e6e14915f9e5f2f5daeeddec8a
>>>>
>>>> So, two methods is added affinityRun and affinityCall. There is
>>>> additional
>>>> parameter Collection of extra caches names.
>>>> An affinity job without the extra caches reserves only one partition
>>>> (that
>>>> contains affinity key) of the affinity cache.
>>>> An affinity job with the extra caches parameter reserves the partitions
>>>> (similar to affinity partition) of all extra caches.
>>>>
>>>>
>>>> 06.07.2016 15:18, Semyon Boikov wrote:
>>>>
>>>> I think we should detect such situation and throw exception. As I
>>>>> remember
>>>>> for cross cache qieries we throw exception if caches have different
>>>>> partitions distribution.
>>>>>
>>>>> On Wed, Jul 6, 2016 at 3:14 PM, Yakov Zhdanov <yz...@apache.org>
>>>>> wrote:
>>>>>
>>>>> Guys, this does not work in general case. If you provide more than one
>>>>>
>>>>>> partition you can end up with a situation when they reside on more than
>>>>>> one
>>>>>> node.
>>>>>>
>>>>>> --Yakov
>>>>>>
>>>>>> 2016-07-06 13:50 GMT+03:00 Vladimir Ozerov <vo...@gridgain.com>:
>>>>>>
>>>>>> If we add "partsToLock" to job execute request, then why we allow it
>>>>>> only
>>>>>>
>>>>>>> for "affinity" methods? We can resort to "with" semantics instead:
>>>>>>>
>>>>>>> IgniteCompute.*withPartitionsToLock*(...).affinityRun();
>>>>>>>
>>>>>>> On Wed, Jul 6, 2016 at 12:23 PM, Taras Ledkov <tl...@gridgain.com>
>>>>>>> wrote:
>>>>>>>
>>>>>>> Igniters,
>>>>>>>
>>>>>>>> Lets discuss the changes of public API at the IgniteCompute.
>>>>>>>> The new methods affinityRun & affinityCall is added by working on
>>>>>>>> IGNITE-2310.
>>>>>>>>
>>>>>>>> https://issues.apache.org/jira/browse/IGNITE-2310
>>>>>>>>
>>>>>>>> Please take a look at the signature of the new methods:
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>> https://github.com/gridgain/apache-ignite/commit/991fb60f563ee1630152ca0159d04b4969f883bf#diff-b276b8e6e14915f9e5f2f5daeeddec8a
>>>>>>
>>>>>> void affinityRun(@Nullable String cacheName, Object affKey,
>>>>>>> IgniteRunnable
>>>>>>>
>>>>>>> job, Map<String, int[]> partsToLock)
>>>>>>>> The parameter Map<String, int[]> partsToLock is added.
>>>>>>>> Map contains the pairs of the cache name and array of partitions that
>>>>>>>>
>>>>>>>> must
>>>>>>> be reserved on the target node before job execution.
>>>>>>>> Dmitry, colleagues, please comment or approve.
>>>>>>>>
>>>>>>>> --
>>>>>>>> Taras Ledkov
>>>>>>>> Mail-To: tledkov@gridgain.com
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>> Taras Ledkov
>>>> Mail-To: tledkov@gridgain.com
>>>>
>>>>
>>>>
>> --
>> Taras Ledkov
>> Mail-To: tledkov@gridgain.com
>>
>>

-- 
Taras Ledkov
Mail-To: tledkov@gridgain.com


Re: ignite-2310

Posted by Dmitriy Setrakyan <ds...@apache.org>.
Thanks Taras, I have added my comments in the ticket.

On Thu, Jul 7, 2016 at 5:44 AM, Taras Ledkov <tl...@gridgain.com> wrote:

> Igniters,
>
> The issue https://issues.apache.org/jira/browse/IGNITE-2310 is updated
> with comment
> about the changes at the IgniteCompute. Please comment the ticket.
>
> The changed javadoc of the affinityRun/Call is available to review at the
> branch
>
> https://github.com/gridgain/apache-ignite/blob/ignite-2310/modules/core/src/main/java/org/apache/ignite/IgniteCompute.java#L123
>
> 07.07.2016 14:13, Dmitriy Setrakyan пишет:
>
> Taras, it is very difficult to review API changes this way. Can you please
>> provide additional APIs in the ticket?
>>
>> Also, we should add documentation about reserving partitions as well. To
>> my
>> knowledge, this feature ensures that a partition will not be migrated
>> while
>> affinityRun/Call is executed, right?
>>
>> On Thu, Jul 7, 2016 at 3:02 AM, Taras Ledkov <tl...@gridgain.com>
>> wrote:
>>
>> Igniters,
>>>
>>> Please take a look at the next proposal of changes at
>>> IgniteCompute.affinityRun / affinityCall:
>>>
>>>
>>>
>>> https://github.com/gridgain/apache-ignite/commit/c57f009c44e07240fc8c8e6feed3271c63f31664#diff-b276b8e6e14915f9e5f2f5daeeddec8a
>>>
>>> So, two methods is added affinityRun and affinityCall. There is
>>> additional
>>> parameter Collection of extra caches names.
>>> An affinity job without the extra caches reserves only one partition
>>> (that
>>> contains affinity key) of the affinity cache.
>>> An affinity job with the extra caches parameter reserves the partitions
>>> (similar to affinity partition) of all extra caches.
>>>
>>>
>>> 06.07.2016 15:18, Semyon Boikov wrote:
>>>
>>> I think we should detect such situation and throw exception. As I
>>>> remember
>>>> for cross cache qieries we throw exception if caches have different
>>>> partitions distribution.
>>>>
>>>> On Wed, Jul 6, 2016 at 3:14 PM, Yakov Zhdanov <yz...@apache.org>
>>>> wrote:
>>>>
>>>> Guys, this does not work in general case. If you provide more than one
>>>>
>>>>> partition you can end up with a situation when they reside on more than
>>>>> one
>>>>> node.
>>>>>
>>>>> --Yakov
>>>>>
>>>>> 2016-07-06 13:50 GMT+03:00 Vladimir Ozerov <vo...@gridgain.com>:
>>>>>
>>>>> If we add "partsToLock" to job execute request, then why we allow it
>>>>> only
>>>>>
>>>>>> for "affinity" methods? We can resort to "with" semantics instead:
>>>>>>
>>>>>> IgniteCompute.*withPartitionsToLock*(...).affinityRun();
>>>>>>
>>>>>> On Wed, Jul 6, 2016 at 12:23 PM, Taras Ledkov <tl...@gridgain.com>
>>>>>> wrote:
>>>>>>
>>>>>> Igniters,
>>>>>>
>>>>>>> Lets discuss the changes of public API at the IgniteCompute.
>>>>>>> The new methods affinityRun & affinityCall is added by working on
>>>>>>> IGNITE-2310.
>>>>>>>
>>>>>>> https://issues.apache.org/jira/browse/IGNITE-2310
>>>>>>>
>>>>>>> Please take a look at the signature of the new methods:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>> https://github.com/gridgain/apache-ignite/commit/991fb60f563ee1630152ca0159d04b4969f883bf#diff-b276b8e6e14915f9e5f2f5daeeddec8a
>>>>>
>>>>> void affinityRun(@Nullable String cacheName, Object affKey,
>>>>>> IgniteRunnable
>>>>>>
>>>>>> job, Map<String, int[]> partsToLock)
>>>>>>>
>>>>>>> The parameter Map<String, int[]> partsToLock is added.
>>>>>>> Map contains the pairs of the cache name and array of partitions that
>>>>>>>
>>>>>>> must
>>>>>>
>>>>>> be reserved on the target node before job execution.
>>>>>>>
>>>>>>> Dmitry, colleagues, please comment or approve.
>>>>>>>
>>>>>>> --
>>>>>>> Taras Ledkov
>>>>>>> Mail-To: tledkov@gridgain.com
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>> Taras Ledkov
>>> Mail-To: tledkov@gridgain.com
>>>
>>>
>>>
> --
> Taras Ledkov
> Mail-To: tledkov@gridgain.com
>
>

Re: ignite-2310

Posted by Taras Ledkov <tl...@gridgain.com>.
Igniters,

The issue https://issues.apache.org/jira/browse/IGNITE-2310 is updated 
with comment
about the changes at the IgniteCompute. Please comment the ticket.

The changed javadoc of the affinityRun/Call is available to review at 
the branch
https://github.com/gridgain/apache-ignite/blob/ignite-2310/modules/core/src/main/java/org/apache/ignite/IgniteCompute.java#L123

07.07.2016 14:13, Dmitriy Setrakyan \u043f\u0438\u0448\u0435\u0442:
> Taras, it is very difficult to review API changes this way. Can you please
> provide additional APIs in the ticket?
>
> Also, we should add documentation about reserving partitions as well. To my
> knowledge, this feature ensures that a partition will not be migrated while
> affinityRun/Call is executed, right?
>
> On Thu, Jul 7, 2016 at 3:02 AM, Taras Ledkov <tl...@gridgain.com> wrote:
>
>> Igniters,
>>
>> Please take a look at the next proposal of changes at
>> IgniteCompute.affinityRun / affinityCall:
>>
>>
>> https://github.com/gridgain/apache-ignite/commit/c57f009c44e07240fc8c8e6feed3271c63f31664#diff-b276b8e6e14915f9e5f2f5daeeddec8a
>>
>> So, two methods is added affinityRun and affinityCall. There is additional
>> parameter Collection of extra caches names.
>> An affinity job without the extra caches reserves only one partition (that
>> contains affinity key) of the affinity cache.
>> An affinity job with the extra caches parameter reserves the partitions
>> (similar to affinity partition) of all extra caches.
>>
>>
>> 06.07.2016 15:18, Semyon Boikov wrote:
>>
>>> I think we should detect such situation and throw exception. As I remember
>>> for cross cache qieries we throw exception if caches have different
>>> partitions distribution.
>>>
>>> On Wed, Jul 6, 2016 at 3:14 PM, Yakov Zhdanov <yz...@apache.org>
>>> wrote:
>>>
>>> Guys, this does not work in general case. If you provide more than one
>>>> partition you can end up with a situation when they reside on more than
>>>> one
>>>> node.
>>>>
>>>> --Yakov
>>>>
>>>> 2016-07-06 13:50 GMT+03:00 Vladimir Ozerov <vo...@gridgain.com>:
>>>>
>>>> If we add "partsToLock" to job execute request, then why we allow it only
>>>>> for "affinity" methods? We can resort to "with" semantics instead:
>>>>>
>>>>> IgniteCompute.*withPartitionsToLock*(...).affinityRun();
>>>>>
>>>>> On Wed, Jul 6, 2016 at 12:23 PM, Taras Ledkov <tl...@gridgain.com>
>>>>> wrote:
>>>>>
>>>>> Igniters,
>>>>>> Lets discuss the changes of public API at the IgniteCompute.
>>>>>> The new methods affinityRun & affinityCall is added by working on
>>>>>> IGNITE-2310.
>>>>>>
>>>>>> https://issues.apache.org/jira/browse/IGNITE-2310
>>>>>>
>>>>>> Please take a look at the signature of the new methods:
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>> https://github.com/gridgain/apache-ignite/commit/991fb60f563ee1630152ca0159d04b4969f883bf#diff-b276b8e6e14915f9e5f2f5daeeddec8a
>>>>
>>>>> void affinityRun(@Nullable String cacheName, Object affKey,
>>>>> IgniteRunnable
>>>>>
>>>>>> job, Map<String, int[]> partsToLock)
>>>>>>
>>>>>> The parameter Map<String, int[]> partsToLock is added.
>>>>>> Map contains the pairs of the cache name and array of partitions that
>>>>>>
>>>>> must
>>>>>
>>>>>> be reserved on the target node before job execution.
>>>>>>
>>>>>> Dmitry, colleagues, please comment or approve.
>>>>>>
>>>>>> --
>>>>>> Taras Ledkov
>>>>>> Mail-To: tledkov@gridgain.com
>>>>>>
>>>>>>
>>>>>>
>> --
>> Taras Ledkov
>> Mail-To: tledkov@gridgain.com
>>
>>

-- 
Taras Ledkov
Mail-To: tledkov@gridgain.com


Re: ignite-2310

Posted by Dmitriy Setrakyan <ds...@apache.org>.
Taras, it is very difficult to review API changes this way. Can you please
provide additional APIs in the ticket?

Also, we should add documentation about reserving partitions as well. To my
knowledge, this feature ensures that a partition will not be migrated while
affinityRun/Call is executed, right?

On Thu, Jul 7, 2016 at 3:02 AM, Taras Ledkov <tl...@gridgain.com> wrote:

> Igniters,
>
> Please take a look at the next proposal of changes at
> IgniteCompute.affinityRun / affinityCall:
>
>
> https://github.com/gridgain/apache-ignite/commit/c57f009c44e07240fc8c8e6feed3271c63f31664#diff-b276b8e6e14915f9e5f2f5daeeddec8a
>
> So, two methods is added affinityRun and affinityCall. There is additional
> parameter Collection of extra caches names.
> An affinity job without the extra caches reserves only one partition (that
> contains affinity key) of the affinity cache.
> An affinity job with the extra caches parameter reserves the partitions
> (similar to affinity partition) of all extra caches.
>
>
> 06.07.2016 15:18, Semyon Boikov wrote:
>
>> I think we should detect such situation and throw exception. As I remember
>> for cross cache qieries we throw exception if caches have different
>> partitions distribution.
>>
>> On Wed, Jul 6, 2016 at 3:14 PM, Yakov Zhdanov <yz...@apache.org>
>> wrote:
>>
>> Guys, this does not work in general case. If you provide more than one
>>> partition you can end up with a situation when they reside on more than
>>> one
>>> node.
>>>
>>> --Yakov
>>>
>>> 2016-07-06 13:50 GMT+03:00 Vladimir Ozerov <vo...@gridgain.com>:
>>>
>>> If we add "partsToLock" to job execute request, then why we allow it only
>>>> for "affinity" methods? We can resort to "with" semantics instead:
>>>>
>>>> IgniteCompute.*withPartitionsToLock*(...).affinityRun();
>>>>
>>>> On Wed, Jul 6, 2016 at 12:23 PM, Taras Ledkov <tl...@gridgain.com>
>>>> wrote:
>>>>
>>>> Igniters,
>>>>>
>>>>> Lets discuss the changes of public API at the IgniteCompute.
>>>>> The new methods affinityRun & affinityCall is added by working on
>>>>> IGNITE-2310.
>>>>>
>>>>> https://issues.apache.org/jira/browse/IGNITE-2310
>>>>>
>>>>> Please take a look at the signature of the new methods:
>>>>>
>>>>>
>>>>>
>>>>>
>>> https://github.com/gridgain/apache-ignite/commit/991fb60f563ee1630152ca0159d04b4969f883bf#diff-b276b8e6e14915f9e5f2f5daeeddec8a
>>>
>>>> void affinityRun(@Nullable String cacheName, Object affKey,
>>>>>
>>>> IgniteRunnable
>>>>
>>>>> job, Map<String, int[]> partsToLock)
>>>>>
>>>>> The parameter Map<String, int[]> partsToLock is added.
>>>>> Map contains the pairs of the cache name and array of partitions that
>>>>>
>>>> must
>>>>
>>>>> be reserved on the target node before job execution.
>>>>>
>>>>> Dmitry, colleagues, please comment or approve.
>>>>>
>>>>> --
>>>>> Taras Ledkov
>>>>> Mail-To: tledkov@gridgain.com
>>>>>
>>>>>
>>>>>
> --
> Taras Ledkov
> Mail-To: tledkov@gridgain.com
>
>

Re: ignite-2310

Posted by Taras Ledkov <tl...@gridgain.com>.
Igniters,

Please take a look at the next proposal of changes at 
IgniteCompute.affinityRun / affinityCall:

https://github.com/gridgain/apache-ignite/commit/c57f009c44e07240fc8c8e6feed3271c63f31664#diff-b276b8e6e14915f9e5f2f5daeeddec8a

So, two methods is added affinityRun and affinityCall. There is 
additional parameter Collection of extra caches names.
An affinity job without the extra caches reserves only one partition 
(that contains affinity key) of the affinity cache.
An affinity job with the extra caches parameter reserves the partitions 
(similar to affinity partition) of all extra caches.

06.07.2016 15:18, Semyon Boikov wrote:
> I think we should detect such situation and throw exception. As I remember
> for cross cache qieries we throw exception if caches have different
> partitions distribution.
>
> On Wed, Jul 6, 2016 at 3:14 PM, Yakov Zhdanov <yz...@apache.org> wrote:
>
>> Guys, this does not work in general case. If you provide more than one
>> partition you can end up with a situation when they reside on more than one
>> node.
>>
>> --Yakov
>>
>> 2016-07-06 13:50 GMT+03:00 Vladimir Ozerov <vo...@gridgain.com>:
>>
>>> If we add "partsToLock" to job execute request, then why we allow it only
>>> for "affinity" methods? We can resort to "with" semantics instead:
>>>
>>> IgniteCompute.*withPartitionsToLock*(...).affinityRun();
>>>
>>> On Wed, Jul 6, 2016 at 12:23 PM, Taras Ledkov <tl...@gridgain.com>
>>> wrote:
>>>
>>>> Igniters,
>>>>
>>>> Lets discuss the changes of public API at the IgniteCompute.
>>>> The new methods affinityRun & affinityCall is added by working on
>>>> IGNITE-2310.
>>>>
>>>> https://issues.apache.org/jira/browse/IGNITE-2310
>>>>
>>>> Please take a look at the signature of the new methods:
>>>>
>>>>
>>>>
>> https://github.com/gridgain/apache-ignite/commit/991fb60f563ee1630152ca0159d04b4969f883bf#diff-b276b8e6e14915f9e5f2f5daeeddec8a
>>>> void affinityRun(@Nullable String cacheName, Object affKey,
>>> IgniteRunnable
>>>> job, Map<String, int[]> partsToLock)
>>>>
>>>> The parameter Map<String, int[]> partsToLock is added.
>>>> Map contains the pairs of the cache name and array of partitions that
>>> must
>>>> be reserved on the target node before job execution.
>>>>
>>>> Dmitry, colleagues, please comment or approve.
>>>>
>>>> --
>>>> Taras Ledkov
>>>> Mail-To: tledkov@gridgain.com
>>>>
>>>>

-- 
Taras Ledkov
Mail-To: tledkov@gridgain.com


Re: ignite-2310

Posted by Semyon Boikov <sb...@apache.org>.
I think we should detect such situation and throw exception. As I remember
for cross cache qieries we throw exception if caches have different
partitions distribution.

On Wed, Jul 6, 2016 at 3:14 PM, Yakov Zhdanov <yz...@apache.org> wrote:

> Guys, this does not work in general case. If you provide more than one
> partition you can end up with a situation when they reside on more than one
> node.
>
> --Yakov
>
> 2016-07-06 13:50 GMT+03:00 Vladimir Ozerov <vo...@gridgain.com>:
>
> > If we add "partsToLock" to job execute request, then why we allow it only
> > for "affinity" methods? We can resort to "with" semantics instead:
> >
> > IgniteCompute.*withPartitionsToLock*(...).affinityRun();
> >
> > On Wed, Jul 6, 2016 at 12:23 PM, Taras Ledkov <tl...@gridgain.com>
> > wrote:
> >
> > > Igniters,
> > >
> > > Lets discuss the changes of public API at the IgniteCompute.
> > > The new methods affinityRun & affinityCall is added by working on
> > > IGNITE-2310.
> > >
> > > https://issues.apache.org/jira/browse/IGNITE-2310
> > >
> > > Please take a look at the signature of the new methods:
> > >
> > >
> > >
> >
> https://github.com/gridgain/apache-ignite/commit/991fb60f563ee1630152ca0159d04b4969f883bf#diff-b276b8e6e14915f9e5f2f5daeeddec8a
> > >
> > > void affinityRun(@Nullable String cacheName, Object affKey,
> > IgniteRunnable
> > > job, Map<String, int[]> partsToLock)
> > >
> > > The parameter Map<String, int[]> partsToLock is added.
> > > Map contains the pairs of the cache name and array of partitions that
> > must
> > > be reserved on the target node before job execution.
> > >
> > > Dmitry, colleagues, please comment or approve.
> > >
> > > --
> > > Taras Ledkov
> > > Mail-To: tledkov@gridgain.com
> > >
> > >
> >
>

Re: ignite-2310

Posted by Yakov Zhdanov <yz...@apache.org>.
Guys, this does not work in general case. If you provide more than one
partition you can end up with a situation when they reside on more than one
node.

--Yakov

2016-07-06 13:50 GMT+03:00 Vladimir Ozerov <vo...@gridgain.com>:

> If we add "partsToLock" to job execute request, then why we allow it only
> for "affinity" methods? We can resort to "with" semantics instead:
>
> IgniteCompute.*withPartitionsToLock*(...).affinityRun();
>
> On Wed, Jul 6, 2016 at 12:23 PM, Taras Ledkov <tl...@gridgain.com>
> wrote:
>
> > Igniters,
> >
> > Lets discuss the changes of public API at the IgniteCompute.
> > The new methods affinityRun & affinityCall is added by working on
> > IGNITE-2310.
> >
> > https://issues.apache.org/jira/browse/IGNITE-2310
> >
> > Please take a look at the signature of the new methods:
> >
> >
> >
> https://github.com/gridgain/apache-ignite/commit/991fb60f563ee1630152ca0159d04b4969f883bf#diff-b276b8e6e14915f9e5f2f5daeeddec8a
> >
> > void affinityRun(@Nullable String cacheName, Object affKey,
> IgniteRunnable
> > job, Map<String, int[]> partsToLock)
> >
> > The parameter Map<String, int[]> partsToLock is added.
> > Map contains the pairs of the cache name and array of partitions that
> must
> > be reserved on the target node before job execution.
> >
> > Dmitry, colleagues, please comment or approve.
> >
> > --
> > Taras Ledkov
> > Mail-To: tledkov@gridgain.com
> >
> >
>

Re: ignite-2310

Posted by Vladimir Ozerov <vo...@gridgain.com>.
If we add "partsToLock" to job execute request, then why we allow it only
for "affinity" methods? We can resort to "with" semantics instead:

IgniteCompute.*withPartitionsToLock*(...).affinityRun();

On Wed, Jul 6, 2016 at 12:23 PM, Taras Ledkov <tl...@gridgain.com> wrote:

> Igniters,
>
> Lets discuss the changes of public API at the IgniteCompute.
> The new methods affinityRun & affinityCall is added by working on
> IGNITE-2310.
>
> https://issues.apache.org/jira/browse/IGNITE-2310
>
> Please take a look at the signature of the new methods:
>
>
> https://github.com/gridgain/apache-ignite/commit/991fb60f563ee1630152ca0159d04b4969f883bf#diff-b276b8e6e14915f9e5f2f5daeeddec8a
>
> void affinityRun(@Nullable String cacheName, Object affKey, IgniteRunnable
> job, Map<String, int[]> partsToLock)
>
> The parameter Map<String, int[]> partsToLock is added.
> Map contains the pairs of the cache name and array of partitions that must
> be reserved on the target node before job execution.
>
> Dmitry, colleagues, please comment or approve.
>
> --
> Taras Ledkov
> Mail-To: tledkov@gridgain.com
>
>