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 C7135200B74 for ; Thu, 1 Sep 2016 17:59:10 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id C5AA1160AB5; Thu, 1 Sep 2016 15:59: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 3FB4A160AA8 for ; Thu, 1 Sep 2016 17:59:10 +0200 (CEST) Received: (qmail 41685 invoked by uid 500); 1 Sep 2016 15:59:09 -0000 Mailing-List: contact dev-help@accumulo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@accumulo.apache.org Delivered-To: mailing list dev@accumulo.apache.org Received: (qmail 41670 invoked by uid 99); 1 Sep 2016 15:59:09 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Sep 2016 15:59:09 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 14C04DFD9F; Thu, 1 Sep 2016 15:59:09 +0000 (UTC) From: keith-turner To: dev@accumulo.apache.org Reply-To: dev@accumulo.apache.org References: In-Reply-To: Subject: [GitHub] accumulo issue #145: ACCUMULO-4376 add KeyBuilder Content-Type: text/plain Message-Id: <20160901155909.14C04DFD9F@git1-us-west.apache.org> Date: Thu, 1 Sep 2016 15:59:09 +0000 (UTC) archived-at: Thu, 01 Sep 2016 15:59:11 -0000 Github user keith-turner commented on the issue: https://github.com/apache/accumulo/pull/145 I agree w/ @dhutchis and would really like the ability to mix types. For example a binary row and string column is a common usage pattern. The builder pattern supports this usage pattern really well. I would suggest using `family` instead of `columnFamily`, `qualifier` instead `columnQualifier`, and `visibility` instead of `columnVisibility` for the methods names. IMO using these names will make the code users write shorter and less redundant w/o any loss in readability. I would suggest making the builder class package private and adding a `newBuilder()` method to Key that returns the first interface. Below is an example of code using all of these suggestions. ```java byte r[]; String f; Text q; Key k = Key.newBuilder().row(r).family(f).qualifier(q).build(); ``` --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastructure@apache.org or file a JIRA ticket with INFRA. ---