Return-Path: X-Original-To: apmail-hbase-issues-archive@www.apache.org Delivered-To: apmail-hbase-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id F3EA48EB2 for ; Fri, 9 Sep 2011 03:58:38 +0000 (UTC) Received: (qmail 37574 invoked by uid 500); 9 Sep 2011 03:58:21 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 36929 invoked by uid 500); 9 Sep 2011 03:57:58 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 36572 invoked by uid 99); 9 Sep 2011 03:57:32 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Sep 2011 03:57:32 +0000 X-ASF-Spam-Status: No, hits=-2000.5 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Sep 2011 03:57:29 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id D61C98A773 for ; Fri, 9 Sep 2011 03:57:08 +0000 (UTC) Date: Fri, 9 Sep 2011 03:57:08 +0000 (UTC) From: "stack (JIRA)" To: issues@hbase.apache.org Message-ID: <41847046.6604.1315540628873.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <504555252.27310.1315425671286.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (HBASE-4347) Remove duplicated code from Put, Delete, Get, Scan, MultiPut MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HBASE-4347?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13100940#comment-13100940 ] stack commented on HBASE-4347: ------------------------------ Nice clean up Lars Mutation needs a license as does OperationWithAttributes and Attributes. I'm +1 on commit. I can add the licenses on commit. > Remove duplicated code from Put, Delete, Get, Scan, MultiPut > ------------------------------------------------------------ > > Key: HBASE-4347 > URL: https://issues.apache.org/jira/browse/HBASE-4347 > Project: HBase > Issue Type: Improvement > Components: util > Affects Versions: 0.92.0 > Reporter: Lars Hofhansl > Priority: Minor > Fix For: 0.92.0 > > Attachments: 4347-v2.txt, 4347.txt > > > This came from discussion with Stack w.r.t. HBASE-2195. > There is currently a lot of duplicated code especially between Put and Delete, and also between all Operations. > For example all of Put/Delete/Get/Scan have attributes with exactly the same code in all classes. > Put and Delete also have the familyMap, Row, Rowlock, Timestamp, etc. > One way to do this is to introduce "OperationWithAttributes" which extends Operation, and have Put/Delete/Get/Scan extend that rather than Operation. > In addition Put and Delete could extends from Mutation (which itself would extend OperationWithAttributes). > If a static inheritance hierarchy is not desired here, we can use delegation. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira