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 357ED200B64 for ; Tue, 2 Aug 2016 09:15:01 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 340FF160A8C; Tue, 2 Aug 2016 07:15:01 +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 5213B160A76 for ; Tue, 2 Aug 2016 09:15:00 +0200 (CEST) Received: (qmail 42494 invoked by uid 500); 2 Aug 2016 07:14:59 -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 42477 invoked by uid 99); 2 Aug 2016 07:14:59 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Aug 2016 07:14:59 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id BB6B01A085B for ; Tue, 2 Aug 2016 07:14:58 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.192 X-Spam-Level: * X-Spam-Status: No, score=1.192 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, URI_HEX=1.313] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id FWBFECjeGmms for ; Tue, 2 Aug 2016 07:14:56 +0000 (UTC) Received: from mail-yw0-f170.google.com (mail-yw0-f170.google.com [209.85.161.170]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id D4B515F306 for ; Tue, 2 Aug 2016 07:14:55 +0000 (UTC) Received: by mail-yw0-f170.google.com with SMTP id j12so192205427ywb.2 for ; Tue, 02 Aug 2016 00:14:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=6U0k3zq6e9jvBrRyVpDrL/hzvxzuhvBoeV8Sq+WnKCQ=; b=nuSvR0T6XAACKC90TeUf0K7wHKBuTqFOcfci/fjMC5xniDKEjdF9lNOQg2BTh8xXPe QZOTXF1vgWqq7r3EJxbKiHW8C/PHP+RIdJJ57g7bvIjamfrdxfGegoTEX0cuet9XToHg p+Il9QkI/X88tZj7k4CLc/go4Tyg9lyHqEdu7z6axMsvGN50PNrPt2fNX5Tl6ayyGpWM Px17kFyBsV28z+dQrQHdcFR2o1mEyI5W/I6UQEEM64FzRZeek1YQ+2cdjsOG8XuvbsO9 MUqHvGEb8uTRCNdWoJn4w50QDRIsu6YEGguFcd15oNtGEl/klr1xxAl6SYInvZez3C3A vr6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=6U0k3zq6e9jvBrRyVpDrL/hzvxzuhvBoeV8Sq+WnKCQ=; b=MXOAMQe+x8S96tIwMEyrcOlw0vkR9g3fxArL19p6LbnxVkMgTicad+wSJ3EFaLBDJl zDqyVloYS8TQYWbbZZP/op0MaAoOACWMlAfF3oBP2Bv3U+FbUkMwEImTUVmUF0+lIL7g 5J1e2pP2ZZvMCL/CiEY4/cYEsEQeJ+skuea5cspBXBkbfzZGVQ6wmn9b2lFzjYkxXB9x kGM0hVjxeaB/xLQiY9HqplTr3bpkp/DxkIY5f5D0IkMJfOrMQf52cq8nYYMpEuDn6GOT 4Dt4IzZA7YfIFqgKHR8M9qBJQBduYCTQxFYty/v5tuY1ERIYro8GWlZ5/F1PCQH9MoHf tkCQ== X-Gm-Message-State: AEkoouvI1ULC9umF2WnaEVmmoji1FkjEBFdt9TuiDsXRh65LJUtIly6VS/us9ctIlhYn5rxCgDg7/HTylxFQvQ== X-Received: by 10.13.207.2 with SMTP id r2mr38392914ywd.158.1470122088428; Tue, 02 Aug 2016 00:14:48 -0700 (PDT) MIME-Version: 1.0 Received: by 10.129.162.201 with HTTP; Tue, 2 Aug 2016 00:14:47 -0700 (PDT) In-Reply-To: References: <56F3BF72.9000106@gridgain.com> <1470062542934-10304.post@n4.nabble.com> From: Alexander Paschenko Date: Tue, 2 Aug 2016 10:14:47 +0300 Message-ID: Subject: Re: All BinaryObjects created by BinaryObjectBuilder stored at the same partition by default To: dev@ignite.apache.org Content-Type: text/plain; charset=UTF-8 archived-at: Tue, 02 Aug 2016 07:15:01 -0000 Dmitriy, Good point, however, currently there's no way to distinguish hash code of zero which is a valid case from missing hash code. We probably should enhance binary builder for it to handle this case. - Alex 2016-08-02 9:47 GMT+03:00 Dmitriy Setrakyan : > On Mon, Aug 1, 2016 at 11:38 PM, Vladimir Ozerov > wrote: > >> Andrey, >> >> The question is when to print this warning. I doubt we can print a warning >> when calling *BinaryObjectBuilder.build() *method, because an object >> without a hash code is normal situation. >> >> > I would not only print warning, but throw exception, if an object without a > hashCode ends up on a put or read operation in cache. > > >> On Tue, Aug 2, 2016 at 9:00 AM, Andrey Gura wrote: >> >> > I think we also should print some warning in case when hashCode() wasn't >> > called on BinaryObject explicitly. >> > >> > On Tue, Aug 2, 2016 at 2:20 AM, Dmitriy Setrakyan > > >> > wrote: >> > >> > > On Mon, Aug 1, 2016 at 10:01 AM, Alexey Goncharuk < >> > > alexey.goncharuk@gmail.com> wrote: >> > > >> > > > Dmitriy, >> > > > >> > > > The question is how do you calculate the value of the hashCode? Do >> you >> > > want >> > > > it to be specified explicitly in INSERT statement? >> > > > >> > > >> > > I think optionally we should allow to specify hashCode as part of the >> > > INSERT statement. However, if it is not specified, we should calculate >> it >> > > automatically based in the key fields defined in the schema/type. >> Agree? >> > > >> > > >> > > > >> > > > 2016-08-01 19:47 GMT+03:00 Dmitriy Setrakyan > >: >> > > > >> > > > > Alex, >> > > > > >> > > > > In your case, why not just explicitly set hashcode every time you >> > > create >> > > > an >> > > > > object? There is BinaryObjectBuilder.hashCode(...) method. >> > > > > >> > > > > D. >> > > > > >> > > > > On Mon, Aug 1, 2016 at 7:42 AM, al.psc < >> > > alexander.a.paschenko@gmail.com> >> > > > > wrote: >> > > > > >> > > > > > Guys, >> > > > > > >> > > > > > It seems like this problem has become an important one once >> again. >> > > > > > In the course of working on >> > > > > > https://issues.apache.org/jira/browse/IGNITE-2294 (DML support) >> > > > there's >> > > > > > need >> > > > > > to support binary marshaller. And, although we can build just >> > > > > BinaryObject >> > > > > > and put it to cache, without adequate hash code it won't be >> stored >> > > > > > properly. >> > > > > > Currently SQL MERGE works simply by deserializing newly built >> > object, >> > > > but >> > > > > > it's obviously wrong and is just a workaround rather a solution. >> > > > > > Has anyone come with possible design proposals for this problem's >> > > > > solution? >> > > > > > >> > > > > > Thanks. >> > > > > > >> > > > > > - Alex >> > > > > > >> > > > > > >> > > > > > >> > > > > > -- >> > > > > > View this message in context: >> > > > > > >> > > > > >> > > > >> > > >> > >> http://apache-ignite-developers.2346864.n4.nabble.com/All-BinaryObjects-created-by-BinaryObjectBuilder-stored-at-the-same-partition-by-default-tp8042p10304.html >> > > > > > Sent from the Apache Ignite Developers mailing list archive at >> > > > > Nabble.com. >> > > > > > >> > > > > >> > > > >> > > >> > >> > >> > >> > -- >> > Andrey Gura >> > GridGain Systems, Inc. >> > www.gridgain.com >> > >>