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 99650200C2B for ; Thu, 16 Feb 2017 06:45:03 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 97B90160B70; Thu, 16 Feb 2017 05:45:03 +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 E2942160B5E for ; Thu, 16 Feb 2017 06:45:02 +0100 (CET) Received: (qmail 71498 invoked by uid 500); 16 Feb 2017 05:45:02 -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 71487 invoked by uid 99); 16 Feb 2017 05:45:02 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Feb 2017 05:45:02 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 6FBC1C0E29 for ; Thu, 16 Feb 2017 05:45:01 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -1.199 X-Spam-Level: X-Spam-Status: No, score=-1.199 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-2.999] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id IOhUl7Zxrs_9 for ; Thu, 16 Feb 2017 05:45:00 +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 749115F4E5 for ; Thu, 16 Feb 2017 05:45:00 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 53E59E069E for ; Thu, 16 Feb 2017 05:44:42 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id B367D24127 for ; Thu, 16 Feb 2017 05:44:41 +0000 (UTC) Date: Thu, 16 Feb 2017 05:44:41 +0000 (UTC) From: "stack (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-17652) Use 'default' keyword in Coprocessor Observer interfaces to get rid of 'Base...Observer' implementations. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 16 Feb 2017 05:45:03 -0000 [ https://issues.apache.org/jira/browse/HBASE-17652?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D158= 69266#comment-15869266 ]=20 stack commented on HBASE-17652: ------------------------------- You going to resolve as dupe [~appy]? > Use 'default' keyword in Coprocessor Observer interfaces to get rid of 'B= ase...Observer' implementations. > -------------------------------------------------------------------------= -------------------------------- > > Key: HBASE-17652 > URL: https://issues.apache.org/jira/browse/HBASE-17652 > Project: HBase > Issue Type: Improvement > Reporter: Appy > Assignee: Appy > Labels: coprocessors, incompatible > Attachments: HBASE-17652.master.001.patch > > > In cases where one might need to use multiple observers, say region, mast= er and regionserver; and the fact that only one class can be extended, it g= ives rise to following pattern: > {noformat} > public class BaseMasterAndRegionObserver > =E2=80=82=E2=80=82extends BaseRegionObserver > =E2=80=82=E2=80=82implements MasterObserver > class AccessController > =E2=80=82=E2=80=82extends BaseMasterAndRegionObserver > =E2=80=82=E2=80=82implements RegionServerObserver > {noformat} > were BaseMasterAndRegionObserver is full copy of BaseMasterObserver. > There is an example of simple case too where the current design fails= . > Say only one observer is needed by the coprocessor, but the design do= esn't permit extending even that single observer (see RSGroupAdminEndpoint)= , that leads to full copy of Base...Observer class into coprocessor class l= eading to 1000s of lines of code and this ugly mix of 5 main functions with= 100 useless functions. -- This message was sent by Atlassian JIRA (v6.3.15#6346)