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 D2001200D0F for ; Fri, 29 Sep 2017 10:57:51 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id D04641609D1; Fri, 29 Sep 2017 08:57:51 +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 EA9281609C5 for ; Fri, 29 Sep 2017 10:57:50 +0200 (CEST) Received: (qmail 89881 invoked by uid 500); 29 Sep 2017 08:57:49 -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 89868 invoked by uid 99); 29 Sep 2017 08:57:49 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 Sep 2017 08:57:49 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 07636180F7A for ; Fri, 29 Sep 2017 08:57:49 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.401 X-Spam-Level: X-Spam-Status: No, score=-0.401 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-2.8, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd3-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 (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id BL34alraPVEA for ; Fri, 29 Sep 2017 08:57:47 +0000 (UTC) Received: from mail-io0-f173.google.com (mail-io0-f173.google.com [209.85.223.173]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 6472060EAC for ; Fri, 29 Sep 2017 08:57:46 +0000 (UTC) Received: by mail-io0-f173.google.com with SMTP id n69so906864ioi.5 for ; Fri, 29 Sep 2017 01:57:46 -0700 (PDT) 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=vegfMHUxnFu+q8C8E63wANV0G63LFkG+/h2s8RzLEBM=; b=o1EhyyvHTyS7pWh7qjHib/6tiKqwPxwGm1R5If3REXw8YWSty3O99TntVeQ5VANl6S Db2P7CIvnP5bq+OxOu3+c4H5jTfzhIlSGJDiOu7yq34Vuvsq7sqE+/KviQ3Fs2xRJsjz 5gPhkgjJ9RLZ90p1pLXwBotGbpsgeFbeVevkaj5aAGLiMgo7BBsXQYo3pqDBpUPxK0q1 RQ0bWAWmfDy8OOTlXyTDT3ujr1Em/AkfymLygkkzT0REZhqUEctafiF1CIWQ5lSzAkji XHLIzLXDFapscKOcI3NEOi6CevLJ8CkmN/Cylersv4xl//admbD6fKdzhYnXTG0q7nHJ IXUA== 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=vegfMHUxnFu+q8C8E63wANV0G63LFkG+/h2s8RzLEBM=; b=IsaC0nNnwFyRdl9PT6Q8oZi3ztRAh8L9Qhs/prknuI2rHSWaMB6URSdNSY41DUk9my wVzJsiCqHvigipvwLuc7Mglu0YQEwN3hQIwXcsdB6psi7ZRa51NOwJ4KS1t5gMoNi0n+ qfzobnPuniwlCiettOLT0PYVU1KejW4Xk694KaUHOXpWiI6bJhSaJ0SW0eI0aMJYuZz8 YN/vv3dtDvyUfGWi1GzmqEjNwer+ydf2L+z06khcJQ+L5c9Y19a98hZXotOFpNkffLI1 YyBgHW8g5ZD3eLZLORpibDEVcttpv65cZBLgFJzzni6mPnXeqTIUGj3C4e4SPjSdC5BQ I13A== X-Gm-Message-State: AMCzsaVI4QbR09AyyN4VLlV41X4vlQP2UMkGVDb9j1ZjKT8un/EMjUpK 5o0uJoMOaBkzkdehWGxJjKXUNecPff93Q7OJaJI= X-Google-Smtp-Source: AOwi7QDFOk4sp6aLW8p1oLmdkybJYB80mymkZhOO37OxnnD/Oc4pk269LCWCWMIRhdVGKEziXFYxzyamjFllkYAnIvA= X-Received: by 10.107.39.141 with SMTP id n135mr11695594ion.180.1506675464974; Fri, 29 Sep 2017 01:57:44 -0700 (PDT) MIME-Version: 1.0 Received: by 10.36.86.200 with HTTP; Fri, 29 Sep 2017 01:57:44 -0700 (PDT) In-Reply-To: References: From: ramkrishna vasudevan Date: Fri, 29 Sep 2017 14:27:44 +0530 Message-ID: Subject: Re: [DISCUSS] Move Type out of KeyValue To: "dev@hbase.apache.org" Content-Type: multipart/alternative; boundary="001a114099aae1b784055a503702" archived-at: Fri, 29 Sep 2017 08:57:52 -0000 --001a114099aae1b784055a503702 Content-Type: text/plain; charset="UTF-8" Even if we are trying to move out I think only few of the types are really user readable. So we should be very careful here. So since we have CellBuilder way it is better we check what type of cells a user can build. I think for now the Cellbuilder is not client exposed? But again moving to Cell means it becomes public which is not right IMO and I thinks others here also agree to it. Regards Ram On Fri, Sep 29, 2017 at 10:50 AM, Chia-Ping Tsai wrote: > 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 > > > --001a114099aae1b784055a503702--