Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id AADF4200B41 for ; Thu, 7 Jul 2016 13:14:15 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id A9688160A68; Thu, 7 Jul 2016 11:14:15 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id F0EC9160A59 for ; Thu, 7 Jul 2016 13:14:14 +0200 (CEST) Received: (qmail 77758 invoked by uid 500); 7 Jul 2016 11:14:14 -0000 Mailing-List: contact dev-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.apache.org Delivered-To: mailing list dev@ignite.apache.org Received: (qmail 77747 invoked by uid 99); 7 Jul 2016 11:14:14 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Jul 2016 11:14:14 +0000 Received: from mail-qk0-f180.google.com (mail-qk0-f180.google.com [209.85.220.180]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id B77721A0285 for ; Thu, 7 Jul 2016 11:14:13 +0000 (UTC) Received: by mail-qk0-f180.google.com with SMTP id s126so11046006qkh.2 for ; Thu, 07 Jul 2016 04:14:13 -0700 (PDT) X-Gm-Message-State: ALyK8tJ5F5Mbv/299gOlVUQ0d+CK9DcWJi3f77jS87NoMw5v3Lqwii8jloRQnqsZUSnrg29DxPTOf93Z4cDyKfwy X-Received: by 10.55.203.156 with SMTP id u28mr33456359qkl.116.1467890052678; Thu, 07 Jul 2016 04:14:12 -0700 (PDT) MIME-Version: 1.0 Received: by 10.140.81.35 with HTTP; Thu, 7 Jul 2016 04:13:33 -0700 (PDT) In-Reply-To: References: <8093e155-84fe-ba02-a55b-b40c6b9f40d3@gridgain.com> From: Dmitriy Setrakyan Date: Thu, 7 Jul 2016 04:13:33 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: ignite-2310 To: Taras Ledkov Cc: dev@ignite.apache.org Content-Type: multipart/alternative; boundary=001a1146dcb028e0bf053709c928 archived-at: Thu, 07 Jul 2016 11:14:15 -0000 --001a1146dcb028e0bf053709c928 Content-Type: text/plain; charset=UTF-8 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 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 >> 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 : >>> >>> 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 >>>> 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 partsToLock) >>>>> >>>>> The parameter Map 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 > > --001a1146dcb028e0bf053709c928--