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 2E4B1200D1F for ; Fri, 29 Sep 2017 07:20:10 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 2CC351609CD; Fri, 29 Sep 2017 05:20:10 +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 71BA61609ED for ; Fri, 29 Sep 2017 07:20:09 +0200 (CEST) Received: (qmail 11882 invoked by uid 500); 29 Sep 2017 05:20:07 -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 11839 invoked by uid 99); 29 Sep 2017 05:20:07 -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; Fri, 29 Sep 2017 05:20:07 +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 2ED841A16A2 for ; Fri, 29 Sep 2017 05:20:07 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.001 X-Spam-Level: X-Spam-Status: No, score=-0.001 tagged_above=-999 required=6.31 tests=[FROM_MISSPACED=0.001, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id prF88weXf5Wh for ; Fri, 29 Sep 2017 05:20:06 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id B1F095F5F7 for ; Fri, 29 Sep 2017 05:20:05 +0000 (UTC) Received: from localhost (cust-asf2.ponee.io [163.172.22.184]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 6FBD2E041C for ; Fri, 29 Sep 2017 05:20:04 +0000 (UTC) MIME-Version: 1.0 Message-ID: Subject: Re: [DISCUSS] Move Type out of KeyValue References: From: "Chia-Ping Tsai" In-Reply-To: Content-Type: text/plain; charset="iso-8859-1" x-ponymail-sender: 51ef25fd0a3611d18ffb478ae2ae610bbbd2432c Date: Fri, 29 Sep 2017 05:20:01 -0000 x-ponymail-agent: PonyMail Composer/0.2 To: X-Mailer: LuaSocket 3.0-rc1 archived-at: Fri, 29 Sep 2017 05:20:10 -0000 Thanks for all comment. The problem i want to resolve is the valid code should be exposed as IA.Public. Otherwise, end user have to access the IA.Private class to build the custom cell. For example, I have a use case which plays a streaming role in our appliaction. It applies the CellBuilder(HBASE-18519) to build custom cells. These cells have many same fields so they are put in shared-memory for avoiding GC pause. Everything is wonderful. However, we have to access the IA.Private class - KeyValue#Type - to get the valid code of Put. I believe there are many use cases of custom cell, and consequently it is worth adding a way to get the valid type via IA.Public class. Otherwise, it may imply that the custom cell is based on a unstable way, because the related code can be changed at any time. -- Chia-Ping On 2017-09-29 00:49, Andrew Purtell wrote: > I agree with Stack. Was typing up a reply to Anoop but let me move it down > here. > > The type code exposes some low level details of how our current stores are > architected. But what if in the future you could swap out HStore implements > Store with PStore implements Store, where HStore is backed by HFiles and > PStore is backed by Parquet? Just as a hypothetical example. I know there > would be larger issues if this were actually attempted. Bear with me. You > can imagine some different new Store implementation that has some > advantages but is not a design derived from the log structured merge tree > if you like. Most values from a new Cell.Type based on KeyValue.Type > wouldn't apply to cells from such a thing because they are particular to > how LSMs work. I'm sure such a project if attempted would make a number of > changes requiring a major version increment and low level details could be > unwound from Cell then, but if we could avoid doing it in the first place, > I think it would better for maintainability. > > > On Thu, Sep 28, 2017 at 9:39 AM, Stack wrote: > > > On Thu, Sep 28, 2017 at 2:25 AM, Chia-Ping Tsai > > wrote: > > > > > hi folks, > > > > > > User is allowed to create custom cell but the valid code of type - > > > KeyValue#Type - is declared as IA.Private. As i see it, we should expose > > > KeyValue#Type as Public Client. Three possible ways are shown below: > > > 1) Change declaration of KeyValue#Type from IA.Private to IA.Public > > > 2) Move KeyValue#Type into Cell. > > > 3) Move KeyValue#Type to upper level > > > > > > Any suggestions? > > > > > > > > What is the problem that we are trying to solve Chia-Ping? You want to make > > Cells of a new Type? > > > > My first reaction is that KV#Type is particular to the KV implementation. > > Any new Cell implementation should not have to adopt the KeyValue typing > > mechanism. > > > > S > > > > > > > > > > > -- > > > Chia-Ping > > > > > > > > > > > > -- > Best regards, > Andrew > > Words like orphans lost among the crosstalk, meaning torn from truth's > decrepit hands > - A23, Crosstalk >