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 039AD200C02 for ; Fri, 20 Jan 2017 16:00:58 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 022C7160B48; Fri, 20 Jan 2017 15:00:58 +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 BF5A6160B39 for ; Fri, 20 Jan 2017 16:00:56 +0100 (CET) Received: (qmail 4644 invoked by uid 500); 20 Jan 2017 15:00:55 -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 4631 invoked by uid 99); 20 Jan 2017 15:00:55 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Jan 2017 15:00:55 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 09410C1D3B for ; Fri, 20 Jan 2017 15:00:55 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3.379 X-Spam-Level: *** X-Spam-Status: No, score=3.379 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_REPLY=1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id JiExv5iAmmbj for ; Fri, 20 Jan 2017 15:00:53 +0000 (UTC) Received: from mail-yw0-f169.google.com (mail-yw0-f169.google.com [209.85.161.169]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id AA6535F367 for ; Fri, 20 Jan 2017 15:00:52 +0000 (UTC) Received: by mail-yw0-f169.google.com with SMTP id w75so89858100ywg.1 for ; Fri, 20 Jan 2017 07:00:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=XELCNU3SImSh5ubuXlJ76/g6lsZR25hO44/1MilI1nY=; b=E2JaCEKJmpTit2rNQNqN3pPY3paDllVt92VcCctCvqiOqTVezIrx4CTO4W1wUAafhF zhVpXS0hBvSUrU/64yPEk3UKtU9R0eeWOBY1ZNZ9mD6VUGTY5WNNukZ/bODvXpv8RmjN 0GHfPCukbMuBJ4WUogkbMWa+q8ESM11aYHvq8ZjP3A1DvKDqqMVYHA1mefXr3NrHo/nC kU+9bZo2xDT4OuofKBn8yRlLAVsHgPHoNK33tXYwVDA/JY9q2M5wEKLSJ3nXJlodcL7n hWtBG/9dBPzOjP7CjfjfAxdbXy0lHL4YoaA6e/nZuMwCrxpWlPvJX1cqQymDotQGa/R4 A8nA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=XELCNU3SImSh5ubuXlJ76/g6lsZR25hO44/1MilI1nY=; b=KPpG4jKAH/ByPyYs6wC3b8GJrpSMr+pvlw/IYYep+rFTHWfvhYwg6J26a+czF/EgrE 84nglZ30fvXdoX5pn1ERvPboSpH5WUdpQFv6lQJktclJGm86Q/XyttlHFY7eQmYzZH4f e39+f9/tKPuGbpvMCcY0PC6wWdN6K8u3o9HiAxJq0Sm3/aqFpG8UIprE0ZPgPBa03kft 8luprv81Fcjh5v/ARSvxpofu86xD/rlK/m//ig+azEbu6UJpBRRI9YBrI/2CjPAjAigi InplaplRNX+IR4Y2mT5IPce5f6T0JapJGmlIExo6Z2O1b1dpO+Yjae+7gX2FndwSkW1c Q7mQ== X-Gm-Message-State: AIkVDXLYBHoNXB6v+J/6TGkkhpFheHbeiGeGPZJ5RJBP9jfASX5qWZ6MrXaYoA4Wb55tNCj7m/o7GY6SWm7vbQ== X-Received: by 10.129.90.198 with SMTP id o189mr12167816ywb.63.1484924451958; Fri, 20 Jan 2017 07:00:51 -0800 (PST) MIME-Version: 1.0 Received: by 10.129.82.13 with HTTP; Fri, 20 Jan 2017 07:00:51 -0800 (PST) In-Reply-To: References: From: Alexei Scherbakov Date: Fri, 20 Jan 2017 18:00:51 +0300 Message-ID: Subject: Re: Allow distributed SQL query execution over explicit set of partitions To: dev@ignite.apache.org Content-Type: multipart/alternative; boundary=001a114916b87a41a6054687ea00 archived-at: Fri, 20 Jan 2017 15:00:58 -0000 --001a114916b87a41a6054687ea00 Content-Type: text/plain; charset=UTF-8 Dmitriy, Honestly, I don't understand your issues with a reviewing, because I've provided PR link in the JIRA ticket. Just open it in browser and enjoy :) Nevertheless, I've added short description for API changes in the JIRA ticket. Other comments are below. 2017-01-19 20:35 GMT+03:00 Dmitriy Setrakyan : > Alexey S, > > My comments are below. I would like to ask you again to provide all the API > changes explicitly in the Jira ticket without asking the community to > download the whole GIT repo. > > D. > > On Thu, Jan 19, 2017 at 6:27 AM, Alexei Scherbakov < > alexey.scherbakoff@gmail.com> wrote: > > > 1. OK. > > > > Agree. > > > > > > 2. Agreed. In future we might split query execution between nodes, but > for > > now query is routed to random node in grid, > > > > If you are talking about REPLICATED caches, then sending query to a random > node when a user explicitly specifies the partitions is just deceiving. I > would throw an exception in case if a user specifies partitions for > REPLICATED caches. > > Exception is added. > > > > > 3. OK, let's mark getter/setter as deprecated. > > > > I still do not know the proposed new API and why we are deprecating methods > on the old API. I have asked many times to post all the API changes in the > ticket. > > Alexey S., can you please do it, so the community members can review them > without installing the project on their mobile devices? > Description is added to the JIRA ticket. > > 4. Query must be executed locally only for defined partitions. Currently > > this setting is ignored for local queries. > > > > This is again the wrong behavior. We should not "ignore" anything. Let's > throw an exception with a correct error message. > It's already working. > > > > 5. I have the same understanding. Distributed joins will ignore the > > setting. > > This is not implemented yet.. > > > > And again, this will be very confusing to users. Any chance we can throw an > exception with a proper error message here? > I hope to make it working too. But first I need a review of current PR state to understand whether I'm moving in right direction or not. > > > > > > > > 2017-01-19 15:39 GMT+03:00 Sergi Vladykin : > > > > > Agree, lets remove everything related to partition ranges. Looks like > > > unnecessary complication. > > > > > > Sergi > > > > > > 2017-01-19 10:01 GMT+03:00 Vladimir Ozerov : > > > > > > > Several side notes about API. > > > > > > > > 1) I would avoid ranges even in this form.for the sake of simplicity. > > > > Ignite do not have any notion of "partition range" in affinity API, > so > > I > > > do > > > > not understand how users are going to work on ranges unless they have > > > some > > > > very special custom affinity function, which is rather unlikely case. > > > > > > > > 2) The fact that this property is ignored in REPLICATED cache is > > > confusing. > > > > REPLICATED cache still divides partitions into primaries and backups. > > If > > > I > > > > have very large data set and want to execute some query, I would > > > definitely > > > > expect that Ignite will take advantage of distributed computing and > > > spread > > > > the load between nodes. I understand that currently SQL queries do > not > > > work > > > > this way, but this is clear disadvantage for certain scenarios, which > > we > > > > may improve in future. I would remove this paragraph from docs. > > > > > > > > 3) We already have ScanQuery.partition getter/setter. We need to make > > > sure > > > > that they are "merged" somehow. For instance, we may deprecate two > > > methods > > > > in ScanQuery class, and advise users to use Query.partitions, with > > > > clarification - only single partition is supported for ScanQuery at > the > > > > moment. > > > > > > > > 4) What should happen if "partitions" are defined and "local" flag is > > > set? > > > > > > > > As per distributed joins - how are we going to execute them when > > > partitions > > > > are set explicitly? As far as I understand, partitions should apply > > only > > > to > > > > map step and only for the cache query was created from, This way > > > > distributed join execution should effectively ignore partitions? > > > > > > > > Vladimir. > > > > > > > > > > > > On Thu, Jan 19, 2017 at 1:04 AM, Alexei Scherbakov < > > > > alexey.scherbakoff@gmail.com> wrote: > > > > > > > > > I mean distributed joins. > > > > > > > > > > 2017-01-19 0:10 GMT+03:00 Alexei Scherbakov < > > > > alexey.scherbakoff@gmail.com> > > > > > : > > > > > > > > > > > Guys, > > > > > > > > > > > > I've finished adding API changes and implemented proper nodes > > > routing. > > > > > > > > > > > > Currently it doesn't work with distributed queries.But I think > this > > > > > > feature should be compatible with it. > > > > > > > > > > > > Could anyone take a look at current branch state while I'm > looking > > > > deeper > > > > > > into dsitributed queries code? > > > > > > > > > > > > Issue: https://issues.apache.org/jira/browse/IGNITE-4523 > > > > > > PR: https://github.com/apache/ignite/pull/1418 > > > > > > > > > > > > > > > > > > > > > > > > 2017-01-13 15:55 GMT+03:00 Alexei Scherbakov < > > > > > alexey.scherbakoff@gmail.com > > > > > > >: > > > > > > > > > > > >> OK, let's do it this way. > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> 2017-01-13 13:27 GMT+03:00 Sergi Vladykin < > > sergi.vladykin@gmail.com > > > >: > > > > > >> > > > > > >>> Internally we still use int[] when we send partitions (see > > > > > >>> GridH2QueryRequest.parts). It looks like we only do more work > > with > > > > > >>> PartitionSet. > > > > > >>> > > > > > >>> I like the idea of bitset for partitions, but > > > > > >>> > > > > > >>> 1. We have to change internals first to use it, otherwise the > > > > > >>> optimization > > > > > >>> makes no sense. > > > > > >>> 2. We will need to have a method SqlQuery.setPartitions(int... > > > parts) > > > > > for > > > > > >>> usability reasons anyways. > > > > > >>> > > > > > >>> Thus I suggest for now to go the straightforward way with int[] > > and > > > > > >>> create > > > > > >>> a separate ticket describing the optimization with bitset. > > > > > >>> > > > > > >>> Sergi > > > > > >>> > > > > > >>> 2017-01-13 13:06 GMT+03:00 Alexei Scherbakov < > > > > > >>> alexey.scherbakoff@gmail.com>: > > > > > >>> > > > > > >>> > PartitionSet hides internal implementation of int array. > > > > > >>> > > > > > > >>> > This allows as to efficiently represent contiguous range of > > > > > partitions > > > > > >>> and > > > > > >>> > defines clear API for ordered iteration over partitions and > > > > > containment > > > > > >>> > check. > > > > > >>> > > > > > > >>> > Even better to go with compressed bitmap, as I mentioned in > > > ticket > > > > > >>> comment. > > > > > >>> > This will allow us to minimize heap footprint for this > object. > > > > > >>> > > > > > > >>> > Moreover, it will be useful to create reusable compressed > > bitmap > > > > > >>> > implementation in Ignite and use it in other cases, on > example, > > > for > > > > > >>> > replacing H2's IntArray and Set. > > > > > >>> > > > > > > >>> > Should I create a ticket for this ? > > > > > >>> > > > > > > >>> > . > > > > > >>> > > > > > > >>> > 2017-01-13 1:01 GMT+03:00 Dmitriy Setrakyan < > > > dsetrakyan@apache.org > > > > >: > > > > > >>> > > > > > > >>> > > On Thu, Jan 12, 2017 at 6:12 AM, Sergi Vladykin < > > > > > >>> > sergi.vladykin@gmail.com> > > > > > >>> > > wrote: > > > > > >>> > > > > > > > >>> > > > I looked at the code. The PartitionSet concept looks > > > > > >>> overengineered to > > > > > >>> > > me, > > > > > >>> > > > why wouldn't we just go with int[]? > > > > > >>> > > > > > > > > >>> > > > > > > > >>> > > Agree. > > > > > >>> > > > > > > > >>> > > > > > > > >>> > > > > > > > > >>> > > > Sergi > > > > > >>> > > > > > > > > >>> > > > 2017-01-12 15:18 GMT+03:00 Alexei Scherbakov < > > > > > >>> > > alexey.scherbakoff@gmail.com > > > > > >>> > > > >: > > > > > >>> > > > > > > > > >>> > > > > Done. > > > > > >>> > > > > > > > > > >>> > > > > 2017-01-11 20:39 GMT+03:00 Dmitriy Setrakyan < > > > > > >>> dsetrakyan@apache.org > > > > > >>> > >: > > > > > >>> > > > > > > > > > >>> > > > > > Alexey, > > > > > >>> > > > > > > > > > > >>> > > > > > I am not sure I am seeing the API changes documented > in > > > the > > > > > >>> ticket. > > > > > >>> > > Can > > > > > >>> > > > > you > > > > > >>> > > > > > please either document them or add GIT links for the > > new > > > > > >>> classes? > > > > > >>> > > > > > > > > > > >>> > > > > > D. > > > > > >>> > > > > > > > > > > >>> > > > > > On Wed, Jan 11, 2017 at 9:29 AM, Alexei Scherbakov < > > > > > >>> > > > > > alexey.scherbakoff@gmail.com> wrote: > > > > > >>> > > > > > > > > > > >>> > > > > > > Guys, > > > > > >>> > > > > > > > > > > > >>> > > > > > > I've just submitted a PR for > > > > > >>> > > > > > > https://issues.apache.org/jira/browse/IGNITE-4523. > > > > > >>> > > > > > > > > > > > >>> > > > > > > Please review API changes while waiting for TC > > results. > > > > > >>> > > > > > > > > > > > >>> > > > > > > -- > > > > > >>> > > > > > > > > > > > >>> > > > > > > Best regards, > > > > > >>> > > > > > > Alexei Scherbakov > > > > > >>> > > > > > > > > > > > >>> > > > > > > > > > > >>> > > > > > > > > > >>> > > > > > > > > > >>> > > > > > > > > > >>> > > > > -- > > > > > >>> > > > > > > > > > >>> > > > > Best regards, > > > > > >>> > > > > Alexei Scherbakov > > > > > >>> > > > > > > > > > >>> > > > > > > > > >>> > > > > > > > >>> > > > > > > >>> > > > > > > >>> > > > > > > >>> > -- > > > > > >>> > > > > > > >>> > Best regards, > > > > > >>> > Alexei Scherbakov > > > > > >>> > > > > > > >>> > > > > > >> > > > > > >> > > > > > >> > > > > > >> -- > > > > > >> > > > > > >> Best regards, > > > > > >> Alexei Scherbakov > > > > > >> > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > > > > > > > > Best regards, > > > > > > Alexei Scherbakov > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > > > > > > Best regards, > > > > > Alexei Scherbakov > > > > > > > > > > > > > > > > > > > > -- > > > > Best regards, > > Alexei Scherbakov > > > -- Best regards, Alexei Scherbakov --001a114916b87a41a6054687ea00--