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 79A4D11F04 for ; Mon, 12 May 2014 02:25:55 +0000 (UTC) Received: (qmail 68431 invoked by uid 500); 12 May 2014 00:39:15 -0000 Delivered-To: apmail-hbase-dev-archive@hbase.apache.org Received: (qmail 68337 invoked by uid 500); 12 May 2014 00:39:15 -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 68077 invoked by uid 99); 12 May 2014 00:39:15 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 May 2014 00:39:15 +0000 Date: Mon, 12 May 2014 00:39:15 +0000 (UTC) From: "Andrew Purtell (JIRA)" To: dev@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (HBASE-2051) Use builder pattern to improve usability of client API MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HBASE-2051?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Andrew Purtell resolved HBASE-2051. ----------------------------------- Resolution: Fixed Addressed elsewhere, but not fully. Could reopen if there is active interest (aka a patch soon forthcoming) > Use builder pattern to improve usability of client API > ------------------------------------------------------ > > Key: HBASE-2051 > URL: https://issues.apache.org/jira/browse/HBASE-2051 > Project: HBase > Issue Type: Improvement > Reporter: Andrew Purtell > Attachments: aconex-hbase-utils.zip > > > From Paul Smith up on hbase-user@: > {quote} > I think a good collection of useful builders and utilities that handle the 80% case will help HBase gain much more traction. As an person starting with HBase, there are a lot of concepts to get, Bytes definitely get in the way of seeing the real underlying patterns. I'm a total believer in understanding the internals to get the best out of a product, but that often comes after experimentation, and these high-level libraries grease the wheels for faster 'grok'ing the concepts. > Thinking out loud here, but something like this may be useful: > {code} > PutBuilder builder = new PutBuilder(hTable); > // first Row > builder.withRowKey(1stRowKey).withColumnFamily("foo") > .put("columnA", valueA) > .put("columnB",valueB); > // secondRow > builder.withRowKey(2ndRowKey).withColumnFamily("eek") > .put("columnC", valueC) > .put("columnD",valueD); > .. > builder.putAll(); > {code} > {quote} > Perhaps we could use the Builder pattern to achieve simplification (e.g. HBASE-1990) and API support for multicalls (HBASE-1986, HBASE-1845) at the same time. Method variants should accept byte[] or String for keys or values, and lists. -- This message was sent by Atlassian JIRA (v6.2#6252)