Return-Path: X-Original-To: apmail-hbase-dev-archive@www.apache.org Delivered-To: apmail-hbase-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 007C41840C for ; Tue, 2 Feb 2016 19:47:48 +0000 (UTC) Received: (qmail 69182 invoked by uid 500); 2 Feb 2016 19:47:47 -0000 Delivered-To: apmail-hbase-dev-archive@hbase.apache.org Received: (qmail 69090 invoked by uid 500); 2 Feb 2016 19:47:47 -0000 Mailing-List: contact dev-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hbase.apache.org Delivered-To: mailing list dev@hbase.apache.org Received: (qmail 69078 invoked by uid 99); 2 Feb 2016 19:47:46 -0000 Received: from Unknown (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Feb 2016 19:47:46 +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 8127EC18AE for ; Tue, 2 Feb 2016 19:47:46 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.679 X-Spam-Level: * X-Spam-Status: No, score=1.679 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2.5, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, 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-us-west.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id f1DZBgD6w4dt for ; Tue, 2 Feb 2016 19:47:45 +0000 (UTC) Received: from mail-ob0-f182.google.com (mail-ob0-f182.google.com [209.85.214.182]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTPS id 1397720271 for ; Tue, 2 Feb 2016 19:47:45 +0000 (UTC) Received: by mail-ob0-f182.google.com with SMTP id is5so160763509obc.0 for ; Tue, 02 Feb 2016 11:47:45 -0800 (PST) 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 :content-type; bh=zp6dcPpsln3SKyvENGGaioajP7+9EC/gj/0MVBCZ1Iw=; b=vQcVLTG/VIp3yBd5L8R8GOVmEw8r0nDljyWSlGxKUOnh3efcf4FSbwf3ZZ4SU0t/AD d+BO2Y433vpGmcR8mGEd/tBGtVaapvIXC8mekQEXnan1UP1ug5klaB4hi0HO03z/SS9K EFp/kcitvpaM9H1XzdlCqx6KJNlXHTmRdz+tdqM0QkLEVrbdvCr2tfKLDZ7VyI1PexTG oI1g4YO/Lt0f9FEm07MCE5NN2Qxd5E3wiPPr8Y6C9tCInyw7CPjHTYk1Sa5CtFfbcta7 0Vs5d7pvYPIAPRLoV906k9KVh8QNdsgRTnOm5MDIA11B8HzO49QEBmJP97+M3Nrc0mQN UvAg== 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:content-type; bh=zp6dcPpsln3SKyvENGGaioajP7+9EC/gj/0MVBCZ1Iw=; b=jSWHsQOAjtNeVaORViWtRPbIrBQYH0v0Kxcy6uJM9QE4TPEtAiAUyU3L8V3OwhOlfw GfMNSqxyKIwtMP661Z3LB34tX4clOztvfLY51hD0MsIsH7G3eL2hCf+jzCuRTmC66bFg 6xrO4PdIERhhdNh7Bza9CKxAWQ9EHqLa7M5ITzZDo/ySIgsnw4jlq6vzHm/QH3vHmJcR 9n9txnGEiWR6CPlQSwIPnGH0ojmP+qpxZZkhe/2+qWHuwAgQ/KWjz++8T8DXTtIZHvl/ N/BNnlIYDAQtFIRk++QX0h3L1YzLABw4uzLkvJBt5E35L5hOBR0bMikgJiLwFTqAoBgI we7A== X-Gm-Message-State: AG10YOTuhwsPMWKLBQucs+QqFVZQXUITvg7zMfGVWhRkxVbjF6nXC7BWd6zxvYO34L3S9+Kl7Yvl2kbO45UjPQ== X-Received: by 10.60.82.229 with SMTP id l5mr25025004oey.6.1454442463641; Tue, 02 Feb 2016 11:47:43 -0800 (PST) MIME-Version: 1.0 Received: by 10.60.74.163 with HTTP; Tue, 2 Feb 2016 11:47:24 -0800 (PST) In-Reply-To: References: From: =?UTF-8?Q?Enis_S=C3=B6ztutar?= Date: Tue, 2 Feb 2016 11:47:24 -0800 Message-ID: Subject: Re: DISCUSS: Protobufs? To: "dev@hbase.apache.org" Content-Type: multipart/alternative; boundary=047d7b6725dc6447c3052acec64a --047d7b6725dc6447c3052acec64a Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable BTW, we should also be looking at https://google.github.io/flatbuffers/ or https://capnproto.org/ for serialization as an option. The idea is to not allocate objects and prevent allocations altogether. We are allocating PB objects for every Get / Put, then we allocate our Get / Put objects. At least we can save on 1. Although, just switching our serialization format again will be a huge undertaking with obvious wire-incompatibility issues. If PB3 or 2.x gives us what we want in terms of preventing big byte[] allocations, we would gain regardless. Enis On Tue, Feb 2, 2016 at 11:41 AM, Enis S=C3=B6ztutar wr= ote: > Google guys over at > https://github.com/grpc/grpc-java/issues/1054#issuecomment-147295224 are > saying that CIS changes may be coming to 2.x from what I understand. If s= o, > our life would be easier. Even so, I'm 100% sure we have to do shading > since Hadoop will not change it's PB dependency anytime soon. > > We have to do this before doing shading: > https://issues.apache.org/jira/browse/HBASE-15174 > > Enis > > On Tue, Feb 2, 2016 at 8:15 AM, Stack wrote: > >> Thanks Duo. If proto3 had what we wanted, you are suggesting we might mo= ve >> to proto3 setting it to do proto2 support and shade it so we don't clash >> with other includes of pb? >> >> Regards Anoop comment, the note on the end of this issue looks promising >> but I don't know when it'd see the light of day: >> https://github.com/grpc/grpc-java/issues/1054#issuecomment-147295224 >> >> St.Ack >> >> >> On Mon, Feb 1, 2016 at 10:49 PM, Anoop John >> wrote: >> >> > UnsafeByteStrings - This may help us to avoid copy even with out our >> > HBaseZeroCopyByteString stuff. But with a DirectByteBuffer, it has to >> copy >> > data to onheap byte[]. We even want a DBB backing ! >> > >> > -Anoop- >> > >> > On Tue, Feb 2, 2016 at 12:07 PM, =E5=BC=A0=E9=93=8E wrote: >> > >> > > https://groups.google.com/forum/#!topic/protobuf/wAqvtPLBsE8 >> > > >> > > PB2 and PB3 are wire compatible, and of course, protobuf-java is not >> > > compatible so dependency will be a problem... But I think the shaded >> > client >> > > and server can solve the problem? >> > > >> > > Thanks. >> > > >> > > 2016-02-02 14:27 GMT+08:00 Stack : >> > > >> > > > We are running into a few issues with protobufs. >> > > > >> > > > + PB always copies all data before making a Message. This generate= s >> > > garbage >> > > > unnecessarily. >> > > > + CodedInputStream does not support ByteBuffers in 2.5. In 2.6 it >> does >> > > but >> > > > again, copies the data out of the BB always; this is especially >> painful >> > > > when the BB is a DBB with its data offheap and intent is to keep >> data >> > > > offheap. >> > > > >> > > > There are other issues. CIS allocates 4k buffers regardless (See >> > > > HBASE-15177). >> > > > And then there was the HBaseZeroCopyByteString fun and games we ha= d >> a >> > > while >> > > > back. >> > > > >> > > > 3.0 PB adds UnsafeByteStrings so can do zero copy. Thats good. But >> PB3 >> > is >> > > > incompatible with PB2 (or at least, it looks like PB2 clients can'= t >> > talk >> > > to >> > > > PB3 [1]). >> > > > >> > > > There is javanano protobufs. All is open access, but it too looks >> > > different >> > > > to PB2 (i've not tried it). >> > > > >> > > > Protostuff seems really quiet these times [2]. >> > > > >> > > > Fork (and shade)? >> > > > >> > > > Thoughts? >> > > > >> > > > St.Ack >> > > > >> > > > 1. https://github.com/google/protobuf/releases >> > > > 2. https://groups.google.com/forum/#!forum/protostuff >> > > > >> > > >> > >> > > --047d7b6725dc6447c3052acec64a--